MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / toggleSelectOrder

Function toggleSelectOrder

modules/dasSQLITE/sqlite/shell.c:19483–19495  ·  view source on GitHub ↗

** Toggle the reverse_unordered_selects setting. */

Source from the content-addressed store, hash-verified

19481** Toggle the reverse_unordered_selects setting.
19482*/
19483static void toggleSelectOrder(sqlite3 *db){
19484 sqlite3_stmt *pStmt = 0;
19485 int iSetting = 0;
19486 char zStmt[100];
19487 sqlite3_prepare_v2(db, "PRAGMA reverse_unordered_selects", -1, &pStmt, 0);
19488 if( sqlite3_step(pStmt)==SQLITE_ROW ){
19489 iSetting = sqlite3_column_int(pStmt, 0);
19490 }
19491 sqlite3_finalize(pStmt);
19492 sqlite3_snprintf(sizeof(zStmt), zStmt,
19493 "PRAGMA reverse_unordered_selects(%d)", !iSetting);
19494 sqlite3_exec(db, zStmt, 0, 0, 0);
19495}
19496
19497/*
19498** This is a different callback routine used for dumping the database.

Callers 1

dump_callbackFunction · 0.85

Calls 1

sqlite3_execFunction · 0.85

Tested by

no test coverage detected