Skip to main content

Module query_function

Module query_function 

Source
Expand description

Recognition of the Origin query functions from the parsed statement.

VERIFY_AUDIT_CHAIN, VERIFY_HASH_CHAIN, BALANCE_AS_OF, TEMPORAL_LOOKUP, VERIFY_BALANCE and CONVERT_CURRENCY_LOOKUP each run as a whole statement: SELECT <FUNC>(<literal>, ...). A lexer gate keeps the extra parse off ordinary statements. It passes only a SELECT whose plain text (outside literals, quoted identifiers and comments) names one of the functions. The parsed AST then decides.

Structs§

BalanceAsOfArgs
BALANCE_AS_OF(collection, key, column, timestamp).
ConvertCurrencyLookupArgs
CONVERT_CURRENCY_LOOKUP(amount, from, to, rate_table, as_of, key_column, rate_column, time_column, precision).
TemporalLookupArgs
TEMPORAL_LOOKUP(table, key_value, as_of, key_column, time_column).
VerifyAuditChainArgs
VERIFY_AUDIT_CHAIN([from_seq [, to_seq]]).
VerifyBalanceArgs
VERIFY_BALANCE(collection, column).
VerifyHashChainArgs
VERIFY_HASH_CHAIN(collection).

Enums§

QueryFunction
One query function.
QueryFunctionCall
One recognized call. Each argument holds the literal’s text: a string’s content (quotes removed, escapes resolved) or a number as written.

Functions§

parse_query_function
Recognize a query-function statement.