Diff of /incubator/ooSQLite/src/ooSQLite.cpp [r9142] .. [r9143]  Maximize  Restore

Switch to side-by-side view

--- a/incubator/ooSQLite/src/ooSQLite.cpp
+++ b/incubator/ooSQLite/src/ooSQLite.cpp
@@ -3661,9 +3661,20 @@
     char     buf[256];
     sqlite3 *db = pConn->db;
 
-    if ( pragma == collationList || pragma == databaseList || pragma == compileOptions || pragma == foreignKeyCheck )
+    if ( pragma == collationList || pragma == databaseList || pragma == compileOptions )
     {
         snprintf(buf, sizeof(buf), "PRAGMA %s;", name);
+    }
+    else if ( pragma == foreignKeyCheck )
+    {
+        if ( value == NULLOBJECT )
+        {
+            snprintf(buf, sizeof(buf), "PRAGMA %s;", name);
+        }
+        else
+        {
+            snprintf(buf, sizeof(buf), "PRAGMA %s(%s);", name, c->ObjectToStringValue(value));
+        }
     }
     else
     {
@@ -4939,13 +4950,14 @@
 
     switch ( pragma )
     {
-        case compileOptions :
-        case collationList  :
-        case databaseList   :
-        case foreignKeyList :
-        case indexInfo      :
-        case indexList      :
-        case tableInfo      :
+        case compileOptions  :
+        case collationList   :
+        case databaseList    :
+        case foreignKeyCheck :
+        case foreignKeyList  :
+        case indexInfo       :
+        case indexList       :
+        case tableInfo       :
             return pragmaList(context, pConn, name, value, pragma);
 
         case integrityCheck :

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks