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,
|
PragmaFlags::NeedSchema | PragmaFlags::ReadOnly | PragmaFlags::Result0,
|
||||||
&["message"],
|
&["message"],
|
||||||
),
|
),
|
||||||
CaptureDataChanges => Pragma::new(
|
UnstableCaptureDataChangesConn => Pragma::new(
|
||||||
PragmaFlags::NeedSchema | PragmaFlags::Result0 | PragmaFlags::SchemaReq,
|
PragmaFlags::NeedSchema | PragmaFlags::Result0 | PragmaFlags::SchemaReq,
|
||||||
&["mode", "table"],
|
&["mode", "table"],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ fn update_pragma(
|
|||||||
Ok(program)
|
Ok(program)
|
||||||
}
|
}
|
||||||
PragmaName::IntegrityCheck => unreachable!("integrity_check cannot be set"),
|
PragmaName::IntegrityCheck => unreachable!("integrity_check cannot be set"),
|
||||||
PragmaName::CaptureDataChanges => {
|
PragmaName::UnstableCaptureDataChangesConn => {
|
||||||
let value = parse_string(&value)?;
|
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
|
// 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...
|
// but for now, let's keep it as is...
|
||||||
@@ -382,7 +382,7 @@ fn query_pragma(
|
|||||||
PragmaName::IntegrityCheck => {
|
PragmaName::IntegrityCheck => {
|
||||||
translate_integrity_check(schema, &mut program)?;
|
translate_integrity_check(schema, &mut program)?;
|
||||||
}
|
}
|
||||||
PragmaName::CaptureDataChanges => {
|
PragmaName::UnstableCaptureDataChangesConn => {
|
||||||
let pragma = pragma_for(pragma);
|
let pragma = pragma_for(pragma);
|
||||||
let second_column = program.alloc_register();
|
let second_column = program.alloc_register();
|
||||||
let opts = connection.get_capture_data_changes();
|
let opts = connection.get_capture_data_changes();
|
||||||
|
|||||||
@@ -1747,8 +1747,6 @@ pub enum PragmaName {
|
|||||||
AutoVacuum,
|
AutoVacuum,
|
||||||
/// `cache_size` pragma
|
/// `cache_size` pragma
|
||||||
CacheSize,
|
CacheSize,
|
||||||
/// enable capture-changes logic for the connection
|
|
||||||
CaptureDataChanges,
|
|
||||||
/// Run integrity check on the database file
|
/// Run integrity check on the database file
|
||||||
IntegrityCheck,
|
IntegrityCheck,
|
||||||
/// `journal_mode` pragma
|
/// `journal_mode` pragma
|
||||||
@@ -1763,6 +1761,8 @@ pub enum PragmaName {
|
|||||||
SchemaVersion,
|
SchemaVersion,
|
||||||
/// returns information about the columns of a table
|
/// returns information about the columns of a table
|
||||||
TableInfo,
|
TableInfo,
|
||||||
|
/// enable capture-changes logic for the connection
|
||||||
|
UnstableCaptureDataChangesConn,
|
||||||
/// Returns the user version of the database file.
|
/// Returns the user version of the database file.
|
||||||
UserVersion,
|
UserVersion,
|
||||||
/// trigger a checkpoint to run on database(s) if WAL is enabled
|
/// trigger a checkpoint to run on database(s) if WAL is enabled
|
||||||
|
|||||||
Reference in New Issue
Block a user