type TSLEngine = class()
. SQLite API + databeses management. It is possible to have more then one engine at a time. Application can for example use databases with different page sizes.
constructor Create (aConnect: Boolean = True; const aLibName: String = ''); |
|
destructor Destroy; override; |
|
procedure DoLog (const aText: String); |
|
function Encoding: String; |
|
function ErrorString (const anErrNo: Integer): String; |
|
function GetDB (const anIndex: Integer): TObject; |
|
function GetDBCount: Integer; |
|
function RegisterDB (aDB: TObject): Boolean; |
|
function SQLite_AggregateContext (Func: Pointer; nBytes: Integer): Pointer; |
|
function SQLite_AggregateCount (Func: Pointer): Pointer; |
|
procedure SQLite_BusyHandler (aDB: TObject); |
|
procedure SQLite_BusyTimeout (aDB: TObject; const aTimeOut: Integer); |
|
procedure SQLite_Cancel (aDB: TObject); |
|
function SQLite_Changes (aDB: TObject): Integer; |
|
procedure SQLite_Close (aDB: TObject); |
|
function SQLite_Compile (aDB: TObject; const aSQLStatement: String; var aTail: String; var aSQLite_VM: Integer; var anErrMsg: String): Integer; cdecl; |
|
function SQLite_Complete (P: PChar): boolean; |
|
function SQLite_CreateAggregate (DB: Pointer; const Name: PChar; nArg: Integer; xStep: Pointer; xFinalize: Pointer; pUserData: Pointer): Integer; |
|
function SQLite_CreateFunction (DB: Pointer; const Name: PChar; nArg: Integer; xFunc: Pointer; pUserData: Pointer): Integer; |
|
function SQLite_Exec (anObj: TObject; aSQLStatement: String; var anErrMsg: String; aCallbackPtr: Pointer): Integer; |
|
function SQLite_Finalize (aSQLite_VM: Integer; var anErrMsg: String): Integer; cdecl; |
|
procedure SQLite_FreeMem (P: PChar); |
|
procedure SQLite_FreeTable (Table: Pointer); |
|
function SQLite_FunctionType (DB: Pointer; const Name: PChar; DataType: Integer): Integer; |
|
function SQLite_GetTable (aDB: TObject; aSQLStatement: String; var aResultPtr: Pointer; var aRowCount: Cardinal; var aColCount: Cardinal; var anErrMsg: String): Integer; |
|
function SQLite_LastInsertRow (aDB: TObject): integer; |
|
function SQLite_Open (aDBName: String; aMode: Integer; var anErrMsg: String): Pointer; |
|
procedure SQLite_SetResultDouble (Func: Pointer; Res: Double); |
|
procedure SQLite_SetResultError (Func: Pointer; const pRes: PChar; Len: Integer); |
|
procedure SQLite_SetResultInt (Func: Pointer; Res: Integer); |
|
function SQLite_SetResultString (Func: Pointer; const pRes: PChar; Len: Integer): PChar; |
|
function SQLite_Step (aSQLite_VM: Integer; var aColCount: Cardinal; var aValuePtr: Pointer; var aColsPtr: Pointer): Integer; cdecl; |
|
function SQLite_UserData (Func: Pointer): Pointer; |
|
function Version: String; |
constructor Create (aConnect: Boolean = True; const aLibName: String = ''); |
destructor Destroy; override; |
procedure DoLog (const aText: String); |
Calling log event for the text.
function Encoding: String; |
http://www.sqlite.org/c_interface.html 3.7 encoding used by engine.
function ErrorString (const anErrNo: Integer): String; |
Converts error number to string
function GetDB (const anIndex: Integer): TObject; |
Database defined by specified index.
function GetDBCount: Integer; |
Number of databases.
function RegisterDB (aDB: TObject): Boolean; |
Adding database to FDBList.
function SQLite_AggregateContext (Func: Pointer; nBytes: Integer): Pointer; |
function SQLite_AggregateCount (Func: Pointer): Pointer; |
procedure SQLite_BusyHandler (aDB: TObject); |
procedure SQLite_BusyTimeout (aDB: TObject; const aTimeOut: Integer); |
procedure SQLite_Cancel (aDB: TObject); |
function SQLite_Changes (aDB: TObject): Integer; |
procedure SQLite_Close (aDB: TObject); |
function SQLite_Compile (aDB: TObject; const aSQLStatement: String; var aTail: String; var aSQLite_VM: Integer; var anErrMsg: String): Integer; cdecl; |
function SQLite_Complete (P: PChar): boolean; |
http://www.sqlite.org/c_interface.html 3.5 - testing if SQL is complite query string.
function SQLite_CreateAggregate (DB: Pointer; const Name: PChar; nArg: Integer; xStep: Pointer; xFinalize: Pointer; pUserData: Pointer): Integer; |
function SQLite_CreateFunction (DB: Pointer; const Name: PChar; nArg: Integer; xFunc: Pointer; pUserData: Pointer): Integer; |
function SQLite_Exec (anObj: TObject; aSQLStatement: String; var anErrMsg: String; aCallbackPtr: Pointer): Integer; |
function SQLite_Finalize (aSQLite_VM: Integer; var anErrMsg: String): Integer; cdecl; |
procedure SQLite_FreeMem (P: PChar); |
procedure SQLite_FreeTable (Table: Pointer); |
function SQLite_FunctionType (DB: Pointer; const Name: PChar; DataType: Integer): Integer; |
function SQLite_GetTable (aDB: TObject; aSQLStatement: String; var aResultPtr: Pointer; var aRowCount: Cardinal; var aColCount: Cardinal; var anErrMsg: String): Integer; |
function SQLite_LastInsertRow (aDB: TObject): integer; |
function SQLite_Open (aDBName: String; aMode: Integer; var anErrMsg: String): Pointer; |
procedure SQLite_SetResultDouble (Func: Pointer; Res: Double); |
procedure SQLite_SetResultError (Func: Pointer; const pRes: PChar; Len: Integer); |
procedure SQLite_SetResultInt (Func: Pointer; Res: Integer); |
function SQLite_SetResultString (Func: Pointer; const pRes: PChar; Len: Integer): PChar; |
function SQLite_Step (aSQLite_VM: Integer; var aColCount: Cardinal; var aValuePtr: Pointer; var aColsPtr: Pointer): Integer; cdecl; |
function SQLite_UserData (Func: Pointer): Pointer; |
function Version: String; |
http://www.sqlite.org/c_interface.html 3.6 library version.
property OnLog: TLogEvent; |
property OnLog: TLogEvent; |
For every call of engine application can log.