-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add option to compare site_id when values are equal to determine ultimate winner #415
Conversation
07bdb38
to
3a01980
Compare
@@ -1,2 +1,2 @@ | |||
// The sha of the commit that this version of crsqlite was built from. | |||
pub const SHA: &'static str = ""; | |||
pub const SHA: &'static str = "3a01980562615001d765eec61e3ed58147a93f93"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm, I guess I should ignore this file and only generate it at build time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, possibly yes. I didn't notice it.
return 0; | ||
} | ||
} else { | ||
// unhandled config setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't quite sure which way to go there. I didn't want to be too strict for the list of supported config settings, but I did want to be strict for each setting's value type.
Adds 2 functions
crsql_config_set(name, value)
andcrsql_config_get(name)
. They enable setting and getting config settings persisted to the database, but also available incrsql_ExtData
.The first and only setting right now is
merge-equal-values
making sure there's always a winner by tie-breaking onsite_id
when everything else is equal.