Platforms to show: All Mac Windows Linux Cross-Platform

SQLiteFunctionMBS class   New in 24.1

Type Topic Plugin Version macOS Windows Linux iOS Targets
class SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The class for a custom SQLite function implemented in Xojo.
Example
// Create a custom function with a handler function:
Dim f As New SQLiteFunctionMBS
f.name = "SHA256"
f.ArgumentCount = 1
f.Flags = f.kFlagDeterministic OR f.kFlagUTF8 OR f.kFlagInnocuous
// Text encoding UTF8, function is deterministic and can be cached, function is innocuous as it depends only on parameters
AddHandler f.Perform, AddressOf PerformSHA256
functions.Append f // keep reference

You can use this with our InternalSQLiteLibraryMBS module and the SQL classes within MBS Plugin to work on SQLite databases and as extension for SQLiteDatabase in Xojo.

Flags

Constant Value Description
kFlagDeterministic &h800 The function always gives the same output when the input parameters are the same.
kFlagDirectOnly &h80000 The function may only be invoked from top-level SQL, and cannot be used in VIEWs or TRIGGERs nor in schema structures.
kFlagInnocuous &h200000 The function is unlikely to cause problems even if misused. An innocuous function should have no side effects and should not depend on any values other than its input parameters.
kFlagUTF8 1 Specifies text encoding to be UTF-8.

This class has no sub classes.

Some examples using this class:

Blog Entries

Release notes

  • Version 24.1
    • Added SQLiteFunctionMBS class to add custom SQLite functions for SQLite database connections.

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


SQLite3MBS   -   SQLLongBinaryMBS


The biggest plugin in space...