Platforms to show: All Mac Windows Linux Cross-Platform

Back to InternalSQLiteLibraryMBS module.

InternalSQLiteLibraryMBS.CompileOption(index as Integer) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries name of a compile option.
Example
dim list() as string

for i as Integer = 0 to 100
dim s as string = InternalSQLiteLibraryMBS.CompileOption(i)
if s = "" then exit
dim b as Boolean = InternalSQLiteLibraryMBS.CompileOptionUsed(s)
dim t as string
if b then
t = ": yes"
else
t = ": no"
end if
list.Append s + t
next

MsgBox Join(list, EndOfLine)

Index index starting with zero until you get back an empty name.

Some examples using this method:

InternalSQLiteLibraryMBS.CompileOptionUsed(optionName as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries if a given compile option was set on or off.
Example
dim list() as string

for i as Integer = 0 to 100
dim s as string = InternalSQLiteLibraryMBS.CompileOption(i)
if s = "" then exit
dim b as Boolean = InternalSQLiteLibraryMBS.CompileOptionUsed(s)
dim t as string
if b then
t = ": yes"
else
t = ": no"
end if
list.Append s + t
next

MsgBox Join(list, EndOfLine)

If you need a specific option set, please contact MBS support.

Some examples using this method:

InternalSQLiteLibraryMBS.DumpToFile(SqliteDBConectionHandle as Ptr, File as FolderItem, TableName as string = "", PreserveRowid as Boolean = false, Newlines as Boolean = false, DumpDataOnly as Boolean = false, DumpNoSys as Boolean = false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Dumps SQLite database to text file just like dump command in SQLite command line tool.
Example

Call InternalSQLiteLibraryMBS.Use

Dim con As New SQLConnectionMBS

// connect....

Dim handle As ptr = con.SQLiteConnectionHandle
Dim file As FolderItem = SpecialFolder.Desktop.Child("dump.txt")
InternalSQLiteLibraryMBS.DumpToFile(handle, file)

Must use the internal SQLite database, otherwise it will crash.
Raises exception if handle or file is nil.
SQL errors are output by SQLite to the output file.

InternalSQLiteLibraryMBS.DumpToString(SqliteDBConectionHandle as Ptr, byref Data as String, MaximumSize as Integer = 10000000, TableName as string = "", PreserveRowid as Boolean = false, Newlines as Boolean = false, DumpDataOnly as Boolean = false, DumpNoSys as Boolean = false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 22.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Dumps SQLite database to text file just like dump command in SQLite command line tool.
Example

Call InternalSQLiteLibraryMBS.Use

Dim con As New SQLConnectionMBS

// connect....

Dim handle As ptr = con.SQLiteConnectionHandle
dim data as string
InternalSQLiteLibraryMBS.DumpToFile(handle, data, 1000000)

Must use the internal SQLite database, otherwise it will crash.
Raises exception if handle is nil or we run out of memory.
SQL errors are output by SQLite to the output file.

Please pass size of memory we should allocate. Then we can run the dump.
if the final COMMIT is missing or the size is close to the limit you gave, you may run again with higher limit.

InternalSQLiteLibraryMBS.isKeyword(name as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks if an identifier is a keyword.
Example
if InternalSQLiteLibraryMBS.isKeyword("TABLE") then
MsgBox "Table is a keyword"
else
MsgBox "Table is not a keyword!"
end if

InternalSQLiteLibraryMBS.Keywords as String()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries list of keywords.
Example
MsgBox Join(InternalSQLiteLibraryMBS.Keywords,EndOfLine)

InternalSQLiteLibraryMBS.LoadICU as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads ICU libraries now.
Example
If InternalSQLiteLibraryMBS.ICULoaded Then
MessageBox "already loaded"
ElseIf InternalSQLiteLibraryMBS LoadICU Then
MessageBox "loaded successfully"
Else
MessageBox "failed to load the unicode libraries."
End If

Returns true on success.
Normally we load them when SQLite initializes and we then add the ICU extension if we find the library.
Call this function toe explicit load them now.

If MBS Plugin can find International Components for Unicode library files, we can load them and use them for proper unicode handling in SQLite.

InternalSQLiteLibraryMBS.SourceID as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The source code ID.
Example
MsgBox InternalSQLiteLibraryMBS.SourceID

InternalSQLiteLibraryMBS.Use as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Registers the built in SQLite library for use.
Example
if InternalSQLiteLibraryMBS.Use then
MsgBox "Using internal SQLite"
else
MsgBox "Failed, so please use library file."
end if

So instead of having SQL Plugin load sqlite3 shared library from file, we use the one built into this plugin.

InternalSQLiteLibraryMBS.Version as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the version number.
Example
MsgBox InternalSQLiteLibraryMBS.Version

InternalSQLiteLibraryMBS.VersionNumber as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the sqlite version number.
Example
MsgBox str(InternalSQLiteLibraryMBS.VersionNumber)

The items on this page are in the following plugins: MBS SQL Plugin.


The biggest plugin in space...