Package dev.frostlake.functions.scalar.context
package dev.frostlake.functions.scalar.context
-
ClassesClassDescription
AGGREGATION_CONSTRAINT(MIN_GROUP_SIZE => n)— the minimum group size an AGGREGATION POLICY imposes.CURRENT_ACCOUNT() function - returns the account identifier The account ID can be configured in the frostlake.properties file with the key 'account.id'CURRENT_ACCOUNT_NAME() — the account's NAME, configured throughaccount.name.CURRENT_AVAILABLE_ROLES() — a JSON array (as text) of every role the session can use: the active roles, the roles granted to the current user, and the closure of roles granted to those roles.CURRENT_CLIENT() — the identifier of the client library the session is connecting through.CURRENT_IP_ADDRESS() — the client IP address (loopback for the embedded engine).CURRENT_ORGANIZATION_NAME() — the organization the account belongs to, configured throughorganization.name.CURRENT_ROLE_TYPE() — the current role type (always an account-level ROLE here).CURRENT_SCHEMAS() — the active search path as a JSON array of the current schema.CURRENT_SECONDARY_ROLES() — the active secondary roles (none in the embedded engine).CURRENT_STATEMENT() — the text of the statement being executed, from the session.CURRENT_TRANSACTION() — the open transaction id (ids are not exposed; NULL, as Snowflake returns outside a transaction).CURRENT_VERSION() — the version of the running engine, taken fromBuildInfo.version()so it tracks the built artifact.GET_DDL('<object_type>', '<object_name>' [, <use_fully_qualified_names>])— reconstructs aCREATE OR REPLACEstatement for an object from the catalog.INVOKER_ROLE() — the invoking role (the current role in the embedded engine).IS_ROLE_IN_SESSION(name) — TRUE when the named role is the session's current role.JOIN_CONSTRAINT(JOIN_REQUIRED => <boolean>)— what a JOIN POLICY's body returns.LAST_QUERY_ID() function - returns the query ID of the last executed queryLAST_TRANSACTION() — the last transaction id (ids are not exposed; NULL).NEXTVAL function - gets the next value from a sequence Usage: NEXTVAL('sequence_name') or sequence_name.NEXTVALNO_AGGREGATION_CONSTRAINT()— the AGGREGATION POLICY body that imposes nothing.Marks the thread as evaluating a POLICY BODY, for the functions that live only there.PROJECTION_CONSTRAINT(ALLOW => <boolean>)— what a PROJECTION POLICY's body returns.SEQ1 / SEQ2 / SEQ4 / SEQ8 — the row's 0-based ordinal, wrapped to the function's integer width.UUID_STRING() — a random version-4 UUID, and UUID_STRING(namespace, name) — the RFC 4122 version-5 name-based form, which is bit-exact with Snowflake.