Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In my DB table i have one colom isSynced can I edit it? #13

Open
MarkEvens opened this issue Nov 27, 2023 · 1 comment
Open

In my DB table i have one colom isSynced can I edit it? #13

MarkEvens opened this issue Nov 27, 2023 · 1 comment

Comments

@MarkEvens
Copy link

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?

@MarkEvens MarkEvens changed the title In my DB table i have one colom isSynced is I edit this? In my DB table i have one colom isSynced can I edit it? Nov 27, 2023
@siara-cc
Copy link
Owner

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants