1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Add the SQLITE_CHANGESETAPPLY_FKNOACTION flag to sqlite3session.h, for passing to sqlite3changeset_apply_v2() to cause all foreign key constraints to behave as if they were declared NO ACTION.

FossilOrigin-Name: fc9f82ea084159eaf3dd1757b96d17d1201b00c4e06455a7dcd8067172b25f28
This commit is contained in:
dan
2023-10-20 17:06:39 +00:00
parent 90e4a3b7fc
commit 17c3408e0e
8 changed files with 133 additions and 15 deletions

View File

@ -812,9 +812,12 @@ static int SQLITE_TCLAPI testSqlite3changesetApply(
while( objc>1 ){
const char *z1 = Tcl_GetString(objv[1]);
int n = strlen(z1);
if( n>1 && n<=12 && 0==sqlite3_strnicmp("-nosavepoint", z1, n) ){
if( n>3 && n<=12 && 0==sqlite3_strnicmp("-nosavepoint", z1, n) ){
flags |= SQLITE_CHANGESETAPPLY_NOSAVEPOINT;
}
else if( n>3 && n<=9 && 0==sqlite3_strnicmp("-noaction", z1, n) ){
flags |= SQLITE_CHANGESETAPPLY_FKNOACTION;
}
else if( n>2 && n<=7 && 0==sqlite3_strnicmp("-invert", z1, n) ){
flags |= SQLITE_CHANGESETAPPLY_INVERT;
}