Platforms to show: All Mac Windows Linux Cross-Platform

Back to InternalSQLiteLibraryMBS module.

InternalSQLiteLibraryMBS.Base64ExtensionEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 25.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to enable the Base64 extensions.

This is a SQLite extension for converting in either direction between a (binary) blob and base64 text. Base64 can transit a sane USASCII channel unmolested. It also plays nicely in CSV or written as TCL brace-enclosed literals or SQL string literals, and can be used unmodified in XML-like documents.

This is an independent implementation of conversions specified in RFC 4648, done on the above date by the author (Larry Brasfield) who thereby has the right to put this into the public domain.

The conversions meet RFC 4648 requirements, provided that this C source specifies that line-feeds are included in the encoded data to limit visible line lengths to 72 characters and to terminate any encoded blob having non-zero length.

Length limitations are not imposed except that the runtime SQLite string or blob length limits are respected. Otherwise, any length binary sequence can be represented and recovered. Generated base64 sequences, with their line-feeds included, can be concatenated; the result converted back to binary will be the concatenation of the represented binary sequences.

This SQLite3 extension creates a function, base64(x), which either: converts text x containing base64 to a returned blob; or converts a blob x to returned text containing base64. An error will be thrown for other input argument types.
(Read and Write property)

InternalSQLiteLibraryMBS.CSVExtensionEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 25.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to enable the CSV extensions.

This file contains the implementation of an SQLite virtual table for reading CSV files.

Usage:

.load ./csv
CREATE VIRTUAL TABLE temp.csv USING csv(filename=FILENAME);
SELECT * FROM csv;

The columns are named "c1", "c2", "c3", ... by default. Or the application can define its own CREATE TABLE statement using the schema= parameter, like this:

CREATE VIRTUAL TABLE temp.csv2 USING csv(
filename = "../http.log",
schema = "CREATE TABLE x(date,ipaddr,url,referrer,userAgent)"
);

Instead of specifying a file, the text of the CSV can be loaded using the data= parameter.

If the columns=N parameter is supplied, then the CSV file is assumed to have N columns. If both the columns= and schema= parameters are omitted, then the number and names of the columns is determined by the first line of the CSV input.
(Read and Write property)

InternalSQLiteLibraryMBS.ICUEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether ICU libraries are enabled.

If MBS Plugin can find International Components for Unicode library files, we can load them and use them for proper unicode handling in SQLite.
Default is true to enable them, if possible.
(Read and Write property)

InternalSQLiteLibraryMBS.ICULoaded as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether ICU libraries are loaded.

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

Some examples using this property:

InternalSQLiteLibraryMBS.ICUUsed as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 21.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether ICU libraries have been used.

Once SQLite is initialized, we set this to 1 if we passed the functionality to SQLite.
Starts with false and should later turn true if ICU libraries are loaded and enabled for usage.
(Read only property)

Some examples using this property:

InternalSQLiteLibraryMBS.MemoryHighwater as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries high water memory usage mark.
Example
MsgBox "SQLite uses "+_
str(InternalSQLiteLibraryMBS.MemoryUsed)+_
" bytes and has a high mark of "+_
str(InternalSQLiteLibraryMBS.MemoryHighwater)+" bytes."

(Read only property)

InternalSQLiteLibraryMBS.MemoryUsed as Int64

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 18.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries current memory usage.
Example
MsgBox "SQLite uses "+_
str(InternalSQLiteLibraryMBS.MemoryUsed)+_
" bytes and has a high mark of "+_
str(InternalSQLiteLibraryMBS.MemoryHighwater)+" bytes."

(Read only property)

InternalSQLiteLibraryMBS.Path as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 24.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries file path to the plugin library.

Allows you to query path for plugin library, so you can pass it to SQLite to load as extension.
(Read only property)

InternalSQLiteLibraryMBS.UUIDExtensionEnabled as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property SQL MBS SQL Plugin 25.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to enable the uuid extensions.

This SQLite extension implements functions that handling RFC-4122 UUIDs

Three SQL functions are implemented:

uuid()generate a version 4 UUID as a string
uuid_str(X)convert a UUID X into a well-formed UUID string
uuid_blob(X)convert a UUID X into a 16-byte blob

The output from uuid() and uuid_str(X) are always well-formed RFC-4122 UUID strings in this format:

xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

All of the 'x', 'M', and 'N' values are lower-case hexadecimal digits. The M digit indicates the "version". For uuid()-generated UUIDs, the version is always "4" (a random UUID). The upper three bits of N digit are the "variant". This library only supports variant 1 (indicated by values of N between '8' and 'b') as those are overwhelming the most common. Other variants are for legacy compatibility only.

The output of uuid_blob(X) is always a 16-byte blob. The UUID input string is converted in network byte order (big-endian) in accordance with RFC-4122 specifications for variant-1 UUIDs. Note that network byte order is *always* used, even if the input self-identifies as a variant-2 UUID.

The input X to the uuid_str() and uuid_blob() functions can be either a string or a BLOB. If it is a BLOB it must be exactly 16 bytes in length or else a NULL is returned. If the input is a string it must consist of 32 hexadecimal digits, upper or lower case, optionally surrounded by {...} and with optional "-" characters interposed in the middle. The flexibility of input is inspired by the PostgreSQL implementation of UUID functions that accept in all of the following formats:

  • A0EEBC99-9C0B-4EF8-BB6D-6BB9BD380A11
  • {a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11}
  • a0eebc999c0b4ef8bb6d6bb9bd380a11
  • a0ee-bc99-9c0b-4ef8-bb6d-6bb9-bd38-0a11
  • {a0eebc99-9c0b4ef8-bb6d6bb9-bd380a11}

If any of the above inputs are passed into uuid_str(), the output will always be in the canonical RFC-4122 format:

  • a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11

If the X input string has too few or too many digits or contains stray characters other than {, }, or -, then NULL is returned.
(Read and Write property)

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


The biggest plugin in space...