sqlite_micro_logger_arduino
sqlite_micro_logger_arduino copied to clipboard
In my DB table i have one colom isSynced can I edit it?
While saving I am saving the record with isSynced=0 and after the success response I want to modify it to isSynced=1 is it possible?
Yes please use the update function to update column in record. This needs to be called with a read context after locating the record to be updated. Please note that the width of the column to be updated needs to be the same as when it was inserted.
// Updates value of column at current position
// For text and blob columns, pass the type to dblog_derive_data_len()
// to get the actual length
int dblog_upd_col_val(struct dblog_read_context *rctx, int col_idx, const void *val);
// Writes the current page to disk
// Typically called after updating values using dblog_upd_col_val()
int dblog_write_cur_page(struct dblog_read_context *rctx, write_fn_def write_fn);