#Connection

C
Type
p
s

Host
p
s

Login
p
s

User
p
s

Password
p
s

Name
p
s

Port
p
s

Timeout
p
i

Charset
r
s

Version
r
i

FullVersion
r
s

Opened
r
b

Error
r
i

IgnoreCharset
p
b

Collations
r
String[]

Handle
r
p

LastInsertId
r
l

Tables
r
_ConnectionTables

Databases
r
_ConnectionDatabases

Users
r
_ConnectionUsers

Url
r
s

SQL
r
SQLRequest

Options
p
Collection

'Return or set the connection options.
'
'These options are specific to the database type.
_Driver
v
_DatabaseDriver

_new
m

[(DatabaseURL)s]
_free
m


Close
m


_CheckOpen
m


Open
m


Subst
m
s
(Format)s.
Quote
m
s
(Name)s[(Table)b]
Limit
m
Connection
(Limit)i
Exec
m
Result
(Request)s.
Create
m
Result
(Table)s[(Return)b(IfNotExist)b]
Find
m
Result
(Table)s[(Request)s].
Edit
m
Result
(Table)s[(Request)s].
Delete
m

(Table)s[(Request)s].
Begin
m


Commit
m


Rollback
m


Copy
m
Connection

ApplyTemplate
m

(Template)s
GetTemplate
m
s

FormatBlob
m
s
(Data)s
#Connections

C
Count
R
i

Key
R
s

Exist
M
b
(Name)s
_get
M
Connection
(Name)s
_next
M
Connection

Create
M
Connection
(Name)s
#DB

C
Boolean
C
i
1
Integer
C
i
4
Long
C
i
5
Float
C
i
7
Date
C
i
8
String
C
i
9
Serial
C
i
-1
Blob
C
i
-2
Current
P
Connection

Debug
P
b

Type
P
s

Host
P
s

User
P
s

Login
P
s

Password
P
s

Name
P
s

Port
P
s

Timeout
P
i

Charset
R
s

Version
R
i

FullVersion
R
s

Opened
R
b

Error
R
i

IgnoreCharset
P
b

Collations
R
String[]

Handle
R
p

LastInsertId
R
l

Tables
R
_ConnectionTables

Databases
R
_ConnectionDatabases

Users
R
_ConnectionUsers

_init
M


Open
M


Close
M


Subst
M
s
(Format)s.
Exec
M
Result
(Request)s.
Quote
M
s
(Name)s[(Table)b]
Create
M
Result
(Table)s[(Return)b(IfNotExist)b]
Find
M
Result
(Table)s[(Request)s].
Edit
M
Result
(Table)s[(Request)s].
Delete
M

(Table)s[(Request)s].
Begin
M


Commit
M


Rollback
M


Limit
M
Connection
(Limit)i
FormatBlob
M
s
(Data)s
LoadTemplate
M
s
(Name)s
~FieldType
E

Boolean,Integer,Long,Float,Date,String,Serial,Blob
#Database

C
Name
r
s

System
r
b

Connection
r
Connection

_Fill
m

(sName)s
Delete
m


#DatabaseUser

C
Name
r
s

Password
r
s

Administrator
r
b

Connection
r
Connection

_Fill
m

(sName)s
Delete
m


#Field

C
Name
r
s

Type
r
i{FieldType}

Length
r
i

Default
r
v

Collation
r
s

Table
r
Table

_Fill
m

(hDriver)_DatabaseDriver;(sTable)s(sName)s
_Create
m

(hDriver)_DatabaseDriver;(sTable)s(sName)s(iType)i(iLength)i(vDefault)v(sCollation)s
:_Fake
:


#ForeignKey

C
'@{since 3.22}
'
'This class represents a foreign key in a specific table.
Id
r
i

'Return the index of the foreign key.
Fields
r
String[]

'Return a list of the foreign key field names.
ForeignTable
r
s

'Return the name of the foreign table of the foreign key.
ForeignFields
r
String[]

'Return a list of the foreign key field names in the foreign table.
OnUpdate
r
s

'Return the action executed if a record is updated.
OnDelete
r
s

'Return the action executed if a record is deleted.
Table
r
Table

'Return the name of the table including the foreign key.
_Fill
m

(hDriver)_DatabaseDriver;(sTable)s(iId)i
_Create
m

(hDriver)_DatabaseDriver;(sTable)s(iId)i(aFields)String[];(sParent)s(aParentFields)String[];(sOnUpdate)s(sOnDelete)s
:_Fake
:


#Index

C
Name
r
s

Unique
r
b

Primary
r
b

Fields
r
String[]

Table
r
Table

_Fill
m

(hDriver)_DatabaseDriver;(sTable)s(sName)s
#Result

C
Count
r
i

Length
r
i

Max
r
i

Available
r
b

Index
r
i

Editable
r
b

Connection
r
Connection

Fields
r
Collection

_free
m


_Fill
m

(pHandle)p
MoveFirst
m
b

_Create
m

(sTable)s(bReturning)b(bNotExist)b
_Edit
m

(sTable)s(pHandle)p
MoveTo
m
b
(Index)l
MoveLast
m
b

MovePrevious
m
b

MoveNext
m
b

_next
m


_get
m
v
(Field)s
_put
m

(Value)v(Field)s
Update
m


All
m
Array
(Field)s
Delete
m

[(Keep)b]
Reset
m


:_Fake
:


#ResultField

C
Name
r
s

Type
r
i

Length
r
i

Result
r
Result

_Fill
m

(sName)s(iType)i(iLength)i
:_Fake
:


#SQLRequest

C
_new
m

(Connection)Connection;
Select
m
SQLRequest
[(Fields)v].
Delete
m
SQLRequest

From
m
SQLRequest
(Table)s
Where
m
SQLRequest
(Where)s.
OrderBy
m
SQLRequest
(OrderBy)v.
Or
m
SQLRequest

And
m
SQLRequest

Get
m
s

_call
m
s

#Table

C
Name
r
s

System
r
b

PrimaryKey
p
String[]

Type
p
s

Connection
r
Connection

Fields
r
_TableFields

Indexes
r
_TableIndexes

ForeignKeys
r
_TableForeignKeys

'@{since 3.22}
'Return a virtual object used for managing table foreign keys.
_Fill
m

(sName)s
_Create
m

(sName)s
Update
m


Refresh
m


'Refresh the description of the table.
:_Fake
:


#_ConnectionDatabases

C
Count
r
i

List
r
String[]

_get
m
Database
(Name)s
_next
m
Database

Exist
m
b
(Name)s
Add
m

(Name)s[(Template)s]
Refresh
m


Remove
m

(Name)s
:_Fake
:


#_ConnectionTables

C
Count
r
i

List
r
String[]

_get
m
Table
(Name)s
_next
m
Table

Exist
m
b
(Name)s
Add
m
Table
(Name)s[(Type)s]
Remove
m

(Name)s
Refresh
m


:_Fake
:


#_ConnectionUsers

C
Count
r
i

List
r
String[]

_get
m
DatabaseUser
(Name)s
_next
m
DatabaseUser

Exist
m
b
(Name)s
Add
m

(Name)s[(Password)s(Admin)b]
Refresh
m


Remove
m

(Name)s
:_Fake
:


#_DatabaseDriver

C
Version
v
i

FullVersion
v
s

Charset
v
s

LastError
v
i

Timeout
v
i

InsertIfNotExist
v
i

Limit
v
s

LimitPos
v
i

AllowedCharsInDatabaseName
v
s

QuoteCharacter
v
s

MustQuoteBlob
v
b

IgnoreCase
v
b

NoTableType
v
b

NoSerial
v
b

NoBlob
v
b

NoResultSeek
v
b

NoTransactionNest
v
b

HasSchema
v
b

NoCollation
v
b

NoReturning
v
b

IsSystem
v
b

NoForeignKey
v
b

Connection
r
Connection

IGNORE_NONE
C
i
0
IGNORE_INSERT
C
i
1
IGNORE_ON_CONFLICT
C
i
2
LIMIT_NONE
C
i
0
LIMIT_AT_BEGIN
C
i
1
LIMIT_AT_END
C
i
2
_call
m
_DatabaseDriver

Quote
m
s
(Name)s[(Table)b]
Exec
m

(Request)s
FreeResult
m

(Result)p
Query
m
p
(Request)s
MakeFieldList
m
s
(aField)String[];
Open
m
p
(Conn)Connection;
Close
m


Format
m
s
(Value)v[(Blob)b]
FormatValue
m
s
(Value)v[(Blob)b]
GetError
m
i

GetResultCount
m
i
(Result)p
GetResultField
m
b
(Result)p(Field)i(&Name)s(&Type)i(&Length)i
GetResultData
m
Variant[]
(Result)p(Index)i(Next)b
GetResultBlob
m
s
(Result)p(Index)i(Field)i
GetTables
m
String[]

IsSystemTable
m
b
(Table)s
GetTableType
m
s
(Table)s
SetTableType
m

(Table)s(Type)s
GetTableFields
m
String[]
(Table)s
GetTableFieldInfo
m

(Table)s(Field)s(&Type)i(&Length)i(&Default)v(&Collation)s
GetTableIndexes
m
String[]
(Table)s
GetTableIndexInfo
m

(Table)s(Index)s(&Fields)String[];(&Unique)b(&Primary)b
GetTablePrimaryKey
m
String[]
(Table)s
GetCollations
m
String[]

GetLastInsertId
m
l

Begin
m


Commit
m


Rollback
m


GetDatabases
m
String[]

IsSystemDatabase
m
b
(Database)s
CreateDatabase
m

(Database)s
DropDatabase
m

(Database)s
GetUsers
m
String[]

CreateUser
m

(User)s(Password)s(Admin)b
DropUser
m

(User)s
GetUserInfo
m

(User)s(&Password)s(&Admin)b
SetUserPassword
m

(User)s(Password)s
CreateTable
m

(Table)s(Fields)Field[];(Type)s(PrimaryKey)String[];(ForeignKeys)ForeignKey[];
DropTable
m

(Table)s
CreateIndex
m

(Table)s(Index)s(Fields)String[];(Unique)b
DropIndex
m

(Table)s(Index)s
GetTableForeignKeysCount
m
i
(Table)s
GetTableForeignKeyInfo
m

(Table)s(Id)i(&Fields)String[];(&Parent)s(&ParentFields)String[];(&OnUpdate)s(&OnDelete)s
:_Fake
:


#_TableFields

C
Count
r
i

List
r
String[]

_Fill
m

(sTable)s(bCreate)b
Refresh
m


_get
m
Field
(Name)s
_next
m
Field

Exist
m
b
(Name)s
Add
m
Field
(Name)s(Type)i{FieldType}[(Length)i(Default)v(Collation)s]
_GetTable
m
Table

:_Fake
:


#_TableForeignKeys

C
'@{since 3.22}
'
'This virtual class allows to manage the foreign keys of table.
Count
r
i

'Return the number of foreign keys.
_Fill
m

(sTable)s
Refresh
m


'Refresh the foreign keys of the table.
_get
m
ForeignKey
(Id)i
'Return a foreign key from its index.
_next
m
ForeignKey

_GetTable
m
Table

Add
m
ForeignKey
(Fields)String[];(ForeignTable)s[(ForeignFields)String[];(OnUpdate)s(OnDelete)s]
'Add a new foreign key description to the table
'
'- ~Fields~ : An array of the foreign key field names in the current table.
'- ~ForeignTable~ : The name of the foreign table.
'- ~ForeignFields~ : An array of the foreign key field names in the foreign table. If not specified, the names are the same than the current table.
'- ~OnUpdate~ : The name of the action to execute when updating a record. By default, no action is executed.
'- ~OnDelete~ : The name of the action to execute when deleting a record. By default, no action is executed.
'
'The ~OnUpdate~ and ~OnDelete~ action are directly sent to the SQL request, and so strictly follow the SQL syntax.
'
'Here is the list of possible actions, directly drom the SQLite3 documentation:
'
'[[
'==
''NO ACTION'
'--
'Configuring "NO ACTION" means just that: when a parent key is modified or deleted from the database, no special action is taken.
'==
''RESTRICT'
'--
'The "RESTRICT" action means that the application is prohibited from deleting (for ON DELETE RESTRICT) or modifying (for ON UPDATE RESTRICT) a parent key when there exists one or more child keys mapped to it. The difference between the effect of a RESTRICT action and normal foreign key constraint enforcement is that the RESTRICT action processing happens as soon as the field is updated - not at the end of the current statement as it would with an immediate constraint, or at the end of the current transaction as it would with a deferred constraint. Even if the foreign key constraint it is attached to is deferred, configuring a RESTRICT action causes SQLite to return an error immediately if a parent key with dependent child keys is deleted or modified.
'==
''SET NULL'
'--
'If the configured action is "SET NULL", then when a parent key is deleted (for ON DELETE SET NULL) or modified (for ON UPDATE SET NULL), the child key columns of all rows in the child table that mapped to the parent key are set to contain SQL NULL values.
'==
''SET DEFAULT'
'--
'The "SET DEFAULT" actions are similar to "SET NULL", except that each of the child key columns is set to contain the column's default value instead of NULL. Refer to the CREATE TABLE documentation for details on how default values are assigned to table columns.
'==
''CASCADE'
'--
'A "CASCADE" action propagates the delete or update operation on the parent key to each dependent child key. For an "ON DELETE CASCADE" action, this means that each row in the child table that was associated with the deleted parent row is also deleted. For an "ON UPDATE CASCADE" action, it means that the values stored in each dependent child key are modified to match the new parent key values.
']]
:_Fake
:


#_TableIndexes

C
Count
r
i

List
r
String[]

_Fill
m

(sTable)s
Refresh
m


_get
m
Index
(Name)s
_next
m
Index

Exist
m
b
(Name)s
Add
m

(Name)s(Fields)String[];[(Unique)b]
Remove
m

(Name)s
_GetTable
m
Table

:_Fake
:


