mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-19 01:24:20 +01:00
rename pragma to unsable_capture_data_changes_conn
This commit is contained in:
@@ -77,7 +77,7 @@ pub fn pragma_for(pragma: PragmaName) -> Pragma {
|
||||
PragmaFlags::NeedSchema | PragmaFlags::ReadOnly | PragmaFlags::Result0,
|
||||
&["message"],
|
||||
),
|
||||
CaptureDataChanges => Pragma::new(
|
||||
UnstableCaptureDataChangesConn => Pragma::new(
|
||||
PragmaFlags::NeedSchema | PragmaFlags::Result0 | PragmaFlags::SchemaReq,
|
||||
&["mode", "table"],
|
||||
),
|
||||
|
||||
@@ -208,7 +208,7 @@ fn update_pragma(
|
||||
Ok(program)
|
||||
}
|
||||
PragmaName::IntegrityCheck => unreachable!("integrity_check cannot be set"),
|
||||
PragmaName::CaptureDataChanges => {
|
||||
PragmaName::UnstableCaptureDataChangesConn => {
|
||||
let value = parse_string(&value)?;
|
||||
// todo(sivukhin): ideally, we should consistently update capture_data_changes connection flag only after successfull execution of schema change statement
|
||||
// but for now, let's keep it as is...
|
||||
@@ -382,7 +382,7 @@ fn query_pragma(
|
||||
PragmaName::IntegrityCheck => {
|
||||
translate_integrity_check(schema, &mut program)?;
|
||||
}
|
||||
PragmaName::CaptureDataChanges => {
|
||||
PragmaName::UnstableCaptureDataChangesConn => {
|
||||
let pragma = pragma_for(pragma);
|
||||
let second_column = program.alloc_register();
|
||||
let opts = connection.get_capture_data_changes();
|
||||
|
||||
@@ -1747,8 +1747,6 @@ pub enum PragmaName {
|
||||
AutoVacuum,
|
||||
/// `cache_size` pragma
|
||||
CacheSize,
|
||||
/// enable capture-changes logic for the connection
|
||||
CaptureDataChanges,
|
||||
/// Run integrity check on the database file
|
||||
IntegrityCheck,
|
||||
/// `journal_mode` pragma
|
||||
@@ -1763,6 +1761,8 @@ pub enum PragmaName {
|
||||
SchemaVersion,
|
||||
/// returns information about the columns of a table
|
||||
TableInfo,
|
||||
/// enable capture-changes logic for the connection
|
||||
UnstableCaptureDataChangesConn,
|
||||
/// Returns the user version of the database file.
|
||||
UserVersion,
|
||||
/// trigger a checkpoint to run on database(s) if WAL is enabled
|
||||
|
||||
Reference in New Issue
Block a user