Platforms to show: All Mac Windows Linux Cross-Platform

Back to SQLiteFunctionMBS class.

SQLiteFunctionMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.
Example
Dim f As New SQLiteFunctionMBS
f.name = "SHA256"

Please keep a reference to the function in a global array to avoid it being destroyed.

SQLiteFunctionMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The destructor.

SQLiteFunctionMBS.ResultBlob(data as MemoryBlock)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a BLOB value to SQLite.

We have three variants, so you can pass string, MemoryBlock or ptr.

See also:

Some examples using this method:

SQLiteFunctionMBS.ResultBlob(data as ptr, size as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a BLOB value to SQLite.

We have three variants, so you can pass string, MemoryBlock or ptr.

See also:

SQLiteFunctionMBS.ResultBlob(text as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a BLOB value to SQLite.
Example
me.ResultBlob "Hello World"

We have three variants, so you can pass string, MemoryBlock or ptr.

See also:

SQLiteFunctionMBS.ResultDouble(value as Double)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a double value back to SQLite.
Example
Sub Perform(ArgumentCount as Integer, Arguments() as Variant) Handles Perform
#Pragma BackgroundTasks False
#Pragma BoundsChecking False
#Pragma StackOverflowChecking False

// square function
dim a as double = arguments(0).DoubleValue
ResultDouble a * a

End Sub

SQLiteFunctionMBS.ResultError(ErrorMessage as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an error message for the function call.
Example
Sub Perform(ArgumentCount as Integer, Arguments() as Variant) Handles Perform
#Pragma BackgroundTasks False
#Pragma BoundsChecking False
#Pragma StackOverflowChecking False

dim v as string = arguments(0)
if v.length = 0 then
ResultError "Please pass text"
ResultErrorCode 12345 // custom error code
else
ResultText v + v
end if
End Sub

Sets error code to 1. Use ResultErrorCode to change this.

Some examples using this method:

SQLiteFunctionMBS.ResultErrorCode(ErrorCode as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Sets error code for the function call.

SQLiteFunctionMBS.ResultInteger(value as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an integer value back to SQLite.
Example
Sub Perform(ArgumentCount as Integer, Arguments() as Variant) Handles Perform
#Pragma BackgroundTasks False
#Pragma BoundsChecking False
#Pragma StackOverflowChecking False

// square function
dim a as Integer = arguments(0).IntegerValue
ResultInteger a * a

End Sub

SQLiteFunctionMBS.ResultNull

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a null value back to SQLite.
Example
Sub Perform(ArgumentCount as Integer, Arguments() as Variant) Handles Perform
#Pragma BackgroundTasks False
#Pragma BoundsChecking False
#Pragma StackOverflowChecking False

// return NULL value
ResultNull

End Sub

SQLiteFunctionMBS.ResultText(text as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a string value back to SQLite.
Example
Sub Perform(ArgumentCount as Integer, Arguments() as Variant) Handles Perform
#Pragma BackgroundTasks False
#Pragma BoundsChecking False
#Pragma StackOverflowChecking False

ResultText "Hello World"

End Sub

SQLiteFunctionMBS.ResultZeroBlob(Length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a zero filled BLOB value back to SQLite.

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


The biggest plugin in space...