Class TSqlitePassEngine

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TSqlitePassEngine = class(TObject)

Description

Hierarchy

Overview

Methods

Public Constructor Create(Database: TSqlitePassDatabase);
Public Destructor Destroy; override;
Public function CheckResult(i: Integer; VerboseLevel: TSqlitePassVerboseLevel = vlLogAndShow): Integer;
Public function ExecQuery(Sql: string; VerboseLevel: TSqlitePassVerboseLevel = vlLogAndShow): Integer;
Public function ExecSQL(Sql: string; CallBackFunc: TSqlitePassExecCallBack=nil): Integer;
Public function GetLastInsertRowId: Int64;
Public Function LoadSqliteLibrary(LibraryFile: String): Boolean;
Public function PrepareStmt(var Stmt: pointer; const sql: String; VerboseLevel: TSqlitePassVerboseLevel = vlLogAndShow): Boolean;
Public function UnprepareStmt(var Stmt: pointer): Boolean;
Public procedure CloseDatabase;
Public Procedure FinalizePendingStmts;
Public procedure OpenDatabase(FullName: String; LibraryFile: String = DefaultSQLiteLibrary);
Public Procedure StartChrono;
Public Procedure StopChrono;

Properties

Public property Connection: Pointer read FConnectionHandle;
Public property ElapsedTime: Double read FElapsedTime;
Public property QueryTimeout: Integer Read FQueryTimeout Write FQueryTimeout;
Public property Transaction: TSqlitePassTransaction Read FTransaction Write FTransaction;

Description

Methods

Public Constructor Create(Database: TSqlitePassDatabase);
 
Public Destructor Destroy; override;
 
Public function CheckResult(i: Integer; VerboseLevel: TSqlitePassVerboseLevel = vlLogAndShow): Integer;
 
Public function ExecQuery(Sql: string; VerboseLevel: TSqlitePassVerboseLevel = vlLogAndShow): Integer;
 
Public function ExecSQL(Sql: string; CallBackFunc: TSqlitePassExecCallBack=nil): Integer;

————- Sql Exec —————-

Public function GetLastInsertRowId: Int64;
 
Public Function LoadSqliteLibrary(LibraryFile: String): Boolean;

———— Library —————–

Public function PrepareStmt(var Stmt: pointer; const sql: String; VerboseLevel: TSqlitePassVerboseLevel = vlLogAndShow): Boolean;

——– SQL Statements ———–

Public function UnprepareStmt(var Stmt: pointer): Boolean;
 
Public procedure CloseDatabase;
 
Public Procedure FinalizePendingStmts;
 
Public procedure OpenDatabase(FullName: String; LibraryFile: String = DefaultSQLiteLibrary);

————- Database —————-

Public Procedure StartChrono;

Chrono

Public Procedure StopChrono;
 

Properties

Public property Connection: Pointer read FConnectionHandle;
 
Public property ElapsedTime: Double read FElapsedTime;
 
Public property QueryTimeout: Integer Read FQueryTimeout Write FQueryTimeout;
 
Public property Transaction: TSqlitePassTransaction Read FTransaction Write FTransaction;

Transactions. Sqlite engine supports only one active transaction at the same time. In other words, you can't use nested transactions. The TSqlitePassTransaction object will automatically handle this, so any attempt to start a transaction while one is running will have no effect. Transactions are really helpfull to speed up and secure data operations. You should use them as often as you can. If no transaction is active, the TSqlitePassDatabase will always try to start a new transaction before writing to the database and commit it. This could be time consuming if you need to update or add many records at the same time and you should proceed like this : Database.Transaction.Start; ... Your code here to update or create records; ... Database.Transaction.Commit;


Generated by PasDoc 0.11.0 on 2009-01-11 21:18:00