Override "main" database name with custom one. Closes #948

This commit is contained in:
Ansgar Becker
2020-03-26 12:20:32 +01:00
parent 08597e18a8
commit f241e4b69e
2 changed files with 31 additions and 0 deletions

View File

@@ -141,6 +141,29 @@ const
SQLITE_FLOAT = 2;
SQLITE_BLOB = 4;
SQLITE_NULL = 5;
SQLITE_TEXT = 3;
SQLITE3_TEXT = 3;
{ CAPI3REF: Database Connection Configuration Options
These constants are the available integer configuration options that
can be passed as the second argument to the [sqlite3_db_config()] interface.
}
SQLITE_DBCONFIG_MAINDBNAME = 1000; // const char*
SQLITE_DBCONFIG_LOOKASIDE = 1001; // void* int int
SQLITE_DBCONFIG_ENABLE_FKEY = 1002; // int int*
SQLITE_DBCONFIG_ENABLE_TRIGGER = 1003; // int int*
SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER = 1004; // int int*
SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION = 1005; // int int*
SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE = 1006; // int int*
SQLITE_DBCONFIG_ENABLE_QPSG = 1007; // int int*
SQLITE_DBCONFIG_TRIGGER_EQP = 1008; // int int*
SQLITE_DBCONFIG_RESET_DATABASE = 1009; // int int*
SQLITE_DBCONFIG_DEFENSIVE = 1010; // int int*
SQLITE_DBCONFIG_WRITABLE_SCHEMA = 1011; // int int*
SQLITE_DBCONFIG_LEGACY_ALTER_TABLE = 1012; // int int*
SQLITE_DBCONFIG_DQS_DML = 1013; // int int*
SQLITE_DBCONFIG_DQS_DDL = 1014; // int int*
SQLITE_DBCONFIG_ENABLE_VIEW = 1015; // int int*
SQLITE_DBCONFIG_MAX = 1015; // Largest DBCONFIG
@@ -537,6 +560,7 @@ const
private
procedure AssignProcedures; override;
end;
TSQLiteLib = class(TDbLib)
sqlite3_open: function(const filename: PAnsiChar; var ppDb: Psqlite3): Integer; cdecl;
sqlite3_libversion: function(): PAnsiChar; cdecl;
sqlite3_close: function(ppDb: Psqlite3): Integer; cdecl;
@@ -7904,6 +7928,7 @@ begin
procedure TSQLiteLib.AssignProcedures;
begin
AssignProc(@sqlite3_open, 'sqlite3_open');
AssignProc(@sqlite3_libversion, 'sqlite3_libversion');
AssignProc(@sqlite3_close, 'sqlite3_close');