Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

InternalSQLiteLibraryMBS.CompileOption(index as Integer) as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: 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)
Notes: Index index starting with zero until you get back an empty name.

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.CompileOptionUsed(optionName as String) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: 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)
Notes: If you need a specific option set, please contact MBS support.

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.isKeyword(name as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 18.3 Yes Yes Yes Yes No
Function: 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

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.Keywords as String()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 18.3 Yes Yes Yes Yes No
Function: Queries list of keywords.
Example:
MsgBox Join(InternalSQLiteLibraryMBS.Keywords,EndOfLine)

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.Shell(arguments() as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 16.4 Yes Yes Yes Yes No
Function: Runs a SQLite shell command.
Example:
dim arguments() as string

dim f as FolderItem = SpecialFolder.Desktop.Child("test.sqlite")
dim o as FolderItem = SpecialFolder.Desktop.Child("out.csv")

arguments.Append "sqlite3" // path to app
arguments.Append f.NativePath
arguments.Append "-csv"
arguments.Append "-header"
arguments.Append "-cmd"
arguments.Append ".output "+o.NativePath
arguments.Append "-cmd"
arguments.Append "select * from Documentation;"

dim n as Integer = InternalSQLiteLibraryMBS.Shell(arguments)
Break
Notes:
Using the SQLite library inside the plugin.
For this the plugin includes the code from the SQLite command line tool.
The tool may print to stdout/stderr and could possibly read from stdin.

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.SourceID as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: The source code ID.
Example:
MsgBox InternalSQLiteLibraryMBS.SourceID

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.Use as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: 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
Notes: So instead of having SQL Plugin load sqlite3 shared library from file, we use the one built into this plugin.

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.Version as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: Queries the version number.
Example:
MsgBox InternalSQLiteLibraryMBS.Version

Feedback, Comments & Corrections

InternalSQLiteLibraryMBS.VersionNumber as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method SQL MBS SQL Plugin 15.2 Yes Yes Yes Yes No
Function: Queries the sqlite version number.
Example:
MsgBox str(InternalSQLiteLibraryMBS.VersionNumber)

Feedback, Comments & Corrections

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




Links
MBS Xojo tutorial videos