diff --git a/stand/adb.py b/stand/adb.py index 342a1a8..5819bee 100644 --- a/stand/adb.py +++ b/stand/adb.py @@ -41,6 +41,11 @@ class ArcticLibrary: return df + def set_data(self, symbol, df): + df.index = df.index.view("datetime64[ns]") # adb supports update only for timeseries indexes + self.lib.update(symbol, df) + + def has_index(self, symbol, index): index = encode_index(index) diff --git a/stand/table.py b/stand/table.py index d9d0828..b6b1589 100644 --- a/stand/table.py +++ b/stand/table.py @@ -85,11 +85,11 @@ def update_adb(evt): col_id = evt.args["colId"] new_val = evt.args["newValue"] - index = pd.Timestamp(int(row_id)) # adb supports update only for timeseries indexes + index = int(row_id) lib = adb.get(beamline) - df = lib.read(pgroup, date_range=[index]).data + df = lib.get_data(pgroup, index) df.at[index, col_id] = new_val - lib.update(pgroup, df) + lib.set_data(pgroup, df) def update_grids(evt):