Expand description
SQL extension functors for JSE.
Following Python’s functors/sql.py pattern for demonstrating local scope. The SQL module ONLY exports $query, which creates a local environment with local operators ($pattern, $and, $*).
Constants§
Functions§
- pattern
- Generate SQL WHERE condition for a triple pattern. This is the LOCAL version used inside $query, which expands $* to “*”.
- pattern_
to_ triple - Convert $pattern arguments to PostgreSQL jsonb containment triple.
- query
- Generate SQL for multi-pattern query with LOCAL environment. Form: [$query, condition] where condition is an AST expression with local operators ($pattern, $and, $*)
- sql_
functors - SQL module functors - ONLY exports $query. The local operators ($pattern, $and, $*) are NOT globally available. They only exist within the local scope created by $query.
- triple_
to_ sql_ condition - Build SQL WHERE clause for a triple pattern.