Skip to main content

Crate fsqlite_ext_misc

Crate fsqlite_ext_misc 

Source
Expand description

Miscellaneous extensions: generate_series, decimal, uuid (§14.7).

Provides three independent extension families:

  1. generate_series(START, STOP [, STEP]): virtual table that generates a sequence of integers, commonly used in joins and CTEs.

  2. Decimal arithmetic: exact string-based decimal operations that avoid floating-point precision loss. Functions: decimal, decimal_add, decimal_sub, decimal_mul, decimal_cmp.

  3. UUID generation: uuid() generates random UUID v4 strings, uuid_str converts blob to string, uuid_blob converts string to blob.

Structs§

DecimalAddFunc
decimal_add(X, Y) — exact decimal addition.
DecimalCmpFunc
decimal_cmp(X, Y) — compare two decimals, returning -1, 0, or 1.
DecimalFunc
decimal(X) — convert a value to canonical decimal text.
DecimalMulFunc
decimal_mul(X, Y) — exact decimal multiplication.
DecimalSubFunc
decimal_sub(X, Y) — exact decimal subtraction.
GenerateSeriesCursor
Cursor for iterating over a generated integer series.
GenerateSeriesTable
Virtual table that generates a sequence of integers.
UuidBlobFunc
uuid_blob(X) — convert a UUID string to a 16-byte blob.
UuidFunc
uuid() — generate a random UUID v4 string.
UuidStrFunc
uuid_str(X) — convert a 16-byte UUID blob to its string representation.

Functions§

extension_name
register_misc_scalars
Register all miscellaneous scalar functions.