diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 000000000..853b888a0 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,25 @@ +# Changesets + +This directory drives EQL's release versioning. `@cipherstash/eql`'s version is +the **single source of truth** for the whole EQL release identity `V`: the SQL +surface (`eql-V`), the Rust crate (`eql-bindings-vV`), and the npm package +(`@cipherstash/eql@V`) are all released at `V`, derived from the version +changesets computes here (see `scripts/sync-lockstep-versions.mjs`). + +Because SQL, the crate, and npm are generated from one catalog at one commit, +**every releasable change needs a changeset** — including SQL-only or crate-only +changes — so that `V` moves for all three. + +Add one with `pnpm changeset`, or hand-write a `.changeset/.md`: + +```md +--- +'@cipherstash/eql': minor # patch | minor | major +--- + +User-facing description of what changed and why. +``` + +Prereleases (alpha/beta/rc) use changesets pre-mode; see +`docs/development/releasing.md`. See +https://github.com/changesets/changesets for the tool docs. diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 000000000..428ac5988 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.3/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.changeset/eql-239-2.md b/.changeset/eql-239-2.md new file mode 100644 index 000000000..64314a7d6 --- /dev/null +++ b/.changeset/eql-239-2.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Per-domain `MIN` / `MAX` aggregates for the encrypted-domain family.** `eql_v3.min(eql_v3._ord)` / `eql_v3.max(eql_v3._ord)` (and the `_ord_ore` twin) are generated for every ord-capable scalar variant, giving type-safe extrema on domain-typed columns — comparison routes through the variant's `<` / `>` operator (ORE block term, no decryption). The aggregates are declared `PARALLEL = SAFE` with a combine function (the state function itself — min/max are associative), so PostgreSQL can use partial/parallel aggregation on large `GROUP BY` workloads. Why: the new domain types previously had no equivalent of the composite-type aggregates. The existing `eql_v2.min(eql_v2_encrypted)` / `eql_v2.max(eql_v2_encrypted)` aggregates are **retained** and continue to work on `eql_v2_encrypted` columns; the per-domain aggregates are additive and coexist with them. ([#239](https://github.com/cipherstash/encrypt-query-language/pull/239)) diff --git a/.changeset/eql-239-3.md b/.changeset/eql-239-3.md new file mode 100644 index 000000000..4f1611ecd --- /dev/null +++ b/.changeset/eql-239-3.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**`=` / `<>` on `eql_v2.ore_block_u64_8_256` now declare a `COMMUTATOR`, so equality joins over the ORE term no longer raise.** Both operators set `COMMUTATOR` to themselves (equality and inequality are symmetric, so each is its own commutator). Why: without it the planner raised `could not find commutator for operator` the first time an `ore_block_u64_8_256` equality was used as a join / mergejoin qualifier (e.g. via the inlined `eql_v3.integer_ord_ore` equality wrappers, since the operators carry `MERGES`). This only enables previously-erroring join plans — it cannot change which rows match or their ordering. ([#239](https://github.com/cipherstash/encrypt-query-language/pull/239)) diff --git a/.changeset/eql-239.md b/.changeset/eql-239.md new file mode 100644 index 000000000..e41ebbee5 --- /dev/null +++ b/.changeset/eql-239.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3` encrypted-domain schema, with the `integer` family as its first member.** Encrypted-domain type families now live in a new, additional `eql_v3` schema (the existing `eql_v2` schema is unchanged — it keeps the core types/operators and stays the documented public API). Four jsonb-backed domains for encrypted `integer` columns: `eql_v3.integer` (storage-only), `eql_v3.integer_eq` (`=` / `<>` via HMAC), and `eql_v3.integer_ord` / `eql_v3.integer_ord_ore` (also `<` `<=` `>` `>=` via ORE block terms). Supported comparisons resolve to inlinable wrappers; the native `jsonb` operator surface reachable through domain fallback is blocked (raises rather than silently mis-resolving). Each domain's `CHECK` requires the EQL envelope (`v`, `i`), the ciphertext (`c`), and the variant's index term(s), and pins the payload version (`VALUE->>'v' = '2'`, matching `eql_v2._encrypted_check_v`) — so a missing key or wrong-version payload is rejected on insert or cast rather than surfacing later at query time. Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors, not an operator class on the domain. The extractors return the searchable-encrypted-metadata index-term types `eql_v3.hmac_256` / `eql_v3.ore_block_256`, which `eql_v3` owns directly (see the self-contained `eql_v3` schema entry below). Why: a type-safe, per-capability encrypted integer column instead of the untyped `eql_v2_encrypted`, namespaced under its own schema. This is the reference scalar implementation for the generated domain family. ([#239](https://github.com/cipherstash/encrypt-query-language/pull/239), supersedes [#225](https://github.com/cipherstash/encrypt-query-language/pull/225)) diff --git a/.changeset/eql-241-2.md b/.changeset/eql-241-2.md new file mode 100644 index 000000000..9323d9147 --- /dev/null +++ b/.changeset/eql-241-2.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**The `eql_v3` ORE block comparator now orders ciphertexts of any block count, not just 8.** `eql_v3.compare_ore_block_256_term` derives the block count `N` from the term length (`octet_length = 49·N + 16`) instead of hardcoding 8, so encrypted types whose native ORE width exceeds 8 blocks — `numeric` (14) and `timestamp` (12) — order, range-query, `ORDER BY`, and `MIN`/`MAX` correctly instead of silently mis-ordering. Malformed terms (length not `49·N + 16` for `N ≥ 1`) now raise instead of returning a bogus comparison. The self-contained `eql_v3` SEM type was renamed `eql_v3.ore_block_u64_8_256 → eql_v3.ore_block_256` to reflect that it is width-agnostic (the `eql_v2` type is unchanged). No effect on existing 8-block types (a no-op for `N = 8`). ([#241](https://github.com/cipherstash/encrypt-query-language/issues/241), [#276](https://github.com/cipherstash/encrypt-query-language/pull/276)) diff --git a/.changeset/eql-241.md b/.changeset/eql-241.md new file mode 100644 index 000000000..c2c17591b --- /dev/null +++ b/.changeset/eql-241.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.numeric` encrypted-domain type family (ordered).** Four jsonb-backed domains for encrypted `numeric` / `decimal` columns — `eql_v3.numeric` (storage-only), `eql_v3.numeric_eq` (`=` / `<>` via HMAC), and `eql_v3.numeric_ord` / `eql_v3.numeric_ord_ore` (also `<` `<=` `>` `>=`, `MIN` / `MAX` via 14-block ORE) — generated from the `numeric` row in `eql-scalars::CATALOG`. cipherstash encrypts `Plaintext::Decimal` at native 14-block ORE width; ordering matches `rust_decimal::Decimal` ordering exactly (equivalent scales such as `1` and `1.0` collide, like Postgres `numeric`). Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors. Why: a type-safe, ordered encrypted decimal column, the first scalar to exercise an ORE term wider than 8 blocks. ([#241](https://github.com/cipherstash/encrypt-query-language/issues/241), [#276](https://github.com/cipherstash/encrypt-query-language/pull/276)) diff --git a/.changeset/eql-243.md b/.changeset/eql-243.md new file mode 100644 index 000000000..f52ab8229 --- /dev/null +++ b/.changeset/eql-243.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.smallint` encrypted-domain type family.** Four jsonb-backed domains for encrypted `smallint` columns — `eql_v3.smallint` (storage-only), `eql_v3.smallint_eq` (`=` / `<>` via HMAC), and `eql_v3.smallint_ord` / `eql_v3.smallint_ord_ore` (also `<` `<=` `>` `>=` via ORE block terms, with `MIN` / `MAX` aggregates) — generated from the `smallint` row in `eql-scalars::CATALOG` by the same materializer as the `eql_v3.integer` reference. Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors, not an operator class on the domain. Why: a type-safe, per-capability encrypted `smallint` column, proving the scalar generator generalizes beyond the `integer` reference. ([#243](https://github.com/cipherstash/encrypt-query-language/pull/243)) diff --git a/.changeset/eql-252.md b/.changeset/eql-252.md new file mode 100644 index 000000000..d8128084e --- /dev/null +++ b/.changeset/eql-252.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Scalar encrypted-domain types are now defined in a Rust catalog, not TOML manifests; the Python codegen toolchain is removed.** Adding a scalar encrypted-domain type (`integer`, `bigint`, …) is now one row in `eql-scalars::CATALOG` (`crates/eql-scalars/src/lib.rs`) instead of authoring `tasks/codegen/types/.toml`. `mise run build` regenerates the gitignored SQL surface via `cargo run -p eql-codegen` (Rust, std-only) rather than the Python generator. The catalog row's `Fixture` list is the single source of truth for that type's plaintext fixtures: the SQLx test matrix reads it directly as a compile-time-materialised const (`eql_scalars::INT4_VALUES` / `INT2_VALUES`, `ScalarType::FIXTURE_VALUES`), so there is no longer a generated, committed `tests/sqlx/src/fixtures/_values.rs` — a Rust source of truth no longer round-trips through generated Rust. The shipped SQL is unchanged — `release/*.sql` is byte-identical across the cutover — so there is no change for callers installing EQL; this only affects contributors who extend the scalar domain families. The `python` mise tool, the `pytest`-based `test:codegen` (now `cargo test -p eql-scalars -p eql-codegen`), the per-type `mise run codegen:domain` tasks, and the per-type `tests/sqlx/snapshots/_matrix_tests.txt` baselines (collapsed into one catalog-reconciled `tests/sqlx/snapshots/matrix_tests.txt`) are gone. Why: a single compiler-validated source of truth shared by the generator and the SQLx test harness, and one fewer toolchain in the build/test path — building and testing EQL no longer needs Python (Python remains only for the separate docs-markdown tooling). ([#252](https://github.com/cipherstash/encrypt-query-language/pull/252)) diff --git a/.changeset/eql-253.md b/.changeset/eql-253.md new file mode 100644 index 000000000..7c1068fe1 --- /dev/null +++ b/.changeset/eql-253.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.bigint` encrypted-domain type family.** Four jsonb-backed domains for encrypted `bigint` columns — `eql_v3.bigint` (storage-only), `eql_v3.bigint_eq` (`=` / `<>` via HMAC), and `eql_v3.bigint_ord` / `eql_v3.bigint_ord_ore` (also `<` `<=` `>` `>=` via ORE block terms, with `MIN` / `MAX` aggregates) — generated from the `bigint` row in `eql-scalars::CATALOG` by the same materializer as the `eql_v3.integer` reference. Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors, not an operator class on the domain. Why: a type-safe, per-capability encrypted `bigint` column, extending the scalar generator across the full 64-bit integer width. ([#253](https://github.com/cipherstash/encrypt-query-language/pull/253)) diff --git a/.changeset/eql-255.md b/.changeset/eql-255.md new file mode 100644 index 000000000..dda254d65 --- /dev/null +++ b/.changeset/eql-255.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Self-contained `eql_v3` schema + standalone `release/cipherstash-encrypt.sql` installer.** The `eql_v3` encrypted-domain surface no longer depends on `eql_v2` at runtime: it now owns its own copies of the searchable-encrypted-metadata (SEM) index-term types — `eql_v3.hmac_256` and `eql_v3.ore_block_256` (with its btree operator class) — so the `eql_v3.eq_term` / `eql_v3.ord_term` extractors return `eql_v3` types and no `eql_v2.` appears anywhere in the v3 SQL. The whole v3 surface relocated under a single `src/v3/` tree (`src/v3/sem/` for the hand-written SEM types, `src/v3/scalars/` for the generated domain families). A new build variant ships the `eql_v3` schema on its own as `release/cipherstash-encrypt.sql`, installable into a database with no `eql_v2` present; a CI gate greps that artifact and its dependency closure to keep it `eql_v2`-free. Why: a clean foundation for the per-scalar encrypted-domain model to stand alone, ahead of it replacing the `eql_v2_encrypted` composite column type. This is additive — a new schema and a new artifact — and leaves `eql_v2` byte-for-byte unchanged. ([#255](https://github.com/cipherstash/encrypt-query-language/pull/255)) diff --git a/.changeset/eql-256.md b/.changeset/eql-256.md new file mode 100644 index 000000000..8ceef6bf3 --- /dev/null +++ b/.changeset/eql-256.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.date` encrypted-domain type family.** Four jsonb-backed domains for encrypted `date` columns — `eql_v3.date` (storage-only), `eql_v3.date_eq` (`=` / `<>` via HMAC), and `eql_v3.date_ord` / `eql_v3.date_ord_ore` (also `<` `<=` `>` `>=` via ORE block terms, with `MIN` / `MAX` aggregates) — generated from the `date` row in `eql-scalars::CATALOG` by the same materializer as the `eql_v3.integer` reference. Plaintexts encrypt under the `date` cast and compare via the same ORE block terms as the integer scalars (ORE is plaintext-agnostic — dates order like integers). Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors, not an operator class on the domain. Why: the first **non-integer ordered** scalar encrypted-domain type — a type-safe, per-capability encrypted `date` column — proving the generator and SQLx test matrix generalize beyond fixed-width integers. ([#256](https://github.com/cipherstash/encrypt-query-language/pull/256)) diff --git a/.changeset/eql-257.md b/.changeset/eql-257.md new file mode 100644 index 000000000..bbf8db9ef --- /dev/null +++ b/.changeset/eql-257.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.timestamp` encrypted-domain type family (ordered).** Four jsonb-backed domains for encrypted `timestamp` columns — `eql_v3.timestamp` (storage-only), `eql_v3.timestamp_eq` (`=` / `<>` via HMAC), and `eql_v3.timestamp_ord` / `eql_v3.timestamp_ord_ore` (also `<` `<=` `>` `>=`, `MIN` / `MAX` via 12-block ORE) — generated from the `timestamp` row in `eql-scalars::CATALOG` by the same materializer as the `eql_v3.date` family. Values are **UTC-normalized** (cipherstash has no timezone-preserving type): plaintexts encrypt under the `timestamp` cast, so the stored value is a UTC instant (Postgres `timestamp with time zone`) wearing the SQL-standard name `timestamp` to match the cipherstash cast / `ColumnType::Timestamp` / `Plaintext::Timestamp` convention. Ordering works because the `eql_v3` ORE block comparator now derives its block count from the ciphertext width (see the comparator entry below) instead of assuming 8. Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors, not an operator class on the domain. ([#257](https://github.com/cipherstash/encrypt-query-language/pull/257)) diff --git a/.changeset/eql-260.md b/.changeset/eql-260.md new file mode 100644 index 000000000..6363cb050 --- /dev/null +++ b/.changeset/eql-260.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.text` encrypted-domain family (`text`, `text_eq`, `text_match`, `text_ord`, `text_ord_ore`, `text_search`).** Adds equality (`=` / `<>` via HMAC), match (`@>` / `<@` via a new self-contained `eql_v3.bloom_filter` SEM index term), and ORE ordering (`<` `<=` `>` `>=`, `min` / `max`) for encrypted text, at parity with EQL v2 text — generated from the `text` row in `eql-scalars::CATALOG` by the same materializer as the `eql_v3.integer` reference. `text` is the first scalar to add a new index `Term` (`Bloom`) and the first non-integer, unbounded ordered kind (lexicographic pivots, hand-written `impl ScalarType`). The combined **`text_search`** domain carries all three capabilities in one type — `=` / `<>` via HMAC, `<` `<=` `>` `>=` / `min` / `max` via ORE, and `@>` / `<@` via bloom filter. Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` / `eql_v3.match_term` extractors, not an operator class on the domain. Why: brings searchable encrypted text to the namespaced, `eql_v2`-free `eql_v3` surface. Match is exposed as bloom-filter containment on the `text_match` / `text_search` domains — deliberately *not* SQL `LIKE` (no wildcard/anchoring; probabilistic ngram containment) — and never backs equality. **Equality on the ordered text domains (`text_ord`, `text_ord_ore`) and on `text_search` always routes `=` / `<>` through `hm` (exact HMAC), never the ORE term — ORE is not exact-equality for text** (integer ordered domains keep exact ORE equality, which is lossless for them). ([#260](https://github.com/cipherstash/encrypt-query-language/pull/260)) diff --git a/.changeset/eql-262.md b/.changeset/eql-262.md new file mode 100644 index 000000000..0286c6559 --- /dev/null +++ b/.changeset/eql-262.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**An empty ORE term (`ob: []`) is now rejected by the ORE-bearing `eql_v3` domains instead of silently corrupting ordered queries.** Encrypting the empty string `""` as ordered text produces an empty ORE term (`ob: []`) — the only value that does — and previously an `""` row silently dropped out of `ORDER BY`, was wrongly returned by `eql_v3.max`, and threw off range-query counts (the `eql_v3.ore_block_256` extractor collapsed `ob: []` to NULL index terms). The ORE-bearing domains (`_ord` / `_ord_ore`, and text `_search`) now carry a `CHECK` requiring `ob` to be a non-empty array, so casting or inserting an empty-`ob` payload into an ordered column fails loudly with a check violation (SQLSTATE `23514`) rather than producing an unorderable row. This affects only the empty string in an ordered column: every non-empty string and every fixed-width scalar (int / date / numeric / float) always produces a non-empty `ob`. Storage and equality are unaffected — `""` can still be encrypted into a storage-only (`eql_v3.text`) or equality (`eql_v3.text_eq`) column with a real ciphertext (`c`) and HMAC (`hm`). As defense-in-depth for any path that bypasses the domain (e.g. a comparator composite built directly), the comparator also orders a zero-term ORE composite before every non-empty value (empty sorts first); a genuine SQL `NULL` row is unchanged and keeps standard `NULLS FIRST` / `NULLS LAST` semantics (the extractor is `STRICT`). ([#262](https://github.com/cipherstash/encrypt-query-language/issues/262)) diff --git a/.changeset/eql-267-2.md b/.changeset/eql-267-2.md new file mode 100644 index 000000000..fd33f59e5 --- /dev/null +++ b/.changeset/eql-267-2.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.min` / `eql_v3.max` aggregates over `eql_v3.jsonb_entry`.** SteVec document entries extracted at a selector (`doc -> 'sel'`) can now be aggregated like ordered scalars: `eql_v3.min(doc -> 'sel')` / `eql_v3.max(...)` return the entry with the smallest / largest ordered leaf. Ordering routes through the entry's `oc` (CLLW ORE) term via `eql_v3.ore_cllw` — the same comparator the entry `<` / `<=` / `>` / `>=` operators use, not the scalar Block-ORE `ord_term`. Only `oc`-carrying entries are orderable: an entry without an `oc` term (`eql_v3.ore_cllw` returns NULL) is non-orderable and is ignored by the aggregate — the same way the `eql_v3.ore_cllw` btree NULL-filters such rows — so a mix of `oc`-carrying and `oc`-less entries yields the extremum of the orderable subset rather than a corrupted result. Declared `PARALLEL = SAFE` with a combine function (the state function itself), so partial / parallel aggregation is available on large `GROUP BY` workloads. Why: brings encrypted-JSONB entry ordering to parity with the scalar encrypted-domain families' `MIN` / `MAX`, and lets the shared scalar behaviour matrix cover entry aggregation. Additive — the document and entry comparison surface is otherwise unchanged. ([#267](https://github.com/cipherstash/encrypt-query-language/pull/267)) diff --git a/.changeset/eql-267.md b/.changeset/eql-267.md new file mode 100644 index 000000000..12e401e9f --- /dev/null +++ b/.changeset/eql-267.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3` encrypted-JSONB (SteVec) document type.** A self-contained encrypted-JSONB surface in the `eql_v3` schema: the storage domain `eql_v3.json` plus `eql_v3.jsonb_entry` (a single sv element) and `eql_v3.jsonb_query` (a containment needle). Encrypted JSON documents are searchable without decryption via document containment (`@>`, `<@`), field/array access (`->`, `->>`, `jsonb_path_query` / `_exists` / `_query_first`, `jsonb_array_length` / `_elements` / `_elements_text`), entry equality (`=`, `<>`) on extracted leaves, and entry-level ordered range (`<`, `<=`, `>`, `>=`) on ordered leaves via CLLW ORE (`eql_v3.ore_cllw`). Comparisons are leaf-level only: root-document `=`, `<>`, `<`, `<=`, `>`, `>=` are blocked (they raise rather than falling through to native whole-`jsonb` comparison). Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ore_cllw` extractors (entry equality / ordering) and `eql_v3.to_ste_vec_query(col)::jsonb jsonb_path_ops` GIN (containment); ordered leaves get a default btree opclass on `eql_v3.ore_cllw`. Every other native `jsonb` operator reachable through domain fallback (`?`, `?|`, `?&`, `@?`, `@@`, `#>`, `#>>`, `-`, `#-`, `||`, and the root comparisons above) is blocked — it raises rather than silently routing to plaintext-jsonb semantics. Note: because `eql_v3.json` is a `jsonb` domain, selector/operand literals must be typed (`col -> 'sel'::text` — the CipherStash Proxy interface passes typed parameters); a *bare untyped* literal (`col -> 'sel'`) resolves to the native `jsonb` operator instead of the encrypted one (PostgreSQL reduces the domain to its base type for unknown-typed literals), and the same caveat applies to the native-jsonb blockers — see the "Typed operands" caveat in `docs/reference/json-support.md`. The whole surface owns its SEM index-term types (`eql_v3.hmac_256`, `eql_v3.ore_cllw`) and has no `eql_v2` dependency (CI-gated by `test:self_contained_v3` and the standalone `release/cipherstash-encrypt.sql` installer). Why: a type-safe, searchable encrypted JSONB document column namespaced under `eql_v3`, complementing the scalar encrypted-domain families. The existing `eql_v2` SteVec surface on `eql_v2_encrypted` is unchanged. ([#267](https://github.com/cipherstash/encrypt-query-language/pull/267)) diff --git a/.changeset/eql-293.md b/.changeset/eql-293.md new file mode 100644 index 000000000..afe04e3f8 --- /dev/null +++ b/.changeset/eql-293.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Property-based tests for the `eql_v3` encrypted scalar domains.** A harness of three suites asserts SQL operator results agree with a plaintext oracle across a generated input space: a pure-Rust **catalog** suite (no database) over the term/scalar catalog, a **fixture** suite that runs an all-pairs oracle over the committed real-ciphertext fixtures (the curated catalog values per type), and an **e2e** suite (gated behind the `proptest-e2e` cargo feature) that batch-encrypts freshly generated plaintexts end-to-end through ZeroKMS each run. Beyond the operator oracles, the fixture suite drives **function-double** oracles — the generated `eql_v3.eq`/`neq`/`lt`/`lte`/`gt`/`gte` functions across all three overloads (domain–domain, domain–jsonb, jsonb–domain) — plus **term-extractor identity** (`eq_term`==`hm`, `ord_term`==`ob`) and an example-based bloom **match** smoke for the text `_match` domain. Covers the equality (`=`/`<>`) and ordering (`<`/`<=`/`>`/`>=`, `ord_term` sort order) operator and function oracles plus NULL/blocker/CHECK edge cases, across every fixtured scalar (`smallint`/`integer`/`bigint`/`date`/`timestamp`/`numeric`/`text`). Equality across two independent encryptions of one value is exercised credential-free by the fixture suite via committed per-type *doubles* fixtures (each plaintext encrypted twice — `property::cross_ciphertext`), through both the `hm` (`_eq`) and ORE (`_ord`/`_ord_ore`) equality paths, and additionally by the e2e suite via fresh duplicate plaintexts each run. Why: the prior matrix exercised fixed pivots only; property tests over the whole fixture set catch operator/oracle disagreements across the value space, and the e2e suite adds defence in depth by re-encrypting every run rather than pinning a frozen ciphertext snapshot. ([#293](https://github.com/cipherstash/encrypt-query-language/pull/293)) diff --git a/.changeset/eql-295.md b/.changeset/eql-295.md new file mode 100644 index 000000000..603f95e44 --- /dev/null +++ b/.changeset/eql-295.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.boolean` encrypted-domain type family (storage-only / encryption-only).** A single jsonb-backed domain for encrypted `boolean` columns — `eql_v3.boolean` — generated from the `boolean` row in `eql-scalars::CATALOG`. Unlike every other scalar family, `boolean` is **encryption-only**: it carries no SEM index term and exposes **no** `_eq` / `_ord` domains, so the value is encrypted at rest and decrypted by the proxy but is **not searchable server-side**. This is deliberate — a two-value column has so little cardinality that any searchable index (even HMAC equality) would trivially leak the plaintext distribution. Every comparison / containment / path operator reachable through domain fallback (`=`, `<>`, `<`, `<=`, `>`, `>=`, `@>`, `<@`, `->`, `->>`, …) is blocked (raises rather than silently routing to plaintext-`jsonb` semantics); the domain `CHECK` still requires the EQL envelope (`v`, `i`), the ciphertext (`c`), and pins the payload version (`VALUE->>'v' = '2'`). The encrypted payload is `{v,i,c}` only — no `hm` / `ob` / `bf` term. Why: lets callers encrypt a low-cardinality boolean column at rest without offering a server-side search surface that would leak it; the first **storage-only** member of the generated scalar encrypted-domain family. ([#295](https://github.com/cipherstash/encrypt-query-language/pull/295)) diff --git a/.changeset/eql-299.md b/.changeset/eql-299.md new file mode 100644 index 000000000..02a33c8d6 --- /dev/null +++ b/.changeset/eql-299.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.real` / `eql_v3.double` encrypted-domain type families (ordered).** Four jsonb-backed domains each for encrypted `real` / `double precision` columns — `eql_v3.real` / `eql_v3.double` (storage-only), `eql_v3._eq` (`=` / `<>` via HMAC), and `eql_v3._ord` / `eql_v3._ord_ore` (also `<` `<=` `>` `>=`, `MIN` / `MAX` via 8-block ORE) — generated from the `real` / `double` rows in `eql-scalars::CATALOG` by the same materializer as the `eql_v3.integer` reference. Both widths encrypt through a single f64 crypto path (`Plaintext::Float`): a `real` is widened to f64 before encryption (exact and monotonic), so `real` vs `double` is purely a Postgres-surface distinction — the `hm` equality term is byte-identical and the ORE terms compare equal under the `eql_v3.ore_block_256` operator (the ORE term itself is probabilistic — a fresh per-ciphertext nonce — so it is never byte-identical, even same-width; ordering is decided by the ORE comparator, not by raw bytes). Ordering is correct for all non-NaN values via the standard monotonic IEEE-754 byte mapping (`f64::ENCODED_LEN == 8`, same as `bigint`); `-0.0` canonicalizes to `+0.0` and `±Inf` order correctly. NaN is unordered and unspecified in the encoder — it can be encrypted and stored but is not given a meaningful comparison guarantee (any NaN rejection is client-side). Index via a functional index on the `eql_v3.eq_term` / `eql_v3.ord_term` extractors, not an operator class on the domain. Why: a type-safe, per-capability encrypted IEEE-754 float column, closing the gap for `real` / `double` columns that had no v3 equivalent (the v3 `numeric` family is arbitrary-precision decimal, not binary float). ([#299](https://github.com/cipherstash/encrypt-query-language/pull/299)) diff --git a/.changeset/eql-307.md b/.changeset/eql-307.md new file mode 100644 index 000000000..ad78eed04 --- /dev/null +++ b/.changeset/eql-307.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**The standalone `eql_v3` installer and uninstaller (`cipherstash-encrypt.sql`, `cipherstash-encrypt-uninstall.sql`) are now attached to GitHub Releases.** The self-contained `eql_v3` surface was already built by the release pipeline but never published, so it could not be installed from a release. The release workflow now uploads both files as build artifacts and attaches them to the published release, enabling `eql_v3` (alpha) installs straight from a GitHub Release. ([#307](https://github.com/cipherstash/encrypt-query-language/pull/307)) diff --git a/.changeset/eql-336.md b/.changeset/eql-336.md new file mode 100644 index 000000000..3bacf6b6c --- /dev/null +++ b/.changeset/eql-336.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3` encrypted-JSONB (SteVec) payload bindings — Rust, TypeScript, and JSON Schema.** JSONB is now a first-class member of `eql-domains::CATALOG`, so its payload types ship as canonical, drift-gated bindings alongside the scalar families: `SteVecDocument` (`eql_v3.json`), `SteVecEntry` (`eql_v3.jsonb_entry`), `SteVecQuery` (`eql_v3.jsonb_query`), plus the shared untagged `SteVecTerm` (`{hm} | {oc}`), `SteVecQueryEntry`, and the `OreCllw` / `Selector` term newtypes — under `crates/eql-bindings/src/v3/jsonb.rs`, `bindings/v3/*.ts`, and `schema/v3/*.json`, drift-gated by `types:check`. A new `Shape` discriminant on each catalog domain lets scalar-only consumers filter and all-family consumers branch; the SteVec struct bodies and the encrypted-JSONB SQL surface stay hand-written (the generator skips SteVec shapes but still drives the bindings inventory). The bindings are parsed against a real generated SteVec ciphertext row in the SQLx suite, tying them to real crypto and the SQL domain CHECK. Why: the SteVec wire types were the only `eql_v3` payloads without generated, drift-gated bindings — protocol consumers (`cipherstash-client`, `protect-ffi`, CipherStash Proxy) can now depend on canonical, catalog-checked encrypted-JSONB types. ([#336](https://github.com/cipherstash/encrypt-query-language/pull/336)) diff --git a/.changeset/eql-340-2.md b/.changeset/eql-340-2.md new file mode 100644 index 000000000..df4d681d9 --- /dev/null +++ b/.changeset/eql-340-2.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': major +--- + +**The `eql_v3` tier's JSON envelope version is now `v: 3` (was `v: 2`).** Every `eql_v3` domain CHECK — the generated scalar families and the hand-written `eql_v3.json` SteVec document domain — now pins `VALUE->>'v' = '3'`, and the canonical payload bindings (`SchemaVersion` in `eql-bindings`, the emitted TypeScript alias, and the JSON Schema `const`) accept exactly `3`, rejecting the legacy `2` at the type boundary. The v3 tier previously carried the v2 wire version for continuity; with the tier now diverging from the legacy wire (the new `op` term), the envelope version matches the schema generation. The legacy `eql_v2` wire documentation (`docs/reference/schema/eql-payload-v2.*.schema.json` and its validation tests) is unchanged and stays `v: 2`. **Compatibility:** payloads produced for the v3 tier must now carry `v: 3` — a cipherstash-client that emits `v: 2` cannot insert into `eql_v3` domain columns until it is updated to emit the v3 envelope. See [U-001](docs/upgrading/v3.0.md#u-001-eql_v3-payloads-carry-v-3) in the 3.0 upgrade guide. ([#340](https://github.com/cipherstash/encrypt-query-language/pull/340)) diff --git a/.changeset/eql-340.md b/.changeset/eql-340.md new file mode 100644 index 000000000..c59a31569 --- /dev/null +++ b/.changeset/eql-340.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3._ord_ope` encrypted-domain variants — CLLW-OPE ordering across every ordered scalar family.** Every ordered scalar family (`int2`, `int4`, `int8`, `date`, `timestamp`, `numeric`, `text`, `float4`, `float8`) gains an `_ord_ope` domain backed by a new CLLW-OPE index term: the `op` payload key carries a hex-encoded OPE ciphertext that is order-preserving under plain byte comparison, so ordering (`<` `<=` `>` `>=`, `MIN` / `MAX`) reduces to hex-decode + native bytea comparison via the new self-contained SEM type `eql_v3_internal.ope_cllw` — no custom N-block comparison protocol, unlike the `_ord` / `_ord_ore` block-ORE domains. Integer-family `_ord_ope` domains carry `[op]` alone (OPE equality is lossless for them); `text_ord_ope` carries `[hm, op]` so `=` / `<>` stay exact via HMAC (OPE over text is not equality-lossless, matching `text_ord`). Index via a functional btree index on the new `eql_v3.ord_ope_term(col)` extractor (its `eql_v3_internal.ope_cllw` return type is a domain over `bytea`, inheriting the native comparison operators and DEFAULT btree opclass — the whole comparison chain stays inlinable, so the index engages structurally), not an operator class on the domain. This revives the v2.2-era `opf` / `opv` order-preserving terms under the modern single `op` wire key that cipherstash-client re-emits for ordered scalars (CIP-3280). Rust / TypeScript / JSON Schema payload bindings (`Int4OrdOpe`, `TextOrdOpe`, … with the `OpeCllw` term newtype) ship alongside, drift-gated by `types:check`. `bool` stays storage-only, and the combined `text_search` domain deliberately stays `[hm, ob, bf]` — adding `op` to its CHECK would widen it for no new operator capability (OPE's operators are already covered via `Ore`); with the pinned client now emitting `op` (0.38.1, CIP-3348) this is a standing design decision to revisit separately. Why: OPE terms are natively index-sortable, giving ordered encrypted columns a cheaper comparison path than the block-ORE protocol. ([#340](https://github.com/cipherstash/encrypt-query-language/pull/340)) diff --git a/.changeset/eql-341.md b/.changeset/eql-341.md new file mode 100644 index 000000000..8e1ba0f02 --- /dev/null +++ b/.changeset/eql-341.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_bindings::from_v2` — EQL v2.3 → v3 wire payload conversion.** The `eql-bindings` crate gains a converter from the v2.3 payloads cipherstash-client emits (reference contract: `docs/reference/schema/eql-payload-v2.3.schema.json`) into `eql_v3` payloads: `from_v2(v2, target)` for stored scalar (`k:"ct"`) and SteVec (`k:"sv"`) payloads, `from_v2_query(v2, target)` for the jsonb containment needle (→ the `eql_v3.jsonb_query` shape, normalized like `eql_v3.to_ste_vec_query`), and `is_v3_payload` as a lenient envelope probe for format sniffing. The target domain is explicit input — every v2 index term is optional on the wire, so capability cannot be inferred — and `TargetDomain::parse` resolves names against the catalog-generated inventory (via the new `DomainType::term_json_keys`), so accepted names and required term keys cannot drift from `eql-domains::CATALOG`. Conversion copies `i`/`c` verbatim, emits `v: 3`, copies exactly the term keys the target requires (failing closed with `MissingTerm` otherwise), drops `k` and unneeded terms (SteVec documents instead keep `k: "sv"` — the v3 document models the form discriminator), and reinterprets `bf` from v2's unsigned bit positions into the signed `smallint[]` representation (`32768..=65535` wrap negative; beyond is `BloomOutOfRange`); SteVec `sv` entry order is preserved verbatim because `sv[0]` carries the record ciphertext downstream decryption depends on. Every output is validated through the target's binding struct before being returned, and representative conversions are validated against the published JSON Schemas in `crates/eql-bindings/schema/v3/` by the `test:schema` suite. Scalar QUERY targets return `UnsupportedQueryTarget`: no v3 scalar query wire shape exists (every scalar domain CHECK requires `c`), and none is invented ahead of the mapper redesign. Why: protect-ffi, the benches, and potentially Proxy need a single, fail-closed upgrade path from the v2 wire while cipherstash-client still emits it. ([#341](https://github.com/cipherstash/encrypt-query-language/pull/341)) diff --git a/.changeset/eql-3442.md b/.changeset/eql-3442.md new file mode 100644 index 000000000..1ed557f57 --- /dev/null +++ b/.changeset/eql-3442.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Query-operand domains renamed to a `query_` prefix AND moved into the `eql_v3` schema (CIP-3442).** Every scalar query twin introduced by the query-operand surface (above) is now `eql_v3.query_` — `query_integer_eq`, `query_text_ord`, `query_timestamp_ord_ope`, … — and the encrypted-JSONB containment needle follows the same convention: `public.jsonb_query` is now `eql_v3.query_jsonb`. Predicates cast accordingly (`WHERE col = $1::eql_v3.query_integer_eq`; `WHERE doc @> $1::eql_v3.query_jsonb`), the `eql-bindings` `DomainType::sql_domain` strings, `QueryPayload::parse` domain names, and the exported JSON Schema file names (`schema/v3/query_.json`) all carry the new names, and `from_v2_query` / `from_v2_query_typed` target them. This supersedes the `_query` naming in the earlier `[Unreleased]` entries; the old names shipped only in 3.0.0 pre-releases. **Why the prefix:** alphabetical type listings interleaved never-a-column-type query operands with the actual column types (`integer_eq` next to `integer_eq_query`); the shared `query_` prefix sorts every query operand together. **Why the schema move:** query operands are never valid column types, so they don't belong in `public` — the column-type namespace whose survive-schema-drop rationale (dropping EQL-owned schemas must not drop application columns) doesn't apply to them. In `eql_v3` they are versioned with the rest of the public API surface, are uninstalled with it (a column misusing a query domain is dropped by the uninstaller's CASCADE — pinned by the uninstall suite), and casting a query operand requires the same `USAGE ON SCHEMA eql_v3` a caller already needs for the extractors and comparison wrappers. See [U-002](docs/upgrading/v3.0.md#u-002-query-operand-domains-are-eql_v3query_name) in the 3.0 upgrade guide. ([CIP-3442](https://linear.app/cipherstash/issue/CIP-3442)) diff --git a/.changeset/eql-3468.md b/.changeset/eql-3468.md new file mode 100644 index 000000000..017fc1e47 --- /dev/null +++ b/.changeset/eql-3468.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Non-superuser installs (cloud-hosted Supabase, most managed Postgres) now disable the ORE-backed domains loudly instead of installing them half-working.** `CREATE OPERATOR CLASS` requires superuser, so the installer has always attempted the ORE operator class and skipped it on `insufficient_privilege` — but the ORE-carrying domains (`_ord` / `_ord_ore` on every ordered scalar, `text_search`, and their `eql_v3.query_*` twins) still installed, leaving a trap: `<` / `>` comparisons ran as unindexable seq scans while `CREATE INDEX ... (eql_v3.ord_term(col))` and bare `ORDER BY` failed with opaque Postgres errors. The installer now capability-detects the skip (by checking `pg_opclass` after the attempt) and poisons all 38 ORE-carrying domains with an always-raising `CHECK` constraint: the first value cast or inserted into one — including `NULL` — raises `feature_not_supported` (SQLSTATE `0A000`) naming the domain and pointing at the platform-supported alternatives (`_ord_ope` for indexed ordering via CLLW-OPE, `_eq` for equality, `text_match` for pattern match). The constraint is added `NOT VALID`, so ORE data written under an earlier superuser install stays readable and re-running the installer over it succeeds — only new casts and inserts raise. Superuser installs are unchanged: the operator class is created and nothing is poisoned. The check is install-time, so installing as superuser keeps full ORE support regardless of which role queries later. ([CIP-3468](https://linear.app/cipherstash/issue/CIP-3468/do-not-install-ore-types-on-cloud-hosted-supabase)) diff --git a/.changeset/eql-3469-stevec-ope.md b/.changeset/eql-3469-stevec-ope.md new file mode 100644 index 000000000..f7159e674 --- /dev/null +++ b/.changeset/eql-3469-stevec-ope.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': major +--- + +**SteVec (encrypted JSONB) ordering switched from CLLW-ORE to CLLW-OPE: sv entries carry `hm` XOR `op`, and entry ordering extracts `eql_v3.ord_ope_term(entry)` — native bytea order, no operator class.** The `eql_v3_internal.ore_cllw` composite type, its per-byte comparator, six operators, and superuser-only `DEFAULT FOR TYPE` btree operator class are removed, along with `eql_v3.ore_cllw(entry)` / `eql_v3.has_ore_cllw(entry)`; the domain CHECKs on `public.json` / `public.jsonb_entry` / `eql_v3.query_jsonb` now validate `hm` XOR `op` and reject `oc`-bearing payloads. Why: `CREATE OPERATOR CLASS` requires superuser, so SteVec entry ordering was the last EQL surface that could not index on cloud-hosted Supabase / managed Postgres — the CLLW-OPE term is the same `op` / `eql_v3_internal.ope_cllw` bytea domain the scalar `_ord_ope` domains use, the whole comparison chain is inlinable SQL, and a plain functional btree index on `eql_v3.ord_ope_term(doc -> ''::text)` engages structurally on any install. Stored `oc` documents must be re-encrypted with an OPE-mode client (`eql-bindings`' `from_v2` fails closed with the new `UnconvertibleOreTerm` on `oc` entries; the bindings' `SteVecTerm` gains an `OpeCllw { op }` variant in place of `OreCllw { oc }`). See [U-004](docs/upgrading/v3.0.md#u-004-stevec-ordering-terms-are-cllw-ope-op) for the migration recipe. ([CIP-3469](https://linear.app/cipherstash/issue/CIP-3469/switch-jsonbstevec-support-from-cllw-ore-to-ope)) diff --git a/.changeset/eql-349.md b/.changeset/eql-349.md new file mode 100644 index 000000000..9b9957aae --- /dev/null +++ b/.changeset/eql-349.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_bindings::DomainPayload` + `from_v2_typed` — typed domain payloads.** The `eql-bindings` crate gains a catalog-generated `DomainPayload` enum spanning every stored-payload domain (one variant per catalog family/domain pair mapping to its binding struct — `IntegerEq`, `TextSearch`, … — plus `SteVecDocument` for `eql_v3.json`) and `from_v2_typed(v2, target)`, the typed twin of `from_v2` that returns the enum variant instead of a shape-erased `serde_json::Value`. The enum is generated by `eql-codegen bindings` alongside the family structs and inventory (drift-gated by `types:check`), serializes exactly as the inner struct (`#[serde(untagged)]`, Serialize-only — `serde_json::to_value(&from_v2_typed(v2, t)?)` equals `from_v2(v2, t)?` byte-for-byte, pinned in tests), and deliberately has no `Deserialize`: cross-token payloads are byte-identical on the wire, so a variant is only constructible from a known target domain (`DomainPayload::parse`), never inferred from bytes. Both conversion entry points share one path and the final strict parse through the target's binding struct still happens exactly once (`from_v2` validates and discards; `from_v2_typed` keeps it). No new TypeScript/JSON-Schema artifacts — the exported wire surface is unchanged. Why: protect-ffi had to store converted payloads type-erased (`V3(serde_json::Value)`) because no typed value was obtainable from eql-bindings; it can now hold `V3(DomainPayload)` without re-parsing or a hand-written enum that drifts as the catalog grows. ([#349](https://github.com/cipherstash/encrypt-query-language/pull/349)) diff --git a/.changeset/eql-350.md b/.changeset/eql-350.md new file mode 100644 index 000000000..243b7ac34 --- /dev/null +++ b/.changeset/eql-350.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_bindings::QueryPayload` + `from_v2_query_typed` — typed query payloads (eql-bindings 0.4.0).** The `eql-bindings` crate gains a `QueryPayload` enum spanning every v3 QUERY payload shape and `from_v2_query_typed(v2, target)`, the typed twin of `from_v2_query` that returns the enum variant instead of a shape-erased `serde_json::Value` — completing the typed-conversion surface started by `DomainPayload`/`from_v2_typed` (storage payloads, see below). Today the enum has exactly one variant, `SteVec(SteVecQuery)` (the `eql_v3.jsonb_query` containment needle — the only query conversion that exists): a scalar query value is a SINGLE index term (one Ore / Ope / Bloom / Hm term value, not a stored envelope), and no v3 scalar-query wire shape exists yet, so the scalar-term variants are deliberately absent and both entry points keep failing closed with `UnsupportedQueryTarget` rather than inventing a shape ahead of the eql-mapper redesign. Unlike `DomainPayload` (generated — its variant set IS the catalog), `QueryPayload` is hand-written next to the equally hand-written SteVec types: its variants are term-shaped, anchored to the stable hand-written `Term`-level surface (`terms.rs`), not to catalog rows a generator walks. Serialize-only (`#[serde(untagged)]` — `serde_json::to_value(&from_v2_query_typed(v2, t)?)` equals `from_v2_query(v2, t)?` byte-for-byte, pinned in tests), no `Deserialize` (a variant is only constructible from a known domain via `QueryPayload::parse`, never inferred from bytes), and no ts-rs/schemars derives (the enum adds no wire shape, so the exported TS/JSON-Schema artifacts are unchanged). Both query entry points share one conversion path and the final strict parse happens exactly once (`from_v2_query` validates and discards; `from_v2_query_typed` keeps it). Why: protect-ffi can now hold converted containment needles typed instead of as `serde_json::Value`, adopting after the eql-bindings 0.4.0 release. ([#350](https://github.com/cipherstash/encrypt-query-language/pull/350)) diff --git a/.changeset/eql-353.md b/.changeset/eql-353.md new file mode 100644 index 000000000..2210fb2bd --- /dev/null +++ b/.changeset/eql-353.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**`ore_block_256` opclass-path helpers converted from `LANGUAGE sql` to plpgsql — restores v2-level ordered-scan performance.** `eql_v3_internal.jsonb_array_to_bytea_array` and `eql_v3_internal.jsonb_array_to_ore_block_256` were `LANGUAGE sql` for inlineability, but their only caller chain (`ore_block_256(val)`, plpgsql, feeding the btree operator class) can never inline SQL functions — every compared value paid the per-call SQL-function executor instead, measured at 3.5× the per-call cost of the logic-identical plpgsql form. Release benchmarks put the end-to-end cost at +43% on ORE ordered index scans vs EQL 2.3 (`0.513 → 0.736 ms` at 1M rows) and +36% on the composite bloom+ORE-order shape (`16.6 → 22.7 ms`); with the plpgsql form both scenarios return to (or beat) the v2 numbers — `0.553 ms` and `13.97 ms` respectively, validated A→B→A on a live 1M-row bench database. Semantics are unchanged: NULL/non-array inputs still return NULL, and the empty-`ob` COALESCE (#262) is preserved. The `eql-inline-critical` markers are retained so the pin_search_path pass keeps both functions unpinned — a `SET search_path` clause on plpgsql forces per-call configuration switching in the same hot path. Full attribution and experiment data: cipherstash/benches#23 (`v3-regressions-report.md`). ([#353](https://github.com/cipherstash/encrypt-query-language/issues/353)) diff --git a/.changeset/eql-354.md b/.changeset/eql-354.md new file mode 100644 index 000000000..bac36dab0 --- /dev/null +++ b/.changeset/eql-354.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**`eql_v3.jsonb_entry` CHECK inlined; `jsonb_query` validator converted to plpgsql — removes SQL-function-executor overhead from the per-query needle casts.** Domain constraints cannot inline SQL functions, so `jsonb_entry`'s function-call CHECK paid ~18 µs on every cast — the needle cast in every `field_eq` query was the ENTIRE +19% v2→v3 regression on that scenario (in-DB 0.011 → 0.029 ms/query with identical `eq_term` costs; cipherstash/benches#23). The `jsonb_entry` CHECK now mirrors the validator body inline, with a leading `VALUE IS NULL OR` preserving STRICT NULL-passes semantics (equivalence pinned over a payload corpus by `jsonb_check::jsonb_entry_check_matches_validator`). `jsonb_query`'s CHECK cannot be inlined — validating sv elements needs a subquery, which CHECK constraints forbid — so `is_valid_ste_vec_query_payload` is plpgsql instead (cached plan vs per-call SQL-function executor; the #353 finding), guarded by `jsonb_check::jsonb_query_validator_is_plpgsql`. The `eql_v3.json` document CHECK — part of the documented privilege contract — is unchanged; `docs/reference/permissions.md` now notes the `jsonb_entry` cast requires no internal grant. ([#354](https://github.com/cipherstash/encrypt-query-language/issues/354)) diff --git a/.changeset/eql-373.md b/.changeset/eql-373.md new file mode 100644 index 000000000..07a33b9d2 --- /dev/null +++ b/.changeset/eql-373.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**Scalar query-operand surface — term-only query domains and operators (CIP-3432).** Every term-bearing scalar domain now has a paired `public._query` domain (`integer_eq_query`, `integer_ord_ope_query`, `text_search_query`, …): the **index-terms-only** query operand `{v, i, }` — the storage envelope minus the ciphertext `c`, enforced by the domain CHECK (a `c`-bearing operand is rejected). Each supported operator gains a `CREATE OPERATOR` binding `(storage_domain, _query)` (and its commutator), so `WHERE col = $1::public.integer_eq_query` / `col < $1::public.integer_ord_query` resolve against a term-only operand — a public, supported SQL entry point that never requires shipping a decryptable ciphertext in the query. **Why:** query operands travel through PostgREST query strings, URL logs, proxies, and SQL logs; they should carry index terms only, not a full storage envelope. On the client side, `eql_bindings::QueryPayload` is now **catalog-generated** with a variant per query twin (superseding the interim hand-written single-variant enum below), and `from_v2_query` / `from_v2_query_typed` now convert scalar targets by hoisting the required terms out of the v2 payload (storage-only domains, having no operators, still return `UnsupportedQueryTarget`). End-to-end conformance is proven against fresh ZeroKMS encryption: an independently-encrypted term-only operand matches exactly the equal (or, for ORE, correctly-ordered) stored rows. ([#373](https://github.com/cipherstash/encrypt-query-language/pull/373)) diff --git a/.changeset/eql-375.md b/.changeset/eql-375.md new file mode 100644 index 000000000..91e9bc29f --- /dev/null +++ b/.changeset/eql-375.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**The `eql_v3` installer now runs on managed Postgres without superuser — the two SEM btree operator classes install conditionally.** `release/cipherstash-encrypt.sql` created `eql_v3_internal.ore_block_256_operator_class` and `eql_v3_internal.ore_cllw_ops` with bare `CREATE OPERATOR FAMILY` / `CREATE OPERATOR CLASS`, which PostgreSQL restricts to superusers. On Supabase (and most hosted Postgres), the installer runs as a non-superuser role, so the whole single-transaction install aborted at the first `CREATE OPERATOR FAMILY` with `must be superuser to create an operator family` (SQLSTATE `42501`) — leaving `eql_v3` uninstallable there despite the surface being otherwise managed-Postgres compatible. Both `operator_class.sql` files now wrap their family+class creation in a `DO` block that catches `insufficient_privilege` and continues with a `NOTICE`, so one artifact installs everywhere: superuser installs (self-managed Postgres, the SQLx test matrix) create the default btree opclass as before; non-superuser installs skip it and fall back to the order-preserving (OPE) ordering domains, whose extractor return types carry a native btree opclass and need no custom class. Any non-privilege error from the DDL still propagates. Verified end-to-end against live Supabase (skips, install commits, 0 opclasses) and a local superuser cluster (creates both opclasses). Also corrects the stale in-file comments claiming these files were excluded by a `**/*operator_class.sql` build glob — the v3 build (`tasks/build.sh`) globs `src/v3` wholesale and has no such exclusion. ([#375](https://github.com/cipherstash/encrypt-query-language/pull/375)) diff --git a/.changeset/eql-377.md b/.changeset/eql-377.md new file mode 100644 index 000000000..8aacfa2d0 --- /dev/null +++ b/.changeset/eql-377.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`COMMENT ON DOMAIN` on every `eql_v3` encrypted domain type.** The v3 encrypted domains are `jsonb`-backed, so introspection that resolves a domain to its base type renders them as a bare `jsonb` with no hint they are EQL-encrypted, searchable columns (most visibly the Supabase table editor, whose grid reads `postgres-meta`'s base-type-resolved `format`). Every `public` encrypted domain now carries a one-line `COMMENT ON DOMAIN`, so the type is self-documenting via `psql \dD`, `obj_description(oid,'pg_type')`, and any tool that reads `pg_type` comments (Supabase's `types` introspection surfaces exactly this). No behaviour change — comments only. Scalar-domain comments are **code-generated**: a new `DomainBlock.comment` field derives the capability text from the domain's terms (`Term::operators_for_terms`), so it tracks the generated CHECK/operator surface and can't drift. Comments are deliberately terse so they fit one line in type pickers (e.g. Supabase Studio): `text_match` → "EQL encrypted text (containment)", an ORE `_ord` → "EQL encrypted numeric (equality, ordering)", storage-only → "EQL encrypted numeric (storage only)". The DO-block templates emit the comment after each idempotent `CREATE DOMAIN`, re-applied on reinstall so comment-text changes propagate. The `_query` operand twins get a matching "EQL query operand (…)" comment, and the three hand-written jsonb SteVec domains (`json` / `jsonb_entry` / `jsonb_query`) get hand-written comments. ([#377](https://github.com/cipherstash/encrypt-query-language/pull/377), closes [#376](https://github.com/cipherstash/encrypt-query-language/issues/376)) diff --git a/.changeset/eql-internal-schema.md b/.changeset/eql-internal-schema.md new file mode 100644 index 000000000..a33c1ad79 --- /dev/null +++ b/.changeset/eql-internal-schema.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': major +--- + +**Internal `eql_v3` index-term types and plumbing moved to a new `eql_v3_internal` schema; `eql_v3` stays the public API — including a callable function equivalent for every operator.** `eql_v3_internal` holds INTERNAL objects only: the SEM index-term **types** (`hmac_256`, `bloom_filter`, `ore_block_256`(+`_term`), `ore_cllw`) and their support functions/operators/opclasses, the generated unsupported-operator **blockers** and the shared `encrypted_domain_unsupported_*` / `jsonb_blocked_*` helpers, the **aggregate state functions**, and the encrypted-JSONB CHECK validators + `jsonb_array_to_bytea_array`. `eql_v3` keeps the full public surface: the column-type domains (all scalar families + `eql_v3.json` / `eql_v3.jsonb_entry` / `eql_v3.jsonb_query`), query operators, index extractors (`eq_term` / `ord_term` / `match_term` and the jsonb access functions), `min` / `max` aggregates, the `json → jsonb_query` cast, `version()`, `lints()`, **and — crucially — the operator-backing comparison wrappers** (`eq`/`neq`/`lt`/`lte`/`gt`/`gte`/`contains`/`contained_by`) plus the jsonb containment helpers (`jsonb_contains`/`jsonb_contained_by`/`jsonb_array`/`ste_vec_contains`). Why the wrappers stay public: they are the function-form equivalent of every supported operator, and not every platform can invoke custom operators — Supabase/PostgREST exposes the database through an auto-generated REST/RPC layer that calls **functions**, not operators (`WHERE col = $1` is not expressible there, but `eql_v3.eq(col, $1)` is). Only index-term-only TYPES need to be hidden (Supabase Studio's Table Builder type picker lists every type in every non-hidden schema); the callable wrappers do not, so they remain public. A new gate, `tests/sqlx/tests/v3_operator_equivalents_tests.rs`, fails CI if any supported operator's backing wrapper is hidden in `eql_v3_internal`. **Design decision — EQL never grants permissions automatically.** The installer issues no `GRANT`/`REVOKE`; access to `eql_v3` (and, where a public operator/aggregate dispatches into it, `eql_v3_internal`) is strictly opt-in — a deployment grants `USAGE` / `EXECUTE` deliberately (see [`docs/reference/permissions.md`](docs/reference/permissions.md)). This is a breaking schema-layout change for existing installs: audit each runtime role's grants against `docs/reference/permissions.md`. diff --git a/.changeset/eql-language-binding-releases.md b/.changeset/eql-language-binding-releases.md new file mode 100644 index 000000000..5a1a097e3 --- /dev/null +++ b/.changeset/eql-language-binding-releases.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**First-class language-binding releases: the `@cipherstash/eql` npm package and crate-bundled SQL.** EQL v3 now ships its canonical wire types as a TypeScript npm package (`@cipherstash/eql`, under `packages/eql/`) alongside the existing Rust `eql-bindings` crate — both generated from `eql-domains::CATALOG` (the TS package is derived from the crate's `bindings/` + `schema/` outputs, drift-gated by `mise run typescript:check`). Each language package bundles the **exact** self-contained SQL installer/uninstaller it was generated against: the crate exposes it as `eql_bindings::sql` (`INSTALL_SQL`, `UNINSTALL_SQL`, `RELEASE_MANIFEST_JSON`), and the npm package via its `./sql` / `./sql/*` subpath exports (plus a `releaseManifest` and `readInstallSql()`/`readUninstallSql()` helpers) — so a consumer pins wire types and the matching DDL together. Prereleases can now cut all three artifacts under one identity — the SQL + docs GitHub release, the crate (crates.io, tag `eql-bindings-v`), and the npm package (tag `eql-typescript-v`): a single unified `release.yml` workflow publishes them in lockstep from an explicit `chore(release): ...` commit on the `eql_v3` branch (npm directly, the crate dispatched through `release-plz.yml` for crates.io Trusted Publishing). Why: type information was lost at every hop from EQL to downstream tools; a versioned, single-source package per language (bundled with the SQL it targets) removes hand-copying and installer/type drift. diff --git a/.changeset/eql-lints-schema-placement.md b/.changeset/eql-lints-schema-placement.md new file mode 100644 index 000000000..a9685b90a --- /dev/null +++ b/.changeset/eql-lints-schema-placement.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.lints()` gains a `schema_placement` category.** `SELECT * FROM eql_v3.lints() WHERE category = 'schema_placement'` reports, at severity `error`, any naked composite or enum TYPE that has been created in the public `eql_v3` schema — an internal index-term type (e.g. `ore_block_256_term`) that belongs in `eql_v3_internal`. Why: the `eql_v3` / `eql_v3_internal` split exists to keep index-term-only types out of the Supabase Table Builder type picker; this lint makes a placement regression self-detecting at runtime (the CI-side net is the placement invariant in `tests/sqlx/tests/v3_public_surface_tests.rs`). A clean install reports zero `schema_placement` rows. diff --git a/.changeset/eql-sole-installer.md b/.changeset/eql-sole-installer.md new file mode 100644 index 000000000..b75c295fc --- /dev/null +++ b/.changeset/eql-sole-installer.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': major +--- + +**The self-contained `eql_v3` installer is now the sole release artifact, shipped under the canonical name `release/cipherstash-encrypt.sql` (+ `cipherstash-encrypt-uninstall.sql`).** The combined, Supabase, and Protect build variants are removed; `mise run build` now produces only the `eql_v3` surface, written under the canonical name that the combined build previously used — so existing install URLs keep working. Why: with `eql_v2` removed (see below), there is a single SQL surface to build, install, and test. diff --git a/.changeset/eql-v2-removed.md b/.changeset/eql-v2-removed.md new file mode 100644 index 000000000..3a0ba2c9b --- /dev/null +++ b/.changeset/eql-v2-removed.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': major +--- + +**The `eql_v2` schema and its entire surface are removed — EQL now ships only the self-contained `eql_v3` encrypted-domain surface.** Dropped with no `eql_v3` replacement: the `eql_v2_encrypted` composite column type and its operators (`=`, `<>`, `~~`/`~~*` `LIKE`/`ILIKE`, containment `@>`/`<@`, ORE comparisons), database-side configuration management (`eql_v2_configuration`, `add_search_config`, `add_column`, `migrate_config`, `diff_config`, `create_encrypted_columns`), the `encryptindex` migration machinery, boolean operators on the encrypted column type, operator-class-on-column indexing, and `GROUP BY` / `grouped_value` on the encrypted column type. Searchable-encryption capabilities (equality, ordered range, `MIN`/`MAX`, encrypted-JSONB document containment and path access) are all provided by the `eql_v3` encrypted-domain families and document surface. Why: `eql_v3` is now fully self-contained — it owns its own SEM index-term types (`eql_v3.hmac_256`, `eql_v3.ore_block_256`, `eql_v3.ore_cllw`, `eql_v3.bloom_filter`) and installs into a database with no `eql_v2` present — and the encryption client (CipherStash Proxy / ProtectJS) now owns the configuration model the database-side `eql_v2` functions previously provided. This is a major (3.0.0) public-API break; callers using the `eql_v2` schema migrate to the `eql_v3` encrypted-domain types. The user-facing reference documentation and tutorials have been migrated to teach only the `eql_v3` surface — the `eql_v2`-based examples, the database-side configuration guide, and the operator-class-on-column indexing recipe are removed. No per-capability migration guide is provided for the dropped capabilities (they have no `eql_v3` equivalent). diff --git a/.changeset/eql-version-fn.md b/.changeset/eql-version-fn.md new file mode 100644 index 000000000..adb3125ad --- /dev/null +++ b/.changeset/eql-version-fn.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': minor +--- + +**`eql_v3.version()` — version introspection on the self-contained `eql_v3` surface.** `SELECT eql_v3.version()` returns the installed EQL version as bare-semver text (e.g. `'3.0.0'`, or `'DEV'` for local builds); the same value is published as the `eql_v3` schema comment, so it is also readable via `obj_description('eql_v3'::regnamespace)`. The version is baked in at build time from the release tag via `mise run build --version` (now passed as prefix-stripped semver by both release workflows). This replaces the removed `eql_v2.version()` (dropped with the rest of the `eql_v2` surface — see Removed): the "which EQL is installed?" probe moves to `eql_v3`, consistent with the schema namespace move. Why: the self-contained `eql_v3` surface had no version-introspection point after `eql_v2` was removed. diff --git a/.changeset/npm-latest-pre-ga.md b/.changeset/npm-latest-pre-ga.md new file mode 100644 index 000000000..1fe195698 --- /dev/null +++ b/.changeset/npm-latest-pre-ga.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': patch +--- + +**npm prereleases publish under the `latest` dist-tag until 3.0.0 ships.** Until the 3.0.0 final, the alphas are the package's only release line, so `npm install @cipherstash/eql` should resolve to the newest alpha instead of whichever version last happened to hold `latest`. Once 3.0.0 GA is published, prereleases return to their channel dist-tag (`alpha`/`beta`/`rc`) and `latest` stays on finals (`PRE_GA_LATEST` in `packages/eql/scripts/npm-publish.mjs`). diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..2198e93fe --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,49 @@ +{ + "mode": "pre", + "tag": "alpha", + "initialVersions": { + "@cipherstash/eql": "3.0.0-alpha.2" + }, + "changesets": [ + "eql-239-2", + "eql-239-3", + "eql-239", + "eql-241-2", + "eql-241", + "eql-243", + "eql-252", + "eql-253", + "eql-255", + "eql-256", + "eql-257", + "eql-260", + "eql-262", + "eql-267-2", + "eql-267", + "eql-293", + "eql-295", + "eql-299", + "eql-307", + "eql-336", + "eql-340-2", + "eql-340", + "eql-341", + "eql-3442", + "eql-3468", + "eql-3469-stevec-ope", + "eql-349", + "eql-350", + "eql-353", + "eql-354", + "eql-373", + "eql-375", + "eql-377", + "eql-internal-schema", + "eql-language-binding-releases", + "eql-lints-schema-placement", + "eql-sole-installer", + "eql-v2-removed", + "eql-version-fn", + "npm-latest-pre-ga" + ] +} diff --git a/.changeset/prefix-public-types-eql-v3.md b/.changeset/prefix-public-types-eql-v3.md new file mode 100644 index 000000000..d1cbd7ac9 --- /dev/null +++ b/.changeset/prefix-public-types-eql-v3.md @@ -0,0 +1,5 @@ +--- +'@cipherstash/eql': major +--- + +**Every public-schema EQL type name now carries an `eql_v3_` prefix** (CIP-3472): the encrypted-domain column types are now `public.eql_v3_integer`, `public.eql_v3_text_eq`, `public.eql_v3_json`, `public.eql_v3_jsonb_entry`, and so on — declare columns as `age public.eql_v3_integer_ord` instead of `age public.integer_ord`. EQL domains no longer shadow PostgreSQL built-in type names (`integer`, `text`, `json`), so unqualified references can never resolve to the wrong type through `search_path`, and each EQL version now owns a distinct column-type namespace, which lets multiple EQL versions coexist in one database during future version migrations. Query-operand domains are unchanged (`eql_v3.query_integer_eq`, `eql_v3.query_jsonb`) — the `eql_v3` schema already versions them. The bindings follow the SQL: `DomainType::sql_domain`/`domain()` report the prefixed names, `DomainPayload::parse` / `TargetDomain::parse` accept `"eql_v3_integer_eq"`-style names (bare names are no longer recognised), and the published JSON Schema `$id`s and file names now use the prefixed names (`…/eql/v3/eql_v3_integer_eq.json`). diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..cb53a3516 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,29 @@ +# Generated artifacts. Marked `linguist-generated` so GitHub collapses them in +# pull-request / commit diffs by default and excludes them from repository +# language statistics. They are machine-generated and CI-verified — never +# hand-edited — so the collapsed default keeps reviews focused on source. +# +# - src/v3/scalars/*/*_{types,functions,operators,aggregates}.sql : the +# generated scalar SQL surface, regenerated by `cargo run -p eql-codegen` +# and drift-gated by `mise run codegen:parity`. (The hand-written +# src/v3/scalars/functions.sql and *_extensions.sql are NOT generated and +# are deliberately left unmarked.) +# - tests/sqlx/snapshots/*_expanded.rs : `cargo expand` snapshots of the +# scalar matrix macros (the start_line/end_line churn is location drift). +# - tests/sqlx/snapshots/matrix_tests*.txt : matrix-coverage inventory pinned +# by `mise run test:matrix:inventory`. +# +# This is a GitHub display hint only: the files remain tracked, diffable, and +# reviewable on demand, and nothing about Git, CI, or the build changes. +src/v3/scalars/*/*_types.sql linguist-generated +src/v3/scalars/*/*_functions.sql linguist-generated +src/v3/scalars/*/*_operators.sql linguist-generated +src/v3/scalars/*/*_aggregates.sql linguist-generated +tests/sqlx/snapshots/*_expanded.rs linguist-generated +tests/sqlx/snapshots/matrix_tests*.txt linguist-generated + +# Append-only changelog: every user-facing PR adds an entry under `[Unreleased]`, +# so concurrent branches conflict on the same region constantly. `merge=union` +# keeps BOTH sides' added lines instead of raising a conflict. Order/dedupe is +# tidied by hand at release time, when `[Unreleased]` is cut into a version. +CHANGELOG.md merge=union diff --git a/.github/ISSUE_TEMPLATE/docs-feedback.yml b/.github/ISSUE_TEMPLATE/docs-feedback.yml index 255febd2a..49af6b6fb 100644 --- a/.github/ISSUE_TEMPLATE/docs-feedback.yml +++ b/.github/ISSUE_TEMPLATE/docs-feedback.yml @@ -35,7 +35,7 @@ body: id: terms attributes: label: Code of conduct - description: By submitting this issue, you agree to follow our [Code of conduct](https://github.com/cipherstash/proxy/blob/main/CODE_OF_CONDUCT.md). + description: By submitting this issue, you agree to follow our [Code of conduct](https://github.com/cipherstash/encrypt-query-language/blob/main/CODE_OF_CONDUCT.md). options: - label: I agree to follow this project's Code of conduct required: true diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml new file mode 100644 index 000000000..b6a2e7da2 --- /dev/null +++ b/.github/actionlint.yaml @@ -0,0 +1,4 @@ +# actionlint does not know repo-specific / provider-specific runner labels. +self-hosted-runner: + labels: + - blacksmith-16vcpu-ubuntu-2204 diff --git a/.github/workflows/README.md b/.github/workflows/README.md new file mode 100644 index 000000000..608df3cad --- /dev/null +++ b/.github/workflows/README.md @@ -0,0 +1,216 @@ +# CI workflows + +This directory holds every GitHub Actions workflow for EQL. This README is the +authoritative **inventory** (what workflows exist and when they fire) and +**coverage map** (which job runs which checks, and where each test suite +actually runs). + +- [Workflow inventory](#workflow-inventory) +- [`test-eql.yml` — the merge gate](#test-eqlyml--the-merge-gate) +- [Coverage map: job → task → what it checks](#coverage-map-job--task--what-it-checks) +- [Where each test suite runs](#where-each-test-suite-runs) +- [Known gaps](#known-gaps) + +--- + +## Workflow inventory + +| Workflow | Triggers | What it does | Gates merge? | +|---|---|---|---| +| **test-eql.yml** | `pull_request`, `merge_group`, `workflow_dispatch` | Full test/lint/validate matrix; the one required check | **Yes** — `ci-required` | +| **release-postgres-eql-image.yml** | `workflow_dispatch` (dispatched by `release.yml` on production finals) | Build & push the Postgres+EQL Docker image to GHCR | No | +| **release.yml** | `push: main`, `push: eql_v3`, `workflow_dispatch` | Unified release entrypoint: production on `main`, prerelease on `eql_v3` when the commit is an explicit `chore(release): ...` marker | No | +| **release-plz.yml** | `push: main`, `workflow_dispatch` | Publish the `eql-bindings` crate to crates.io (Trusted Publishing) + open the release PR | No | +| **bench-eql.yml** | `push: main` (paths), `schedule` 02:00 UTC daily, `workflow_dispatch` | `test:bench` (bench cargo feature). **Never runs on PRs** | No | +| **macro-expand-eql.yml** | `schedule` 03:00 UTC daily, `workflow_dispatch` | Regenerate the integer `cargo expand` matrix snapshot; needs pinned nightly | **No — explicitly non-blocking** | +| **rebuild-docs.yml** | `push: tags` | Fire a docs-site rebuild webhook | N/A | + +Only **test-eql.yml** gates merges. Bench regressions and stale `cargo expand` +snapshots surface on the nightly schedule, not on the PR that caused them. + +### Two release tag families + +There are two independent release flows keyed on distinct git tags: + +- **`eql-`** (e.g. `eql-3.0.0`) — the EQL **SQL surface** release, cut + by `release.yml` (production on `main`, prerelease on `eql_v3`), which builds + and attaches the SQL + docs in-run. On production finals `release.yml` also + dispatches `release-postgres-eql-image.yml` (the Postgres+EQL Docker image). +- **`eql-bindings-v`** (e.g. `eql-bindings-v0.1.0`) — the **`eql-bindings` + Rust crate** release, cut automatically by `release-plz.yml` when its release + PR merges. Publishes to crates.io only. + +The three SQL-surface workflows explicitly **exclude** `eql-bindings-*` tags +(`!startsWith(...'eql-bindings')` guards; a `!eql-bindings-*` filter in +`rebuild-docs.yml`) so a crate release never triggers an SQL build, Docker +image, or docs-site rebuild. `eql-bindings` is tested on every PR by the +`rust-crates` job (`mise run test:crates` plus a `cargo publish --dry-run` +packaging gate); every other workspace crate is `publish = false`. + +--- + +## `test-eql.yml` — the merge gate + +Fast PR feedback + a thorough pre-merge gate, using a merge queue and a single +aggregated required check. + +### Two run shapes + +`setup` derives the matrix from the event: + +| Event | Trigger | Matrix | Purpose | +|---|---|---|---| +| `pull_request` | push to a PR | PG17 × 4 shards | fast developer feedback | +| `merge_group` | "Merge when ready" → queued | PG14–17 × 2 shards | full pre-merge gate on the real merged state | +| `workflow_dispatch` | manual run | PG17 × 4 shards (PR shape) | ad-hoc | + +The PR run is feedback only. The merge-queue run is the gate. + +> **No `push` trigger.** Under a required merge queue, push-to-main validation is +> redundant — the queue already validated the exact merge commit, and branch +> protection blocks direct pushes. + +### Relevance skip applies to PRs only + +Each heavy job runs when: +`merge_group || workflow_dispatch || (pull_request && relevant == 'true')`. + +So the `changes` relevance filter only gates the **`pull_request`** event — a +docs-only PR skips the heavy jobs on its PR run. On `merge_group` (and +`workflow_dispatch`) every job runs **unconditionally**: a queued PR always pays +the full gate regardless of which files it touched. + +The relevance filter (`changes` job) marks a PR relevant when any of these +changed: `.github/workflows/test-eql.yml`, `src/**`, `sql/**`, `tests/**`, +`tasks/**`, `crates/**`, `Cargo.toml`, `Cargo.lock`, `mise.toml`. Note `docs/**` +is **not** in the filter — see [Known gaps](#known-gaps). + +### How the queue works + +1. Click **Merge when ready** — the PR is queued, not merged. +2. GitHub builds a temporary branch = `main` + this PR (+ any PRs ahead in the + queue) and fires `merge_group`, so CI tests the **post-merge state**. +3. The full PG14–17 × 2 matrix (plus the single-run jobs) runs and feeds + `ci-required`. +4. `ci-required` green → PR is **merged**. Red → PR is **removed from the + queue**; `main` is untouched. + +This catches semantic conflicts — two PRs that each pass alone but break +together — which PR-only checks never test. + +### The `ci-required` aggregator + +Per-event matrices make leaf job names unstable (`Shard PG17 1/4` on a PR vs. +`Shard PG14 1/2` in the queue), so leaf names can't be named as required checks. +Instead, one aggregator job (id and display name `ci-required`) `needs:` every +job, runs with `if: always()`, and passes only if each needed result is +`success` **or** `skipped`. Mark **only `ci-required`** as the required status +check. + +- `if: always()` — runs even when dependencies fail/skip, so the check always + reports (a never-reported required check leaves the queue stuck *Pending*). +- `skipped` counts as pass — a docs-only PR skips the heavy jobs on its PR run + but must still report Success so the PR stays eligible to queue. + +--- + +## Coverage map: job → task → what it checks + +All jobs run on `blacksmith-16vcpu-ubuntu-2204`. "PG set" follows the event +(PG17 on PR / dispatch, PG14–17 in the queue). + +| Job | mise task(s) | Checks | DB | `CS_*` creds | +|---|---|---|---|---| +| **changes** | — | compute relevance | no | no | +| **setup** | — | compute PG × shard matrix | no | no | +| **build-archive** | `test:sqlx:archive` | Build EQL, run prep, **generate fixtures**, compile every `tests/sqlx` binary (**default features**) into a nextest archive; upload archive + `release/*.sql` | yes (PG17) | **yes (sole holder)** | +| **test** (sharded) | `test:sqlx:partition` | Run the archived sqlx binaries (default features), hash-partitioned across shards | yes (per PG) | no (replays archive) | +| **e2e** | `test:sqlx:e2e` | The `proptest-e2e` fresh-encryption property suite (`e2e_oracle`) — PG17 only, version-independent | yes (PG17) | **yes** | +| **validate** (per PG) | `docs:validate:documented-sql` + `test:clean_install_v3` | DB-backed SQL doc-syntax check; clean-DB `eql_v3` install smoke | yes | no | +| **docs-static** | `docs:validate:source` | SQL doxygen coverage + required-tags (DB-free); relevance-gated like the other heavy jobs (its inputs — `src/**`, the `crates/**` codegen build, `tasks/docs/**` — are a subset of the `relevant` filter) | no | no | +| **schema** | `test:schema` | v2.2 / v2.3 payload JSON-schema validation | no | no | +| **rust-crates** | `test:crates` + `types:check` | `cargo fmt --check`, clippy + `cargo test` for `eql-domains` / `eql-codegen` / `eql-tests-macros` / `eql-bindings`; verify TS bindings + JSON schemas are fresh | no | no | +| **codegen** | `codegen:parity` | Regenerate encrypted-domain SQL in place + `git diff` drift gate (committed `src/v3/scalars/` matches the generator) | no | no | +| **self-contained-v3** | `test:self_contained_v3` | `eql_v3` surface has no `eql_v2` dependency | no | no | +| **matrix-coverage** | `test:matrix:inventory` (+`:jsonb_entry`, `:v3-jsonb`) + `test:matrix:catalog-coverage` | Scalar-matrix test-name snapshots are not silently dropped; catalog surface is covered | no | no | +| **splinter** | `test:splinter` | Supabase/Splinter lints over the installed EQL | yes (PG17) | no | +| **ci-required** | — | aggregator: every needed job is `success`/`skipped` | no | no | + +--- + +## Where each test suite runs + +The `eql_v3` property-test suites (see +`tests/sqlx/tests/encrypted_domain/property/README.md`) land in three different +CI jobs: + +| Suite | Job | Trigger coverage | DB | `CS_*` | Notes | +|---|---|---|---|---|---| +| **catalog** (`eql-domains` `proptest_invariants`) | **rust-crates** (`cargo test -p eql-domains`; proptest is a dev-dep) | relevant PR + queue | no | no | pure-Rust catalog invariants; shrinking enabled | +| **fixture** (function-double oracles, extractor identity, `match_smoke`, `edge_cases`) | **test** shards (default features) | relevant PR (PG17×4) + queue (PG14–17×2) | yes | no | oracle over the **committed** real-ciphertext fixtures | +| **e2e** (`e2e_oracle`, `#[cfg(feature = "proptest-e2e")]`) | **e2e** job (`test:sqlx:e2e`) | relevant PR (PG17) + queue (PG17) | yes | yes | oracle over **fresh** ZeroKMS encryption; PG-version-independent, so one PG17 run | + +The wider sqlx suite (everything under `tests/sqlx/tests/`) runs in the **test** +shards, which replay the default-feature archive — so any +`#[cfg(feature = …)]`-gated test that isn't in the default feature set does not +run there. The `proptest-e2e` suite is the one such gate, and it has its own +**e2e** job (it can't reuse the credential-free archive: it both compiles with a +non-default feature and needs `CS_*` at run time). + +--- + +## Known gaps + +1. **bench + macro-expand are nightly / non-blocking** — a bench regression or a + stale `cargo expand` snapshot surfaces on the daily schedule, not on the PR + that introduced it. Accepted trade-off. + +2. **`docs/**` markdown is not content-validated.** The `docs-static` job checks + the SQL `--!` doxygen comments under `src/**`, not the prose/links in `docs/**` + itself. A markdown-only PR leaves `relevant` false, so `docs-static` is skipped + along with the other heavy jobs — and that loses no coverage, because the job's + inputs (`src/**` `.sql`/`.template`, the `crates/**` codegen build, the + `tasks/docs/**` scripts) are all in the `relevant` filter, so a PR that doesn't + trip `relevant` cannot change its outcome. Linting the markdown the PR actually + changed (prose/links) is a separate, unfilled capability. + +### Recently closed + +- *The e2e (fresh-encryption) suite never ran in CI.* Now covered by the **e2e** + job (`test:sqlx:e2e`), PG17, on relevant PRs + the queue. +- *`docs-static` ran unconditionally on every PR.* It is now relevance-gated like + every other heavy job. Because its inputs are a strict subset of the `relevant` + filter, gating it both makes the workflow consistent (one uniform `if:`) and + drops a redundant codegen build on markdown-only PRs without losing any + coverage. A narrower bespoke `src/**`-only filter was rejected: it would risk a + silent false-green (`ci-required` counts `skipped` as pass) by skipping on a + real input change in `crates/**` or `tasks/docs/**`. + +--- + +## Operator setup (one-time, GitHub UI) + +Settings → Branches → rule for `main`: + +1. **Require merge queue.** +2. **Require status checks to pass** → add **`ci-required` only** (not the + per-shard leaf names). + +Then verify (see `docs/plans/2026-06-09-ci-pr-feedback-sharding-rollout.md`): + +- **Queue a relevant PR** → `merge_group` runs the full gate (8 `Shard …` jobs + + 4 `Validate …` jobs + `build-archive`, `e2e`, `docs-static`, `schema`, + `rust-crates`, `codegen`, `self-contained-v3`, `matrix-coverage`, `splinter`) → + `ci-required` green → PR merges. +- **Open a docs-only PR** → on its `pull_request` run every relevance-gated heavy + job skips (`docs-static` included); `ci-required` reports **Success** (not stuck + *Pending*) because it counts `skipped` as pass, so the PR can be queued. + +## References + +- Merge queue: +- `merge_group` event: +- Required status checks: +- `needs` / `always()` / `join()`: +- Path filtering (`dorny/paths-filter`): +- nextest archive + partitioning: · diff --git a/.github/workflows/_build-docs.yml b/.github/workflows/_build-docs.yml new file mode 100644 index 000000000..8a30f98ad --- /dev/null +++ b/.github/workflows/_build-docs.yml @@ -0,0 +1,85 @@ +name: "Build docs (reusable)" + +# Reusable docs build+attach. Called inline by release.yml (production and +# prerelease paths). The target release already exists: _build-sql.yml creates +# it in the same run before this docs job attaches to it. + +on: + workflow_call: + inputs: + ref: + description: "Git ref/SHA to build docs from. Empty -> default checkout (github.sha)." + required: false + type: string + default: "" + tag: + description: "Full release tag. Empty -> build only, no attach." + required: false + type: string + default: "" + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + MISE_VERBOSE: "1" + +defaults: + run: + shell: bash {0} + +permissions: + contents: write + +jobs: + publish-docs: + runs-on: blacksmith-16vcpu-ubuntu-2204 + name: Build and Publish Documentation + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + ref: ${{ inputs.ref }} + + - uses: jdx/mise-action@v3 + with: + version: 2026.4.0 + install: true + cache: true + + - name: Install Doxygen + run: | + sudo apt-get update + sudo apt-get install -y doxygen + + - name: Generate documentation + env: + TAG: ${{ inputs.tag }} + run: | + set -euo pipefail + mise run docs:generate + mise run docs:generate:markdown -- "${TAG}" + mise run docs:generate:json -- "${TAG}" + + - name: Package documentation + env: + TAG: ${{ inputs.tag }} + run: | + mise run docs:package "${TAG}" + + - name: Upload documentation artifacts + uses: actions/upload-artifact@v4 + with: + name: eql-docs + path: | + release/eql-docs-*.zip + release/eql-docs-*.tar.gz + + - name: Publish documentation to release + if: ${{ inputs.tag != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ inputs.tag }} + files: | + release/eql-docs-*.zip + release/eql-docs-*.tar.gz diff --git a/.github/workflows/_build-sql.yml b/.github/workflows/_build-sql.yml new file mode 100644 index 000000000..bd5977978 --- /dev/null +++ b/.github/workflows/_build-sql.yml @@ -0,0 +1,122 @@ +name: "Build SQL (reusable)" + +# Reusable SQL build+attach. Called inline by release.yml (production and +# prerelease paths) so SQL releases have one build path. + +on: + workflow_call: + inputs: + ref: + description: "Git ref/SHA to build from. Empty -> default checkout (github.sha)." + required: false + type: string + default: "" + tag: + description: "Full release tag (e.g. eql-3.0.0-alpha.2). Empty -> DEV build, no attach." + required: false + type: string + default: "" + attach: + description: "Attach the built .sql artefacts to a GitHub Release." + required: false + type: boolean + default: false + target_commitish: + description: "Non-empty -> create a prerelease at this commit; empty -> attach to the existing release named by tag." + required: false + type: string + default: "" + prerelease: + description: "Mark the created release as a prerelease (create path only)." + required: false + type: boolean + default: false + secrets: + MULTITUDES_ACCESS_TOKEN: + required: false + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + MISE_VERBOSE: "1" + +defaults: + run: + shell: bash {0} + +permissions: + contents: write + +jobs: + build: + runs-on: blacksmith-16vcpu-ubuntu-2204 + name: Build EQL + timeout-minutes: 5 + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + ref: ${{ inputs.ref }} + + - uses: jdx/mise-action@v3 + with: + version: 2026.4.0 + install: true + cache: true + + - name: Build EQL release + # Strip `eql-` so eql_v3.version() reports bare semver. Empty TAG + # intentionally falls through build.sh's ${usage_version:-DEV} default. + env: + TAG: ${{ inputs.tag }} + run: | + mise run build --version "${TAG#eql-}" + + - name: Upload EQL artifacts + uses: actions/upload-artifact@v4 + with: + name: eql-release + path: | + release/cipherstash-encrypt.sql + release/cipherstash-encrypt-uninstall.sql + + - name: Attach artefacts to existing release + if: ${{ inputs.attach && inputs.target_commitish == '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ inputs.tag }} + files: | + release/cipherstash-encrypt.sql + release/cipherstash-encrypt-uninstall.sql + + - name: Create prerelease at commit + if: ${{ inputs.attach && inputs.target_commitish != '' }} + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ inputs.tag }} + target_commitish: ${{ inputs.target_commitish }} + prerelease: ${{ inputs.prerelease }} + name: ${{ inputs.tag }} + body: "Preview (prerelease) of the standalone eql_v3 surface. See [Unreleased] in CHANGELOG.md." + files: | + release/cipherstash-encrypt.sql + release/cipherstash-encrypt-uninstall.sql + + - name: Notify Multitudes + # Production deploy tracking: fire only when release.yml creates a + # non-prerelease SQL release (attach + create path + not a prerelease). + # release.yml runs on `push`, so the old `event_name == 'release'` gate + # never matched under the unified workflow. + # continue-on-error: a deploy-tracking ping is not part of the release + # itself. If Multitudes is down / rate-limits / the token is empty, the + # curl failing must not fail build-sql and skip downstream build-docs / + # build-image after npm + SQL have already published. + if: ${{ inputs.attach && !inputs.prerelease && inputs.target_commitish != '' }} + continue-on-error: true + run: | + curl --request POST \ + --fail-with-body \ + --url "https://api.developer.multitudes.co/deployments" \ + --header "Content-Type: application/json" \ + --header "Authorization: ${{ secrets.MULTITUDES_ACCESS_TOKEN }}" \ + --data '{"commitSha": "${{ github.sha }}", "environmentName":"production"}' diff --git a/.github/workflows/bench-eql.yml b/.github/workflows/bench-eql.yml index cee01ca3b..70a7060a4 100644 --- a/.github/workflows/bench-eql.yml +++ b/.github/workflows/bench-eql.yml @@ -15,6 +15,9 @@ on: - "src/**/*.sql" - "tests/sqlx/**/*" - "tasks/**/*" + - "crates/**" + - "Cargo.toml" + - "Cargo.lock" schedule: # 02:00 UTC daily @@ -28,12 +31,12 @@ env: defaults: run: - shell: bash -l {0} + shell: bash {0} jobs: bench: name: "Bench EQL (Postgres 17)" - runs-on: ubuntu-latest-m + runs-on: blacksmith-16vcpu-ubuntu-2204 timeout-minutes: 60 env: @@ -50,7 +53,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - workspaces: tests/sqlx + workspaces: . shared-key: sqlx-tests - name: Setup database @@ -58,6 +61,17 @@ jobs: mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" - name: Run bench tests + # CS_* scoped to THIS step only (least privilege): test:bench -> test:sqlx:prep + # -> fixture:generate:all encrypts via cipherstash-client and needs BOTH a + # ZeroKMS auth credential (CS_CLIENT_ACCESS_KEY + CS_WORKSPACE_CRN) AND a client + # key (CS_CLIENT_ID + CS_CLIENT_KEY); without them it fails "Auth strategy error: + # Not authenticated". Kept off job scope so checkout/mise/rust-cache actions + # never see them. + env: + CS_CLIENT_ACCESS_KEY: ${{ secrets.CS_CLIENT_ACCESS_KEY }} + CS_WORKSPACE_CRN: ${{ secrets.CS_WORKSPACE_CRN }} + CS_CLIENT_ID: ${{ secrets.CS_CLIENT_ID }} + CS_CLIENT_KEY: ${{ secrets.CS_CLIENT_KEY }} run: | export active_rust_toolchain=$(rustup show active-toolchain | cut -d' ' -f1) rustup component add --toolchain ${active_rust_toolchain} rustfmt clippy diff --git a/.github/workflows/lint-release.yml b/.github/workflows/lint-release.yml new file mode 100644 index 000000000..b63c21091 --- /dev/null +++ b/.github/workflows/lint-release.yml @@ -0,0 +1,79 @@ +name: "Lint release tooling" + +# Durable gate for the release machinery. It catches workflow syntax, wrapper +# shell issues, and supply-chain cache regressions before a real release. + +on: + pull_request: + paths: + - .github/workflows/_build-sql.yml + - .github/workflows/_build-docs.yml + - .github/workflows/release-plz.yml + - .github/workflows/release.yml + - .github/workflows/lint-release.yml + - .github/actionlint.yaml + - package.json + - scripts/*.mjs + - tasks/release/*.sh + workflow_dispatch: {} + +permissions: + contents: read + +defaults: + run: + shell: bash + +jobs: + lint: + name: actionlint + shellcheck + unit test + runs-on: blacksmith-16vcpu-ubuntu-2204 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Install actionlint + run: | + set -euo pipefail + bash <(curl -sSfL https://raw.githubusercontent.com/rhysd/actionlint/v1.7.7/scripts/download-actionlint.bash) 1.7.7 + echo "$PWD" >> "$GITHUB_PATH" + + - name: actionlint (release workflows) + run: | + set -euo pipefail + actionlint \ + .github/workflows/_build-sql.yml \ + .github/workflows/_build-docs.yml \ + .github/workflows/release-plz.yml \ + .github/workflows/release.yml \ + .github/workflows/lint-release.yml + + - name: shellcheck (wrappers + helpers) + run: | + set -euo pipefail + shellcheck \ + tasks/release/prepare-bindings-assets.sh \ + tasks/release/prepare-bindings-assets.test.sh + + - name: prepare-bindings-assets validation unit test + run: bash tasks/release/prepare-bindings-assets.test.sh + + - uses: pnpm/action-setup@v6.0.8 + name: Install pnpm + with: + run_install: false + cache: false + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install JS dependencies + run: pnpm install --frozen-lockfile + + - name: release workflow supply-chain cache guard + run: | + pnpm run lint:workflow-cache + pnpm run test:scripts diff --git a/.github/workflows/macro-expand-eql.yml b/.github/workflows/macro-expand-eql.yml new file mode 100644 index 000000000..e3a0bb052 --- /dev/null +++ b/.github/workflows/macro-expand-eql.yml @@ -0,0 +1,86 @@ +name: "Macro expand EQL" + +# Regenerates the matrix `cargo expand` snapshots (one per reachable +# `scalar_matrix!` arm: integer = [eq, ord], text = [eq, ord, search], boolean = +# [storage]) and fails if any has drifted from its committed copy. This is a +# body-level fidelity backstop for the matrix macros — the name-inventory +# snapshot (test-eql.yml `matrix-coverage` job) catches add/remove of whole +# arms; this catches changes *inside* the generated bodies. +# +# Non-blocking by design: it is NOT a required PR check. `cargo expand` needs a +# nightly toolchain, so it is isolated off the PR path. +# - nightly schedule (the backstop that flags a forgotten local regen) +# - manual workflow_dispatch +# +# GAP (intended): there is no `pull_request` trigger, so a change that only +# touches macro *bodies* (no arm add/remove) can merge without ever running +# here and will first surface as a red nightly run afterwards. Accept this — the +# expand lane needs nightly and stays off the PR critical path by design. +# +# The pinned nightly date lives in ONE place: the `cargo +nightly-...` invocation +# in the `test:matrix:expand` mise task. The install step below DERIVES the date +# from mise.toml (grep), so there is nothing to keep in lockstep — bump it once in +# mise.toml. The snapshot then only moves when the macro moves, not when nightly +# reformats its expansion. +on: + schedule: + # 03:00 UTC daily + - cron: "0 3 * * *" + + workflow_dispatch: + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + MISE_VERBOSE: "1" + +defaults: + run: + shell: bash {0} + +permissions: + contents: read + +jobs: + macro-expand: + name: "Macro expand drift (nightly)" + runs-on: blacksmith-16vcpu-ubuntu-2204 + timeout-minutes: 30 + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: tests/sqlx + shared-key: sqlx-tests + + # Derive the pinned nightly date from mise.toml (single source of truth — + # the `cargo +nightly-...` invocation in the `test:matrix:expand` task) so + # there is nothing to bump in lockstep here. cargo-expand is likewise pinned + # once in mise.toml's [tools] (`cargo:cargo-expand`) and installed by the + # mise-action step above, so its version is single-sourced too — no + # hardcoded version lives in this workflow. It drives the rustfmt pass, so + # an unpinned version could drift the snapshot even with a frozen macro + + # nightly. The snapshot then only moves when the macro moves. + - name: Install pinned nightly toolchain + run: | + NIGHTLY=$(grep -oE 'nightly-[0-9]{4}-[0-9]{2}-[0-9]{2}' mise.toml | head -1) + test -n "$NIGHTLY" || { echo "could not find pinned nightly in mise.toml"; exit 1; } + rustup toolchain install "$NIGHTLY" --profile minimal --component rustfmt + + - name: Regenerate and verify the matrix expansion snapshots + run: | + mise run test:matrix:expand + git diff --exit-code -- \ + tests/sqlx/snapshots/integer_expanded.rs \ + tests/sqlx/snapshots/text_expanded.rs \ + tests/sqlx/snapshots/boolean_expanded.rs \ + || { echo "Expansion snapshot stale — run 'mise run test:matrix:expand' (needs the pinned nightly) and commit."; exit 1; } diff --git a/.github/workflows/rebuild-docs.yml b/.github/workflows/rebuild-docs.yml index 047b1f30f..3353299d9 100644 --- a/.github/workflows/rebuild-docs.yml +++ b/.github/workflows/rebuild-docs.yml @@ -4,11 +4,14 @@ on: push: tags: - 'eql-*' + # Exclude the eql-bindings crate tags (eql-bindings-v*) cut by release-plz + # — a Rust-crate release must not fire the docs-site rebuild webhook. + - '!eql-bindings-*' jobs: trigger-docs-rebuild: name: Trigger Docs Rebuild - runs-on: ubuntu-latest + runs-on: blacksmith-16vcpu-ubuntu-2204 steps: - name: Send webhook env: diff --git a/.github/workflows/release-eql.yml b/.github/workflows/release-eql.yml deleted file mode 100644 index 515fa0fee..000000000 --- a/.github/workflows/release-eql.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: "Release EQL" - -on: - release: - types: - - published - pull_request: # runs everything but the last step - branches: - - main - paths: - - .github/workflows/release-eql.yml - # Useful for debugging - workflow_dispatch: - -env: - FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" - MISE_VERBOSE: "1" - -defaults: - run: - shell: bash -l {0} - -permissions: - contents: write - -jobs: - verify-changelog: - runs-on: ubuntu-latest - name: Verify CHANGELOG entry - # Only real (non-prerelease) eql-* releases. Pre-releases keep their - # entries under [Unreleased] until the final release is cut. - if: ${{ github.event_name == 'release' && contains(github.event.release.tag_name, 'eql') && github.event.release.prerelease == false }} - timeout-minutes: 5 - - steps: - - uses: actions/checkout@v4 - - - name: CHANGELOG.md has a section for this release - env: - TAG: ${{ github.event.release.tag_name }} - run: | - version="${TAG#eql-}" - escaped="${version//./\\.}" - if ! grep -qE "^## \[${escaped}\]" CHANGELOG.md; then - echo "::error file=CHANGELOG.md::No '## [${version}]' section in CHANGELOG.md at tag ${TAG}. The release was cut without promoting [Unreleased] -> [${version}] first. See the 'Cutting a release' section of CLAUDE.md." - exit 1 - fi - echo "Found '## [${version}]' section in CHANGELOG.md." - - build-and-publish: - runs-on: ubuntu-latest - name: Build EQL - if: ${{ github.event_name != 'release' || contains(github.event.release.tag_name, 'eql') }} - timeout-minutes: 5 - - steps: - - uses: actions/checkout@v4 - - - uses: jdx/mise-action@v3 - with: - version: 2026.4.0 # [default: latest] mise version to install - install: true # [default: true] run `mise install` - cache: true # [default: true] cache mise using GitHub's cache - - - name: Build EQL release - run: | - mise run build --version ${{github.event.release.tag_name}} - - - name: Upload EQL artifacts - uses: actions/upload-artifact@v4 - with: - name: eql-release - path: | - release/cipherstash-encrypt.sql - release/cipherstash-encrypt-uninstall.sql - - - name: Publish EQL release artifacts - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - release/cipherstash-encrypt.sql - release/cipherstash-encrypt-uninstall.sql - release/cipherstash-encrypt-supabase.sql - release/cipherstash-encrypt-uninstall-supabase.sql - - - name: Notify Multitudes - if: github.event_name == 'release' - run: | - curl --request POST \ - --fail-with-body \ - --url "https://api.developer.multitudes.co/deployments" \ - --header "Content-Type: application/json" \ - --header "Authorization: ${{ secrets.MULTITUDES_ACCESS_TOKEN }}" \ - --data '{"commitSha": "${{ github.sha }}", "environmentName":"production"}' - - publish-docs: - runs-on: ubuntu-latest - name: Build and Publish Documentation - if: ${{ github.event_name != 'release' || contains(github.event.release.tag_name, 'eql') }} - timeout-minutes: 10 - - steps: - - uses: actions/checkout@v4 - - - uses: jdx/mise-action@v3 - with: - version: 2026.4.0 # [default: latest] mise version to install - install: true # [default: true] run `mise install` - cache: true # [default: true] cache mise using GitHub's cache - - - name: Install Doxygen - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - - name: Generate documentation - run: | - mise run docs:generate - mise run docs:generate:markdown -- ${{ github.event.release.tag_name }} - - - name: Package documentation - run: | - mise run docs:package ${{ github.event.release.tag_name }} - - - name: Upload documentation artifacts - uses: actions/upload-artifact@v4 - with: - name: eql-docs - path: | - release/eql-docs-*.zip - release/eql-docs-*.tar.gz - - - name: Publish documentation to release - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - release/eql-docs-*.zip - release/eql-docs-*.tar.gz diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 000000000..8a6950fd9 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,110 @@ +name: "Release eql-bindings (crates.io)" + +# Publishes the `eql-bindings` crate to crates.io via release-plz (crates.io +# Trusted Publishing via OIDC — no long-lived token; GPG-signed release +# commits/tags; blacksmith runner + mise toolchain). +# +# Publish-only: crate versioning is owned by CHANGESETS, not release-plz. The +# changesets "Version Packages" PR bumps crates/eql-bindings/Cargo.toml to the +# lockstep version V (scripts/sync-lockstep-versions.mjs) alongside the npm +# package. On push to main, `release` publishes the committed Cargo.toml version +# V to crates.io (no-op when V is already published) and tags eql-bindings-vV. +# There is deliberately NO release-plz `release-pr` job — changesets opens the +# version PR, so a release-plz PR would fight it. +# +# One-time crates.io setup (Trusted Publishing): on the eql-bindings crate's +# Settings -> Trusted Publishing, add a GitHub publisher with +# Repository: cipherstash/encrypt-query-language Workflow: release-plz.yml +# For a brand-new crate name, register the publisher before the first publish. +# +# Secrets: GPG_PRIVATE_KEY (release-commit/tag signing key). crates.io auth is +# OIDC (id-token: write), so NO CARGO_REGISTRY_TOKEN. The GitHub PR/tag ops use +# the default GITHUB_TOKEN; enable "Allow GitHub Actions to create and approve +# pull requests" in repo settings so the release PR can be opened. + +permissions: + pull-requests: write + contents: write + id-token: write # crates.io Trusted Publishing (OIDC) + +on: + push: + branches: + - main + workflow_dispatch: {} + +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + MISE_VERBOSE: "1" + +# No `defaults.run.shell` override: GitHub's default `bash` shell runs with +# `-eo pipefail` — the right default for a publish workflow. + +# Static group: push-to-main and workflow_dispatch share it so two release-plz +# invocations never race a tag/publish. Never cancel — a cancelled release could +# leave a half-published state. +concurrency: + group: release-plz + cancel-in-progress: false + +jobs: + release: + name: "Release" + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Sign release-plz's commits and tags with the shared release key. + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v7 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + git_user_signingkey: true + git_commit_gpgsign: true + git_tag_gpgsign: true + + - uses: jdx/mise-action@v3 + with: + version: 2026.4.0 + install: true + # Publish workflows must not restore caches (lint-no-workflow-caching + # covers mise-action): a poisoned toolchain cache would run inside the + # job that holds crates.io OIDC publishing power. + cache: false + + # The crate bundles its SQL via include_str! on COMMITTED files, and + # release-plz publishes the committed tree verbatim. Refuse to publish a + # crate whose bundled SQL wasn't prepared for this exact version — e.g. a + # hand-pinned Cargo.toml without running `pnpm run version` would + # otherwise ship the DEV placeholder as its "exact SQL". Enforced only + # when this run would actually publish (the committed version is not on + # crates.io yet): routine no-op runs on main between releases carry the + # DEV placeholder legitimately. A crates.io API failure fails towards + # ENFORCING the guard, never towards skipping it. + - name: Verify bundled SQL matches the crate version + run: | + set -euo pipefail + cargo_version="$(grep -m1 '^version = ' crates/eql-bindings/Cargo.toml | cut -d'"' -f2)" + published="$(curl -fsSL --retry 3 "https://crates.io/api/v1/crates/eql-bindings/versions" | jq -r '.versions[].num' | grep -Fx "$cargo_version" || true)" + if [[ -n "$published" ]]; then + echo "eql-bindings@${cargo_version} is already on crates.io; this run is a publish no-op — skipping the bundled-SQL guard" + exit 0 + fi + manifest_version="$(jq -r '.eqlVersion' crates/eql-bindings/sql/release-manifest.json)" + if [[ "$manifest_version" != "$cargo_version" ]]; then + echo "::error::crates/eql-bindings/sql/release-manifest.json eqlVersion ('$manifest_version') does not match Cargo.toml version ('$cargo_version') — the bundled SQL was not prepared for this release. Run 'pnpm run version' (or 'mise run release:prepare_bindings_assets --version $cargo_version') and commit the result." >&2 + exit 1 + fi + if ! grep -q "eql_v3" crates/eql-bindings/sql/cipherstash-encrypt.sql; then + echo "::error::crates/eql-bindings/sql/cipherstash-encrypt.sql looks like the DEV placeholder — refusing to publish it as release SQL." >&2 + exit 1 + fi + + - name: Run release-plz release + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-postgres-eql-image.yml b/.github/workflows/release-postgres-eql-image.yml index 2c646f6c4..a311fd703 100644 --- a/.github/workflows/release-postgres-eql-image.yml +++ b/.github/workflows/release-postgres-eql-image.yml @@ -1,9 +1,10 @@ name: "Release Postgres + EQL image" on: - release: - types: - - published + # Driven by release.yml on production finals (it dispatches this workflow with + # update_floating_tags=true), plus manual runs. Not `on: release`: a + # GITHUB_TOKEN-created release does not trigger `on: release` fan-out, whereas + # a GITHUB_TOKEN workflow_dispatch does — so release.yml dispatches instead. workflow_dispatch: inputs: eql_version: @@ -23,7 +24,7 @@ env: defaults: run: - shell: bash -l {0} + shell: bash {0} permissions: contents: read @@ -31,15 +32,15 @@ permissions: jobs: build-sql: - runs-on: ubuntu-latest + runs-on: blacksmith-16vcpu-ubuntu-2204 name: Build EQL SQL - if: ${{ github.event_name != 'release' || contains(github.event.release.tag_name, 'eql') }} timeout-minutes: 5 outputs: # Used for image tags, e.g. "2.1.8" -> ghcr.io/.../postgres-eql:17-2.1.8 eql_version: ${{ steps.ver.outputs.eql_version }} - # Passed to `mise run build --version`. Matches the existing release-eql.yml - # convention so eql_v2.version() in the image is byte-identical to the SQL release. + # Passed to `mise run build --version`. Bare semver (no `eql-` prefix), + # matching the SQL release build (_build-sql.yml), so eql_v3.version() in + # the image is byte-identical to the SQL release. build_version: ${{ steps.ver.outputs.build_version }} update_floating_tags: ${{ steps.ver.outputs.update_floating_tags }} @@ -54,24 +55,19 @@ jobs: - name: Compute EQL version and tag policy id: ver + # eql_version is passed in as bare semver (release.yml sends + # needs.release.outputs.version, e.g. "3.0.0"), used both as the image + # tag and, verbatim, as the `mise run build --version` value so + # eql_v3.version() in the image is byte-identical to the SQL release. env: - EVENT_NAME: ${{ github.event_name }} - RELEASE_TAG: ${{ github.event.release.tag_name }} INPUT_VERSION: ${{ inputs.eql_version }} INPUT_FLOATING: ${{ inputs.update_floating_tags }} run: | - if [[ "$EVENT_NAME" == "release" ]]; then - build_version="$RELEASE_TAG" # e.g. "eql-2.1.8" - eql_version="${RELEASE_TAG#eql-}" # e.g. "2.1.8" - floating="true" - else - eql_version="$INPUT_VERSION" - build_version="$INPUT_VERSION" - floating="$INPUT_FLOATING" - fi - echo "eql_version=${eql_version}" >> "$GITHUB_OUTPUT" - echo "build_version=${build_version}" >> "$GITHUB_OUTPUT" - echo "update_floating_tags=${floating}" >> "$GITHUB_OUTPUT" + { + echo "eql_version=${INPUT_VERSION}" + echo "build_version=${INPUT_VERSION}" + echo "update_floating_tags=${INPUT_FLOATING}" + } >> "$GITHUB_OUTPUT" - name: Build EQL release SQL run: mise run build --version ${{ steps.ver.outputs.build_version }} @@ -83,7 +79,7 @@ jobs: path: release/cipherstash-encrypt.sql build-images: - runs-on: ubuntu-latest + runs-on: blacksmith-16vcpu-ubuntu-2204 needs: build-sql name: Build postgres-eql image (PG ${{ matrix.pg_version }}) timeout-minutes: 30 @@ -145,7 +141,7 @@ jobs: tags: ${{ steps.tags.outputs.tags }} promote-latest: - runs-on: ubuntu-latest + runs-on: blacksmith-16vcpu-ubuntu-2204 needs: [build-sql, build-images] name: Promote PG17 image to :latest and : if: ${{ needs.build-sql.outputs.update_floating_tags == 'true' }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..2c26586a0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,415 @@ +name: "Release" + +# Single release entry point for the EQL release line. +# +# - `main` uses Changesets to version and publish the production release. +# - `eql_v3` can cut prereleases from an explicit conventional release commit. +# The release commit itself is the marker: `chore(release): ...`. +# +# Prereleases publish the npm package directly from this workflow and dispatch +# the Rust crate publish through `release-plz.yml` so crates.io Trusted +# Publishing still sees the correct entry-point workflow. The SQL GitHub +# release and docs are built in the same workflow run. +# +# npm Trusted Publishing must be configured for this workflow filename: +# `release.yml`. + +permissions: + id-token: write # npm OIDC trusted publishing + contents: write # changesets commits the Version PR / tags; SQL release attach + pull-requests: write # changesets opens the Version PR + +on: + push: + branches: + - main + - eql_v3 + workflow_dispatch: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +# No `defaults.run.shell` override: GitHub's default `bash` shell runs with +# `-eo pipefail`, which is exactly what a publish workflow wants. (An explicit +# `bash {0}` would silently DISABLE errexit/pipefail for any step that forgets +# its own `set -euo pipefail`.) + +jobs: + classify: + name: Classify release intent + runs-on: ubuntu-latest + timeout-minutes: 5 + outputs: + mode: ${{ steps.classify.outputs.mode }} + version: ${{ steps.classify.outputs.version }} + prerelease: ${{ steps.classify.outputs.prerelease }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - id: classify + run: | + set -euo pipefail + branch="${GITHUB_REF_NAME}" + subject="$(git log -1 --format=%s)" + mode="skip" + version="" + prerelease="false" + + if [[ "$branch" == "main" ]]; then + mode="production" + elif [[ "$branch" == "eql_v3" ]]; then + # Exactly `chore(release):` — a bare `release:` prefix would let an + # unrelated commit ("release: fix runbook") re-trigger the publish + # pipeline for the currently pinned identity. + case "$subject" in + chore\(release\):*) + mode="prerelease" + ;; + esac + fi + + if [[ "$mode" == "prerelease" ]]; then + version="$(node -p "require('./packages/eql/package.json').version")" + if [[ "$version" != *-* ]]; then + echo "::error::prerelease release commits must already pin a prerelease version in packages/eql/package.json" >&2 + exit 1 + fi + # Idempotency short-circuit: if this identity's npm tag already + # exists, the release was already cut — a re-push of the marker (or + # a rerun) must not re-publish. Individual steps are also + # idempotent; this just skips the whole pipeline up front. + if git ls-remote --exit-code --tags origin "refs/tags/eql-typescript-v${version}" >/dev/null 2>&1; then + echo "eql-typescript-v${version} already exists; prerelease ${version} was already published — skipping" + mode="skip" + version="" + else + prerelease="true" + fi + fi + + { + echo "mode=$mode" + echo "version=$version" + echo "prerelease=$prerelease" + } >> "$GITHUB_OUTPUT" + + release: + name: Version or publish (changesets) + needs: classify + if: ${{ needs.classify.outputs.mode == 'production' }} + # GitHub-hosted (not Blacksmith): npm provenance from OIDC trusted + # publishing is only accepted from github-hosted runners (self-hosted -> E422). + runs-on: ubuntu-latest + timeout-minutes: 20 + outputs: + published: ${{ steps.changesets.outputs.published }} + version: ${{ steps.ver.outputs.version }} + prerelease: ${{ steps.ver.outputs.prerelease }} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: pnpm/action-setup@v6.0.8 + name: Install pnpm + with: + run_install: false + cache: false + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - uses: jdx/mise-action@v3 + with: + version: 2026.4.0 + install: true + # Publish workflows must not restore caches (lint-no-workflow-caching + # covers mise-action too): a poisoned toolchain cache would run inside + # the job that holds npm OIDC publishing power. + cache: false + + # AFTER mise-action, deliberately: mise's node (from [tools]) is first on + # PATH and its bundled npm 10.x has no OIDC trusted publishing — upgrading + # before mise-action upgrades an npm that never runs (the exact cause of + # the alpha.3 ENEEDAUTH failures). + - name: Upgrade npm for OIDC trusted publishing + run: npm install -g npm@11.5.1 + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + # `version:` runs `changeset version && sync-lockstep-versions.mjs` (bumps + # package.json + Cargo.toml + builds/bundles SQL to V) for the Version PR; + # `publish:` runs `pnpm run build && changeset publish` to publish npm. + - name: Version or publish + id: changesets + uses: changesets/action@v1.8.0 + with: + version: pnpm run version + publish: pnpm run release + commitMode: "github-api" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Resolve published version + id: ver + if: steps.changesets.outputs.published == 'true' + env: + PUBLISHED: ${{ steps.changesets.outputs.publishedPackages }} + run: | + set -euo pipefail + version="$(node -e "const p=JSON.parse(process.env.PUBLISHED);const e=p.find(x=>x.name==='@cipherstash/eql');if(!e){process.exit(1)}console.log(e.version)")" + echo "version=${version}" >> "$GITHUB_OUTPUT" + if [[ "$version" == *-* ]]; then + echo "prerelease=true" >> "$GITHUB_OUTPUT" + else + echo "prerelease=false" >> "$GITHUB_OUTPUT" + fi + + build-sql: + name: Build + attach SQL release + needs: release + if: ${{ needs.release.outputs.published == 'true' }} + permissions: + contents: write + secrets: + MULTITUDES_ACCESS_TOKEN: ${{ secrets.MULTITUDES_ACCESS_TOKEN }} + uses: ./.github/workflows/_build-sql.yml + with: + ref: ${{ github.sha }} + tag: eql-${{ needs.release.outputs.version }} + attach: true + target_commitish: ${{ github.sha }} + prerelease: ${{ needs.release.outputs.prerelease == 'true' }} + + build-docs: + name: Build + attach docs + needs: [release, build-sql] + if: ${{ needs.release.outputs.published == 'true' }} + permissions: + contents: write + uses: ./.github/workflows/_build-docs.yml + with: + ref: ${{ github.sha }} + tag: eql-${{ needs.release.outputs.version }} + + build-image: + name: Dispatch Postgres + EQL image build + needs: [release, build-sql, build-docs] + # Production finals only: the floating :latest / : image tags must + # not move for a prerelease. Alpha images can still be built on demand via + # release-postgres-eql-image.yml's workflow_dispatch. Dispatched (not an + # `on: release` fan-out) because a GITHUB_TOKEN-created release does not + # trigger `on: release`, whereas a GITHUB_TOKEN workflow_dispatch does. + if: ${{ needs.release.outputs.published == 'true' && needs.release.outputs.prerelease == 'false' }} + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + actions: write + steps: + - name: Dispatch release-postgres-eql-image.yml + # Dispatch against the eql- tag, not the branch: build-sql + # (a `needs`) already created that tag at the release commit via + # _build-sql.yml's target_commitish, and the image workflow file exists + # at that commit. Pinning to the tag builds the image from the exact + # released source even if the branch has advanced since publish. + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ needs.release.outputs.version }} + run: | + set -euo pipefail + gh workflow run release-postgres-eql-image.yml --ref "eql-${VERSION}" \ + -f eql_version="$VERSION" \ + -f update_floating_tags=true + + prerelease-build-sql: + name: Build + attach prerelease SQL + needs: classify + if: ${{ needs.classify.outputs.mode == 'prerelease' }} + permissions: + contents: write + secrets: + MULTITUDES_ACCESS_TOKEN: ${{ secrets.MULTITUDES_ACCESS_TOKEN }} + uses: ./.github/workflows/_build-sql.yml + with: + ref: ${{ github.sha }} + tag: eql-${{ needs.classify.outputs.version }} + attach: true + target_commitish: ${{ github.sha }} + prerelease: true + + prerelease-build-docs: + name: Build + attach prerelease docs + needs: [classify, prerelease-build-sql] + if: ${{ needs.classify.outputs.mode == 'prerelease' }} + permissions: + contents: write + uses: ./.github/workflows/_build-docs.yml + with: + ref: ${{ github.sha }} + tag: eql-${{ needs.classify.outputs.version }} + + prerelease-publish-npm: + name: Publish prerelease npm package + needs: [classify, prerelease-build-sql, prerelease-build-docs] + if: ${{ needs.classify.outputs.mode == 'prerelease' }} + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + persist-credentials: false + + - uses: pnpm/action-setup@v6.0.8 + name: Install pnpm + with: + run_install: false + cache: false + + - uses: actions/setup-node@v4 + with: + node-version: 22 + + - uses: jdx/mise-action@v3 + with: + version: 2026.4.0 + install: true + # Publish workflows must not restore caches (lint-no-workflow-caching + # covers mise-action too): a poisoned toolchain cache would run inside + # the job that holds npm OIDC publishing power. + cache: false + + # AFTER mise-action, deliberately: mise's node (from [tools]) is first on + # PATH and its bundled npm 10.x has no OIDC trusted publishing — upgrading + # before mise-action upgrades an npm that never runs (the exact cause of + # the alpha.3 ENEEDAUTH failures). + - name: Upgrade npm for OIDC trusted publishing + run: npm install -g npm@11.5.1 + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Verify prerelease marker and version + env: + VERSION: ${{ needs.classify.outputs.version }} + run: | + set -euo pipefail + actual="$(node -p "require('./packages/eql/package.json').version")" + test "$actual" = "$VERSION" || { + echo "package version ${actual} does not match prerelease identity ${VERSION}" >&2 + exit 1 + } + + - name: Prepare exact SQL assets + env: + VERSION: ${{ needs.classify.outputs.version }} + run: mise run release:prepare_bindings_assets --version "$VERSION" + + - name: Build package + run: pnpm --filter @cipherstash/eql build + + - name: Publish package + working-directory: packages/eql + env: + VERSION: ${{ needs.classify.outputs.version }} + run: | + set -euo pipefail + if [ -n "$(npm view "@cipherstash/eql@${VERSION}" version 2>/dev/null)" ]; then + echo "@cipherstash/eql@${VERSION} is already published; skipping publish" + else + node scripts/npm-publish.mjs + fi + + - name: Tag TypeScript release + env: + VERSION: ${{ needs.classify.outputs.version }} + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + run: | + set -euo pipefail + # Create the tag via the REST API with GH_TOKEN — the checkout has + # persist-credentials: false (deliberate hardening) and a git-level + # extraheader hack proved unreliable ("could not read Username"). + tag="eql-typescript-v${VERSION}" + if gh api "repos/${REPO}/git/ref/tags/${tag}" >/dev/null 2>&1; then + echo "tag ${tag} already exists on the remote; skipping" + else + gh api -X POST "repos/${REPO}/git/refs" \ + -f ref="refs/tags/${tag}" -f sha="$GITHUB_SHA" >/dev/null + echo "created ${tag} at ${GITHUB_SHA}" + fi + + prerelease-publish-rust: + name: Dispatch prerelease Rust publish + needs: [classify, prerelease-build-sql, prerelease-build-docs] + if: ${{ needs.classify.outputs.mode == 'prerelease' }} + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + actions: write + contents: write # create/update the release/eql- branch ref + steps: + - name: Dispatch release-plz.yml at the release commit + # release-plz refuses detached HEADs ("cannot determine current + # branch"), so a tag dispatch does not work. To still publish from the + # EXACT commit the SQL + npm artifacts shipped from — even if eql_v3 + # has advanced since the marker push — pin a release/eql- + # branch at this run's commit and dispatch against that. The branch is + # a stable pointer per identity: force-updated on retries of the same + # identity, never reused across identities. + env: + GH_TOKEN: ${{ github.token }} + VERSION: ${{ needs.classify.outputs.version }} + REPO: ${{ github.repository }} + SHA: ${{ github.sha }} + run: | + set -euo pipefail + branch="release/eql-${VERSION}" + if ! gh api -X POST "repos/${REPO}/git/refs" \ + -f ref="refs/heads/${branch}" -f sha="$SHA" >/dev/null 2>&1; then + gh api -X PATCH "repos/${REPO}/git/refs/heads/${branch}" \ + -f sha="$SHA" -F force=true >/dev/null + fi + # --repo is required: this job has no checkout, and without it gh + # tries to resolve the workflow through a local git repo and dies + # with "not a git repository". + gh workflow run release-plz.yml --repo "$REPO" --ref "$branch" + + summary: + name: Summary + runs-on: ubuntu-latest + needs: [classify, release, build-sql, build-docs, build-image, prerelease-build-sql, prerelease-build-docs, prerelease-publish-npm, prerelease-publish-rust] + if: always() + steps: + - name: Emit run summary + env: + MODE: ${{ needs.classify.outputs.mode }} + VERSION: ${{ needs.classify.outputs.version }} + CLASSIFY_RESULT: ${{ needs.classify.result }} + RELEASE_RESULT: ${{ needs.release.result }} + BUILD_SQL_RESULT: ${{ needs.build-sql.result }} + BUILD_DOCS_RESULT: ${{ needs.build-docs.result }} + BUILD_IMAGE_RESULT: ${{ needs.build-image.result }} + PRE_BUILD_SQL_RESULT: ${{ needs.prerelease-build-sql.result }} + PRE_BUILD_DOCS_RESULT: ${{ needs.prerelease-build-docs.result }} + PRE_PUBLISH_NPM_RESULT: ${{ needs.prerelease-publish-npm.result }} + PRE_PUBLISH_RUST_RESULT: ${{ needs.prerelease-publish-rust.result }} + SERVER_URL: ${{ github.server_url }} + REPOSITORY: ${{ github.repository }} + RUN_ID: ${{ github.run_id }} + run: | + set -euo pipefail + { + echo "## Release result" + echo "" + echo "- mode: \`${MODE}\`" + echo "- version: \`${VERSION}\`" + echo "- classify: ${CLASSIFY_RESULT} | release: ${RELEASE_RESULT} | build-sql: ${BUILD_SQL_RESULT} | build-docs: ${BUILD_DOCS_RESULT} | build-image: ${BUILD_IMAGE_RESULT} | prerelease-build-sql: ${PRE_BUILD_SQL_RESULT} | prerelease-build-docs: ${PRE_BUILD_DOCS_RESULT} | prerelease-publish-npm: ${PRE_PUBLISH_NPM_RESULT} | prerelease-publish-rust: ${PRE_PUBLISH_RUST_RESULT}" + echo "" + echo "Run: ${SERVER_URL}/${REPOSITORY}/actions/runs/${RUN_ID}" + } >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/test-eql.yml b/.github/workflows/test-eql.yml index 73e5ab370..aa2f9d162 100644 --- a/.github/workflows/test-eql.yml +++ b/.github/workflows/test-eql.yml @@ -1,129 +1,581 @@ name: "Test EQL" + +# NB: NO path filter at on: level. A workflow skipped by a path/branch filter +# leaves its required checks stuck Pending and blocks merge. Relevance is +# computed by the `changes` job and applied per-job via `if:` instead. +# +# NB: NO `push:` trigger. Under a required merge queue, push-to-main validation +# is redundant — the queue already validated the exact merge commit, and branch +# protection blocks direct pushes. (Resolves the design's ambiguous "light jobs +# only on push:main" sanity net by dropping the trigger entirely.) on: - push: - branches: - - main - paths: - - ".github/workflows/test-eql.yml" - - "src/**/*.sql" - - "sql/**/*.sql" - - "tests/**/*" - - "tasks/**/*" - - pull_request: - # run on all pull requests - paths: - - ".github/workflows/test-eql.yml" - - "src/**/*.sql" - - "sql/**/*.sql" - - "tests/**/*" - - "tasks/**/*" - - workflow_dispatch: + pull_request: {} + merge_group: {} # required pre-merge gate; runs the full matrix + workflow_dispatch: {} # manual runs use the PR shape (PG17 x 4 shards) env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" MISE_VERBOSE: "1" + # CI compile-time tuning (CI-only; local dev keeps full debuginfo + incremental). + # Clean CI builds never reuse incremental state, so it only bloats target/ and + # the rust-cache up/download. line-tables-only keeps readable panic backtraces + # for failing tests at a fraction of full-debuginfo compile cost. nextest's + # `test` profile inherits these from `dev`. + CARGO_INCREMENTAL: "0" + CARGO_PROFILE_DEV_DEBUG: "line-tables-only" defaults: run: - shell: bash -l {0} + shell: bash {0} + +permissions: + contents: read + +# PRs cancel superseded runs; the merge queue must NOT cancel — a cancelled +# merge_group run never reports a final status and ejects the PR from the queue. +concurrency: + group: test-eql-${{ github.event_name }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: - schema: - name: "JSON Schema validation" - runs-on: ubuntu-latest + # Runs on EVERY event and MUST always succeed (never skipped, never failed) — + # downstream heavy jobs `needs: [changes]`, and a skipped/failed `changes` + # would either skip the merge-queue matrix or deadlock `ci-required`. + changes: + name: "Detect relevant changes" + runs-on: blacksmith-16vcpu-ubuntu-2204 + outputs: + relevant: ${{ steps.r.outputs.relevant }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + + # Diff ONLY on pull_request, where a base ref is well-defined. On + # merge_group/workflow_dispatch the base ref is absent and the filter errors/empties. + - id: f + if: github.event_name == 'pull_request' + uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3 + with: + filters: | + relevant: + - ".github/workflows/test-eql.yml" + - "src/**" + - "sql/**" + - "tests/**" + - "tasks/**" + - "crates/**" + - "Cargo.toml" + - "Cargo.lock" + - "mise.toml" + # Explicit default (not `|| 'true'`, which trips GitHub's inconsistent + # treatment of the string 'false'). merge_group/workflow_dispatch never + # read this value — their downstream `if:` branch ignores `relevant` — but + # default true is the safe value regardless. + - id: r + run: | + if [ "${{ github.event_name }}" = "pull_request" ]; then + echo "relevant=${{ steps.f.outputs.relevant }}" >> "$GITHUB_OUTPUT" + else + echo "relevant=true" >> "$GITHUB_OUTPUT" + fi + + # Pure bash; no checkout/toolchain. Derives the PG-version + shard fan-out + # from the event: PR -> PG17 x 4 shards; merge queue -> PG 14-17 x 2 shards. + setup: + name: "Compute matrix" + runs-on: blacksmith-16vcpu-ubuntu-2204 + outputs: + pg-versions: ${{ steps.cfg.outputs.pg }} + shard-total: ${{ steps.cfg.outputs.shard_total }} + shards: ${{ steps.cfg.outputs.shards }} steps: - - uses: actions/checkout@v6 + - id: cfg + run: | + if [ "${{ github.event_name }}" = "merge_group" ]; then + echo 'pg=[14,15,16,17]' >> "$GITHUB_OUTPUT" + echo 'shard_total=2' >> "$GITHUB_OUTPUT" + echo 'shards=[1,2]' >> "$GITHUB_OUTPUT" + else + echo 'pg=[17]' >> "$GITHUB_OUTPUT" + echo 'shard_total=4' >> "$GITHUB_OUTPUT" + echo 'shards=[1,2,3,4]' >> "$GITHUB_OUTPUT" + fi - - uses: jdx/mise-action@v4 + # Compile the test binaries ONCE. Runs in the queue and on workflow_dispatch + # always, and on PRs only when relevant files changed (docs-only PRs never pay + # the ~4-min compile). + build-archive: + name: "Build test archive" + needs: [changes] + # This repo is PUBLIC and accepts fork PRs (the approval policy only gates + # first-time contributors). build-archive is the sole holder of the CS_* + # credentials below, so it must never run on a fork PR. The trailing clause + # restricts it to push / workflow_dispatch / same-repo branch PRs; the + # downstream test/validate shards `needs:` it, so they skip on fork PRs too. + if: >- + (github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true')) + && (github.event_name != 'pull_request' + || github.event.pull_request.head.repo.full_name == github.repository) + runs-on: blacksmith-16vcpu-ubuntu-2204 + env: + # test:sqlx:archive depends on test:sqlx:prep, which copies the built EQL + # into migrations/, applies it to a live Postgres, and regenerates the + # per-type fixtures — both are include_str!'d into the test binaries at + # COMPILE time, so they must exist before `cargo nextest archive`. Fixture + # generation needs a live PG with EQL installed (the postgres:up step + # below) plus CS_* creds. The job-level `if:` above keeps those creds off + # fork-PR runs. + POSTGRES_VERSION: "17" + CS_CLIENT_ACCESS_KEY: ${{ secrets.CS_CLIENT_ACCESS_KEY }} + CS_WORKSPACE_CRN: ${{ secrets.CS_WORKSPACE_CRN }} + CS_CLIENT_ID: ${{ secrets.CS_CLIENT_ID }} + CS_CLIENT_KEY: ${{ secrets.CS_CLIENT_KEY }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 with: version: 2026.4.0 install: true cache: true - - uses: Swatinem/rust-cache@v2 + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: - workspaces: tests/sqlx + workspaces: . shared-key: sqlx-tests + # The sole saver of the shared cache: this job compiles the full heavy + # dep tree, so it must own the `sqlx-tests` key. All other jobs set + # `save-if: false` so a fast-finishing light job can't win the save race + # and overwrite the key with a deps-less target/. - - name: Validate v2.2 / v2.3 payload schemas + - name: Setup database (Postgres 17) run: | - mise run test:schema + mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" - test: - name: "Test & Validate EQL (Postgres ${{ matrix.postgres-version }})" - runs-on: ubuntu-latest-m - needs: schema + - name: Build EQL + archive test binaries + run: | + mise run test:sqlx:archive + # Ship the built release artifacts: build_validation_tests read + # cipherstash-encrypt{,-uninstall}.sql from ../../release at RUN time + # (std::fs, not embedded), and release/ is gitignored so the shard checkout + # has none of them. `mise run build` (via prep) produced them in build-archive. + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: nextest-archive + path: | + nextest.tar.zst + release/*.sql + retention-days: 1 + if-no-files-found: error + + # Sharded sqlx suite. No longer needs [schema, codegen] (gate removed) — + # shards start right after build-archive. + test: + name: "Shard PG${{ matrix.postgres-version }} ${{ matrix.shard }}/${{ needs.setup.outputs.shard-total }}" + needs: [changes, setup, build-archive] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 strategy: fail-fast: false matrix: - postgres-version: [17, 16, 15, 14] - + postgres-version: ${{ fromJSON(needs.setup.outputs.pg-versions) }} + shard: ${{ fromJSON(needs.setup.outputs.shards) }} env: POSTGRES_VERSION: ${{ matrix.postgres-version }} + SHARD: ${{ matrix.shard }} + SHARD_TOTAL: ${{ needs.setup.outputs.shard-total }} + # No CS_* here: the shard runs the prebuilt archive (fixtures + migration + # embedded by build-archive), so it does not regenerate fixtures and needs + # no credentials. It only needs the live Postgres (below) for sqlx::test's + # per-test scratch databases and the release/*.sql from the artifact. + steps: + # Checkout path MUST be identical to build-archive so the archive's + # workspace remap lines up (design: archive<->commit coupling). + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: nextest-archive + + - name: Setup database (Postgres ${{ matrix.postgres-version }}) + run: | + mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" + + - name: Run shard ${{ matrix.shard }}/${{ needs.setup.outputs.shard-total }} + run: | + mise run test:sqlx:partition + + # docs:validate + Clean-DB v3 install smoke. Both are version-relevant, so + # they follow the event's PG set (PG17 on PR; 14-17 in the queue). Moved out + # of the old per-version test job so they run ONCE per version, not per shard. + validate: + name: "Validate (Postgres ${{ matrix.postgres-version }})" + needs: [changes, setup] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 + strategy: + fail-fast: false + matrix: + postgres-version: ${{ fromJSON(needs.setup.outputs.pg-versions) }} + env: + POSTGRES_VERSION: ${{ matrix.postgres-version }} steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false - - uses: jdx/mise-action@v4 + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 with: version: 2026.4.0 - install: true # [default: true] run `mise install` - cache: true # [default: true] cache mise using GitHub's cache + install: true + cache: true - - uses: Swatinem/rust-cache@v2 + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: - workspaces: tests/sqlx + workspaces: . shared-key: sqlx-tests + save-if: false - name: Setup database (Postgres ${{ matrix.postgres-version }}) run: | mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" - - name: Validate SQL documentation (Postgres ${{ matrix.postgres-version }}) + # Source-only doc checks (coverage + required-tags) moved to the dedicated + # `docs-static` job so they run exactly once, not per-Postgres. This step + # keeps only the DB-backed SQL-syntax validation, which genuinely needs the + # per-version Postgres. + - name: Validate documented SQL syntax (Postgres ${{ matrix.postgres-version }}) + run: | + mise run docs:validate:documented-sql + + - name: Clean-DB v3 install smoke (Postgres ${{ matrix.postgres-version }}) run: | - mise run docs:validate + mise run clean && mise run build + mise run test:clean_install_v3 - - name: Test EQL for Postgres ${{ matrix.postgres-version }} + schema: + name: "JSON Schema validation" + needs: [changes] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - name: Validate v2.2 / v2.3 payload schemas + run: | + mise run test:schema + + rust-crates: + name: "Rust workspace crates" + needs: [changes] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + # `mise run test:crates` runs `cargo fmt --check` at the workspace root, + # which covers tests/sqlx (a workspace member). This subsumes the old + # standalone `test:lint` step that the removed per-version test job ran. + - name: Compile, lint and test the Rust workspace crates run: | export active_rust_toolchain=$(rustup show active-toolchain | cut -d' ' -f1) rustup component add --toolchain ${active_rust_toolchain} rustfmt clippy - mise run --output prefix test --postgres ${POSTGRES_VERSION} + mise run test:crates - splinter: - name: "Supabase splinter" - runs-on: ubuntu-latest-m + # Freshness gate for the eql-types codegen output: regenerate the + # TypeScript bindings and JSON Schemas and fail if the checked-in + # copies differ. Reuses the toolchain from the step above. + - name: Verify eql-types bindings and schemas are fresh + run: | + mise run types:check - env: - POSTGRES_VERSION: "17" + # Publish gate for eql-bindings (the one crate we ship to crates.io via + # release-plz). `--dry-run` packages + compiles the crate exactly as + # crates.io would, catching publish-blockers — missing `license`/metadata, + # a real path dependency without a version — on the PR rather than at + # release time. No token needed. `--allow-dirty` tolerates any files the + # preceding regenerate-and-diff steps leave in the working tree. + - name: Verify eql-bindings packages cleanly for crates.io + run: | + cargo publish -p eql-bindings --dry-run --allow-dirty + + codegen: + name: "Encrypted-domain codegen" + needs: [changes] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - name: Verify generator parity (golden) + run: | + mise run codegen:parity + - name: Verify schema split parity (SQL owned_schemas vs Rust consts) + run: | + mise run test:schemas:parity + self-contained-v3: + name: "eql_v3 self-containment" + needs: [changes] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - name: Build EQL + run: mise run clean && mise run --force build + - name: Assert eql_v3 is self-contained + run: mise run test:self_contained_v3 - - uses: jdx/mise-action@v4 + matrix-coverage: + name: "Matrix coverage inventory" + needs: [changes] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 with: version: 2026.4.0 install: true cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - name: Verify the matrix test-name inventory + # The workflow-wide `shell: bash {0}` default drops GitHub's implicit + # `-eo pipefail`, so without fail-fast this multi-command step only + # reports the LAST command's exit code and a failing inventory task is + # silently swallowed. Restore fail-fast for this step. + run: | + set -euo pipefail + mise run test:matrix:inventory + mise run test:matrix:inventory:jsonb_entry + mise run test:matrix:inventory:ope + mise run test:v3-jsonb:inventory + git add -N tests/sqlx/snapshots + git diff --exit-code -- tests/sqlx/snapshots \ + || { echo "Coverage inventory stale — run the relevant inventory task and commit."; exit 1; } + - name: Verify catalog-surface coverage + run: mise run test:matrix:catalog-coverage + splinter: + name: "Supabase splinter" + needs: [changes] + if: >- + github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true') + runs-on: blacksmith-16vcpu-ubuntu-2204 + env: + POSTGRES_VERSION: "17" + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true - name: Setup database run: | mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" - - name: Build and install EQL run: | - mise run --output prefix --force build + mise run clean && mise run --output prefix --force build cat release/cipherstash-encrypt.sql \ | docker exec -i postgres-${POSTGRES_VERSION} \ psql -v ON_ERROR_STOP=1 \ postgresql://cipherstash:password@localhost/cipherstash -f- - - name: Run splinter run: | mise run --output prefix test:splinter --postgres ${POSTGRES_VERSION} + # Source-only SQL documentation validation (coverage + required Doxygen tags). + # Deliberately NOT relevance-gated: it runs on EVERY pull_request — including + # docs-only PRs that skip the heavy jobs — so documentation is always + # validated. DB-free and creds-free (the psql-backed syntax check stays in the + # per-version `validate` job). + docs-static: + name: "SQL doc validation" + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - name: Validate SQL doc coverage + required tags + run: | + mise run docs:validate:source + - name: Assert user-facing docs are free of the removed eql_v2 surface + run: | + mise run test:docs_v3_grep + # The e2e (fresh-encryption) property suite. Encrypts random values through + # ZeroKMS at run time, so it needs CS_* creds and is PG-version-independent — + # one PG17 run, never the matrix. Compiles the `proptest-e2e`-gated binaries + # (which the default-feature sharded archive excludes) and runs only the + # e2e oracle. Like build-archive, it holds CS_* and so carries the same + # fork-PR guard to keep the secrets off fork runs. + e2e: + name: "e2e property suite (fresh encryption)" + needs: [changes, setup] + if: >- + (github.event_name == 'merge_group' + || github.event_name == 'workflow_dispatch' + || (github.event_name == 'pull_request' && needs.changes.outputs.relevant == 'true')) + && (github.event_name != 'pull_request' + || github.event.pull_request.head.repo.full_name == github.repository) + runs-on: blacksmith-16vcpu-ubuntu-2204 + env: + POSTGRES_VERSION: "17" + CS_CLIENT_ACCESS_KEY: ${{ secrets.CS_CLIENT_ACCESS_KEY }} + CS_WORKSPACE_CRN: ${{ secrets.CS_WORKSPACE_CRN }} + CS_CLIENT_ID: ${{ secrets.CS_CLIENT_ID }} + CS_CLIENT_KEY: ${{ secrets.CS_CLIENT_KEY }} + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4 + with: + version: 2026.4.0 + install: true + cache: true + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: . + shared-key: sqlx-tests + save-if: false + - name: Setup database (Postgres 17) + run: | + mise run postgres:up postgres-${POSTGRES_VERSION} --extra-args "--detach --wait" + - name: Run e2e property suite + run: | + mise run test:sqlx:e2e + + # The ONE required status check. Stable name on every event, so branch + # protection never references an event-dependent leaf name (which would + # deadlock). Passes iff every needed job is success or skipped. Treating + # skipped as pass is intentional: heavy jobs are legitimately skipped on + # docs-only PRs, and a genuine failure is still caught because the FAILING + # source job is itself in `needs` and reports failure. + ci-required: + name: "ci-required" + needs: [changes, setup, build-archive, test, validate, schema, rust-crates, + codegen, self-contained-v3, matrix-coverage, splinter, docs-static, e2e] + if: always() + runs-on: blacksmith-16vcpu-ubuntu-2204 + steps: + - name: Assert all required jobs passed or were skipped + run: | + results='${{ join(needs.*.result, ' ') }}' + echo "needed results: $results" + for r in $results; do + case "$r" in + success|skipped) ;; + *) echo "gate fail: a needed job reported '$r'"; exit 1 ;; + esac + done + echo "ci-required: all needed jobs passed or were skipped" diff --git a/.gitignore b/.gitignore index d9a13a2e9..6f08e3ef2 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,13 @@ deps-ordered.txt deps-supabase.txt deps-ordered-supabase.txt -# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore +src/deps-v3.txt +src/deps-ordered-v3.txt + +# Generated by tasks/build.sh from src/v3/version.template (eql_v3.version()). +src/v3/version.sql -src/version.sql +# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore @@ -123,6 +127,10 @@ web_modules/ .env.local .envrc +# Local mise overrides (CipherStash credentials, etc.) +mise.local.toml +.mise.local.toml + # parcel-bundler cache (https://parceljs.org/) .parcel-cache @@ -197,8 +205,8 @@ cipherstash-proxy.toml # turbo repo .turbo -# build artifacts -release/ +# build artifacts (top-level dir only; not tasks/release/) +/release/ # Generated documentation docs/api/ @@ -215,6 +223,14 @@ eql--*.sql # Generated SQLx migration (built from src/, never commit) tests/sqlx/migrations/001_install_eql.sql +# Generated SQLx fixtures (regenerated via `mise run fixture:generate`, +# never commit — stale fixtures hide bugs) +tests/sqlx/fixtures/eql_v3* +tests/sqlx/fixtures/v3_ste_vec.sql +tests/sqlx/fixtures/v3_doc_integer.sql +tests/sqlx/fixtures/v3_numeric_collision.sql +tests/sqlx/fixtures/v3_text_empty.sql + # Large generated test data files tests/ste_vec_vast.sql tests/ste_vec_*M.sql* @@ -225,7 +241,20 @@ tests/sqlx/target/ # Work files (agent-generated, not for version control) .work/ .serena/ +docs/superpowers/ # Build variants - protect variant deps src/deps-protect.txt src/deps-ordered-protect.txt + +# Cargo workspace root build artifacts +/target/ + +# Prebuilt nextest archive (transient build-once output for the sharded sqlx +# suite; uploaded as a CI artifact, never committed — see tasks/test/sqlx-archive.sh) +nextest.tar.zst + +# Working notes retained on disk but intentionally not committed +docs/decisions/2026-06-10-eql-v3-json-type-kind.md +docs/handoff/2026-06-10-v3-jsonb-fixture-alignment.md +.claude/ diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..30bff92b1 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +@cipherstash:registry=https://registry.npmjs.org/ +registry=https://registry.npmjs.org/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8c9568f..a0a3a66c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to EQL are recorded in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and EQL adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). The `eql_v2` schema name is part of the public API and is independent of the EQL release version — bumping EQL's major version does not rename the schema. -Tags follow `eql-` (e.g. `eql-2.3.0`); the GitHub release for that tag drives the release workflow. +Tags follow `eql-` (e.g. `eql-2.3.0`); `release.yml` cuts the tag and its GitHub release. ## How to read this file @@ -16,9 +16,7 @@ Tags follow `eql-` (e.g. `eql-2.3.0`); the GitHub release for that tag - **Security** — fixes that affect confidentiality, integrity, or availability. - **Upgrade notes** — for releases that change behaviour callers should be aware of (even when no API breaks), a pointer to `docs/upgrading/.md` with numbered notes (`U-NNN`) and a verification checklist. -Each entry that ships in a published release links to the PR that introduced it. Unreleased work lives in the `[Unreleased]` section at the top; entries are promoted into a versioned section when a release is cut. - -## [Unreleased] +**From 3.0.0, release notes move to [`packages/eql/CHANGELOG.md`](packages/eql/CHANGELOG.md)** — assembled by [Changesets](https://github.com/changesets/changesets) from the `.changeset/*.md` files added in each PR (Changesets writes per-package changelogs; since SQL, the `eql-bindings` crate, and the `@cipherstash/eql` npm package release in lockstep at one version, that file is the changelog for the whole release). Add a changeset for every releasable change (see `.changeset/README.md`); don't hand-edit either changelog. This file is preserved as the pre-3.0 history and is no longer appended to. ## [2.3.1] — 2026-05-21 @@ -62,7 +60,7 @@ Each entry that ships in a published release links to the PR that introduced it. - **Per-subtype ORE CLLW directories and functions.** `src/ore_cllw_u64_8/` and `src/ore_cllw_var_8/` collapse to `src/ore_cllw/`. Per-subtype function names (`eql_v2.ore_cllw_u64_8`, `eql_v2.compare_ore_cllw_var_8`, `eql_v2.has_ore_cllw_u64_8`, `eql_v2.has_ore_cllw_var_8`, …) collapse to the single-family names `eql_v2.ore_cllw`, `eql_v2.has_ore_cllw`. The composite types `eql_v2.ore_cllw_u64_8` / `eql_v2.ore_cllw_var_8` collapse to `eql_v2.ore_cllw`. Callers using the old names directly must rewrite — see [U-006](docs/upgrading/v2.3.md#u-006-ste_vec-ore-field-consolidation). ([#219](https://github.com/cipherstash/encrypt-query-language/pull/219)) - **`eql_v2.ore_cllw(eql_v2_encrypted)`, `eql_v2.has_ore_cllw(eql_v2_encrypted)`, and `eql_v2.compare_ore_cllw(eql_v2_encrypted, eql_v2_encrypted)`.** Replaced by the typed `(eql_v2.ste_vec_entry)` overloads (see `Added` and `Changed` entries above). The removed overloads were misleading: they read `oc` from `eql_v2_encrypted.data`, but per the v2.3 payload schema `oc` is sv-element scope only and never lives at the root of a column value. The "fake-root" trick where `->` merged meta + sv element into a new `eql_v2_encrypted` so these overloads could read `oc` is gone alongside them. Callers must now extract via `->` and cast `.data::eql_v2.ste_vec_entry` to reach the typed overload — see [U-006](docs/upgrading/v2.3.md#u-006-ste_vec-ore-field-consolidation). ([#219](https://github.com/cipherstash/encrypt-query-language/pull/219)) - **OPE-CLLW support on `eql_v2_encrypted`.** The `eql_v2.ope_cllw_u64_65` and `eql_v2.ope_cllw_var_8` types, their extractor/has/compare families, the `opf` / `opv` payload fields, the `op` field, and the `eql_v2.order_by_ope` helper are all removed. OPE moves to a future separate encrypted column type — `eql_v2_encrypted` now exclusively handles ORE for ordered comparisons. v2.2 didn't emit `opf` / `opv` from production `@cipherstash/protect` either, so this is not a customer-facing data migration; it's a tightening of the documented payload surface. ([#219](https://github.com/cipherstash/encrypt-query-language/pull/219)) -- **Root-level `b3` from synthetic test fixtures.** `create_encrypted_json` no longer emits `"b3": "blake3.…"` at the payload root, matching production [`@cipherstash/protect`](https://github.com/cipherstash/protect-js) output. ([#196](https://github.com/cipherstash/encrypt-query-language/pull/196)) +- **Root-level `b3` from synthetic test fixtures.** `create_encrypted_json` no longer emits `"b3": "blake3.…"` at the payload root, matching production [`@cipherstash/protect`](https://github.com/cipherstash/stack) output. ([#196](https://github.com/cipherstash/encrypt-query-language/pull/196)) - **Pre-release fused `eql_v2.hmac_256(val eql_v2_encrypted, selector text)`.** This overload, added earlier in the 2.3 cycle as the migration path off Blake3 for U-004, is removed before release in favour of the typed chain `eql_v2.eq_term(col -> '')` (XOR-aware — see U-007). The fused form bypassed the typed model and silently NULLed on oc-bearing selectors. Recipe migration: `eql_v2.hmac_256(col, '')` → `eql_v2.eq_term(col -> '')` (or `WHERE col -> '' = $1::eql_v2.ste_vec_entry`); index DDL: `USING hash (eql_v2.hmac_256(col, ''))` → `USING hash (eql_v2.eq_term(col -> ''))`. See [U-007](docs/upgrading/v2.3.md#u-007-typed-arrow-selector). ### Deprecated @@ -83,7 +81,6 @@ See [`docs/upgrading/v2.3.md`](docs/upgrading/v2.3.md). Eight numbered notes cov (Backfill pending — entries for tagged 2.x releases will be added retroactively from `git log` in a follow-up.) -[Unreleased]: https://github.com/cipherstash/encrypt-query-language/compare/eql-2.3.1...HEAD [2.3.1]: https://github.com/cipherstash/encrypt-query-language/releases/tag/eql-2.3.1 [2.3.0]: https://github.com/cipherstash/encrypt-query-language/releases/tag/eql-2.3.0 [2.2.1]: https://github.com/cipherstash/encrypt-query-language/releases/tag/eql-2.2.1 diff --git a/CLAUDE.md b/CLAUDE.md index 65ed6d58d..d76e35f79 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,10 +17,9 @@ This project uses `mise` for task management. Common commands: - `mise run docs:generate` - Generate API documentation (requires doxygen) - Outputs XML (primary) and HTML (preview) formats - XML suitable for downstream processing/website integration - - See `docs/api/README.md` for XML format details + - Output is written to `docs/api/` (generated, gitignored) - `mise run docs:generate:markdown` - Convert XML to Markdown API reference - - Generates single-file API reference: `docs/api/markdown/API.md` - - Includes 84 documented functions with parameters, return values, and source links + - Generates single-file API reference: `docs/api/markdown/API.md` (all documented functions with parameters, return values, and source links) - `mise run docs:validate` - Validate documentation coverage and tags - `mise run docs:package` - Package XML docs for distribution (~230KB archive) @@ -29,38 +28,28 @@ This project uses `mise` for task management. Common commands: - Run SQLx tests directly: `mise run test:sqlx` - Run SQLx tests in watch mode: `mise run test:sqlx:watch` - Tests are located in `tests/sqlx/` using Rust and SQLx framework +- Property-based tests for the `eql_v3` encrypted scalar domains live in three suites — **catalog** (pure-Rust catalog invariants, no DB), **fixture** (oracle over committed ciphertext), and **e2e** (oracle over fresh end-to-end encryption, gated behind the `proptest-e2e` cargo feature). The structure, the shared all-pairs oracle engine, and the conventions/footguns (e.g. why they must not live under `scalars::`) are documented in `tests/sqlx/tests/encrypted_domain/property/README.md`. +- Verify the scalar matrix coverage snapshot: `mise run test:matrix:inventory` (no database required). Committed token-normalized baselines under `tests/sqlx/snapshots/` pin the set of `scalars::::*` test names so a silently dropped/renamed/`#[cfg]`-gated test fails CI's `matrix-coverage` job. The task discovers the present scalar types from the test binary's `--list` and cross-checks them against `cargo run -p eql-codegen -- list-types`, so a catalog type missing its matrix wiring also fails. When you change which matrix tests the macro emits, regenerate and commit the affected baseline in the same change. `tests/sqlx/snapshots/README.md` is the source of truth for which baselines exist and how each is regenerated. ### Build System - Dependencies are resolved using `-- REQUIRE:` comments in SQL files -- Build outputs to `release/` directory: - - `cipherstash-encrypt.sql` - Main installer - - `cipherstash-encrypt-supabase.sql` - Supabase-compatible (excludes operator classes) - - `cipherstash-encrypt-protect.sql` - ProtectJS variant (excludes config management) - - Corresponding uninstallers for each variant - -#### Build Variants -| Variant | Excludes | Use Case | -|---------|----------|----------| -| Main | Nothing | Full EQL with all features | -| Supabase | Operator classes | Supabase compatibility | -| Protect | `src/config/*`, `src/encryptindex/*` | ProtectJS (no database-side config) | +- Build outputs to `release/` directory (a single installer + uninstaller, assembled from `src/v3` alone): + - `cipherstash-encrypt.sql` - The sole installer: the self-contained `eql_v3` surface, globbed from `src/v3` only (no `eql_v2`; installable into a DB with no `eql_v2` present) + - `cipherstash-encrypt-uninstall.sql` - Matching uninstaller + +There are no longer separate Main / Supabase / Protect / v3-only build variants. The combined `eql_v2` build that previously produced multiple artefacts has been removed; the v3 surface now ships as one self-contained installer under the canonical `cipherstash-encrypt.sql` name (`tasks/build.sh` globs `src/v3` only). Because the surface owns no `eql_v2` dependency, it is already Supabase / managed-Postgres compatible (functional indexes over extractors, no superuser-only operator classes) without a dedicated subset build. Self-containment — no `-- REQUIRE:` edge pointing outside `src/v3`, no `eql_v2.` anywhere in the surface — is enforced at build time by `verify_v3_self_contained` in `tasks/build.sh` and CI-gated by `mise run test:self_contained_v3`. ## Project Architecture This is the **Encrypt Query Language (EQL)** - a PostgreSQL extension for searchable encryption. Key architectural components: ### Core Structure -- **Schema**: All EQL functions/types are in `eql_v2` PostgreSQL schema -- **Main Type**: `eql_v2_encrypted` - composite type for encrypted columns (stored as JSONB) -- **Configuration**: `eql_v2_configuration` table tracks encryption configs -- **Index Types**: Various encrypted index types (blake3, hmac_256, bloom_filter, ore variants) +- **Schema**: EQL ships two PostgreSQL schemas. `eql_v3` is the public API: the encrypted-domain type families (`integer`, `smallint`, `bigint`, `date`, `timestamp`, `numeric`, `text`, `boolean`, `real`, `double`), query operators, index extractors (`eq_term`/`ord_term`/`match_term`), `min`/`max` aggregates, `version()`, `lints()`, **and the operator-backing comparison wrappers** (`eq`/`neq`/`lt`/`lte`/`gt`/`gte`/`contains`/`contained_by`, plus the jsonb containment helpers `jsonb_contains`/`jsonb_contained_by`/`jsonb_array`/`ste_vec_contains`). The wrappers are public because they are the function-form equivalent of every supported operator — platforms without operator support (Supabase/PostgREST invoke functions, not operators) call them by name (gated by `tests/sqlx/tests/v3_operator_equivalents_tests.rs`). `eql_v3_internal` holds INTERNAL objects only: the searchable-encrypted-metadata (SEM) index-term **types** (`eql_v3_internal.hmac_256`, `eql_v3_internal.ore_block_256`, `eql_v3_internal.bloom_filter`, `eql_v3_internal.ope_cllw`, hand-written under `src/v3/sem/`) and their support/constructor/comparator functions, the generated **blockers** (which only raise on unsupported ops), the **aggregate state functions**, and the SteVec CHECK validators. Splitting the index-term TYPES into `eql_v3_internal` keeps the Supabase Studio Table Builder type picker (which lists every type in every non-hidden schema) free of index-term-only types. **Design decision: EQL never grants permissions automatically — the installer issues no `GRANT`/`REVOKE`; access to either schema is strictly opt-in (see `docs/reference/permissions.md`).** Together the two schemas are **self-contained** and install into a database with no other EQL schema present. The earlier `eql_v2` schema (composite `eql_v2_encrypted` column type, database-side configuration management, operator-class-on-column indexing) was **removed in 3.0.0** — see the `[Unreleased]`/3.0.0 entry in `CHANGELOG.md`. `eql_v2` is no longer built or shipped; it survives only in fork-provenance comments under `src/v3/` (the v3 SEM types were forked from the old v2 originals) and in historical records (`CHANGELOG.md`, the v2.x upgrade guides). ### Directory Structure -- `src/` - Modular SQL components with dependency management -- `src/encrypted/` - Core encrypted column type implementation -- `src/operators/` - SQL operators for encrypted data comparisons -- `src/config/` - Configuration management functions -- `src/blake3/`, `src/hmac_256/`, `src/bloom_filter/`, `src/ore_*` - Index implementations +- `src/` - contains only the self-contained `v3` surface (the modular `eql_v2` component directories were removed in 3.0.0) +- `crates/` - Rust workspace: `eql-domains` (the catalog), `eql-codegen` (SQL/bindings generator), `eql-bindings` (payload bindings), `eql-tests-macros` +- `src/v3/` - Self-contained `eql_v3` / `eql_v3_internal` surface: `src/v3/schema.sql` (creates both schemas), forked `src/v3/crypto.sql` / `src/v3/common.sql`, hand-written SEM index-term types under `src/v3/sem/` (`hmac_256`, `ore_block_256`) — now created in `eql_v3_internal` — the generated scalar encrypted-domain families under `src/v3/scalars//` (user-column domains in `public`; extractors **and the supported comparison wrappers** in `eql_v3`; only the blockers and aggregate state functions in `eql_v3_internal`; plus the shared blocker `src/v3/scalars/functions.sql`), and the hand-written encrypted-JSONB (SteVec) surface under `src/v3/jsonb/` (`types.sql`, `functions.sql`, `operators.sql`, `aggregates.sql`, `blockers.sql` — the `public.eql_v3_json` / `public.eql_v3_jsonb_entry` column domains and their CHECK validators live in `public`, while the containment needle `eql_v3.query_jsonb` — a query operand, never a column type — lives in `eql_v3` (CIP-3442); typed operators, `jsonb_entry` comparison wrappers, the containment engine (`ste_vec_contains`), and raw-jsonb GIN helpers (`jsonb_array` / `jsonb_contains` / `jsonb_contained_by`) live in `eql_v3`; only the `is_ste_vec_array` helper and aggregate state functions live in `eql_v3_internal`) - `tasks/` - mise task scripts - `tests/sqlx/` - Rust/SQLx test framework (PostgreSQL 14-17 support) - `release/` - Generated SQL installation files @@ -68,26 +57,65 @@ This is the **Encrypt Query Language (EQL)** - a PostgreSQL extension for search ### Key Concepts - **Dependency System**: SQL files declare dependencies via `-- REQUIRE:` comments - **Encrypted Data**: Stored as JSONB payloads with metadata -- **Index Terms**: Transient types for search operations (blake3, hmac_256, etc.) +- **Index Terms**: SEM index-term types in `eql_v3_internal` (`hmac_256`, `ore_block_256`, `bloom_filter`, `ope_cllw`) - **Operators**: Support comparisons between encrypted and plain JSONB data -- **CipherStash Proxy**: Required for encryption/decryption operations +- **Encryption client**: CipherStash Stack or CipherStash Proxy is required for encryption/decryption operations + +### Encrypted-Domain Types + +`src/v3/scalars/` holds the generated **encrypted-domain type families** — jsonb-backed PostgreSQL domains in the **`public` schema**, one domain per operator/index capability (`public.` storage-only, `public._eq`, `public._ord`), plus an `eql_v3.query__` **query-operand twin** per term-bearing domain (index-terms-only, no ciphertext `c`; in `eql_v3`, not `public`, because a query operand is never a column type — CIP-3442). The domains are `public.eql_v3_integer`, `public.eql_v3_integer_eq`, `public.eql_v3_integer_ord`, `public.eql_v3_integer_ord_ore`; their extractors (`eql_v3.eq_term`, `eql_v3.ord_term`), aggregates (`eql_v3.min`/`max`), **and the supported comparison wrappers** (`eq`/`neq`/`lt`/`lte`/`gt`/`gte`/`contains`/`contained_by`) all live in **`eql_v3`** — the wrappers are public so every operator has a callable function equivalent (Supabase/PostgREST). Only the **blockers** (for unsupported operators — they just raise), the **aggregate state functions**, and the SEM index-term types the extractors/wrappers return and construct (`eql_v3_internal.hmac_256`, `eql_v3_internal.ore_block_256`) live in **`eql_v3_internal`** — hand-written under `src/v3/sem/`, schema-qualified via the codegen's `INTERNAL_SCHEMA` constant for the generated surface (the codegen's `SCHEMA` constant qualifies the public wrappers; the `operator_entry` renderer picks the backing function's schema by whether the operator is supported) — so the whole v3 surface (both schemas together) is self-contained (no `eql_v2.` appears anywhere in v3 SQL; CI gates this via `mise run test:self_contained_v3` and the self-contained `release/cipherstash-encrypt.sql` installer). `public.eql_v3_integer` (PR #239, supersedes #225) is the reference scalar implementation; the catalog now generates a full surface for `integer`, `smallint`, `bigint`, `date`, `timestamp`, `numeric`, `text`, `boolean`, `real`, and `double`, all following this materializer pattern. `jsonb` is a `CATALOG` family too, but a permanently **hand-written**, not generated, one: its three domains (`public.eql_v3_json` document, `public.eql_v3_jsonb_entry`, `eql_v3.query_jsonb`) carry `Shape::SteVecDocument` / `SteVecEntry` / `SteVecQuery` (the `Shape` enum in `crates/eql-domains/src/lib.rs`) instead of `Shape::Scalar`, and their SQL lives under `src/v3/jsonb/` rather than `src/v3/scalars//` — `eql-codegen` renders SQL only for `scalar_families()` (the `Shape::Scalar` rows), so the fixed-envelope ordered-scalar materializer described below never touches `jsonb`. This is a deliberate, permanent split, not a gap awaiting a future generator. + +Adding a scalar encrypted-domain type is one row in the Rust catalog `eql-domains::CATALOG` (`crates/eql-domains/src/lib.rs`): a `DomainFamily` giving the type `name` (e.g. `bigint`), its `ScalarKind` (the `kind` field), the `Domain`s mapping each generated (bare) domain name to its fixed index `Term`s (`eq => [Hm]`, `ord`/`ord_ore => [Ore]`), and the `Fixture` value list. Term capabilities are fixed in the `Term` enum's `impl` methods (with unit tests): `Hm` provides equality, and `Ore` provides equality plus ordering. There is no TOML manifest and no Python — the catalog is the source of truth, validated by the compiler (an undefined term or unknown scalar is a compile error) plus catalog `#[test]`s. `mise run build` runs `cargo run -p eql-codegen`, which regenerates the scalar SQL surface into `src/v3/scalars//` from `CATALOG` at the start of every build; that surface includes supported comparison wrappers plus blockers for native `jsonb` operators that would otherwise be reachable through domain fallback. `cargo run -p eql-codegen` regenerates every type at once (the same call `mise run build` uses; there is no per-type codegen task). The generated `*_types.sql` / `*_functions.sql` / `*_operators.sql` / `*_aggregates.sql` files are **committed in place** under `src/v3/scalars//` and drift-gated by `mise run codegen:parity` (regenerate in place + `git diff` + untracked check — the same regenerate-and-diff pattern `types:check` uses for the committed bindings). They are still machine-generated: change the catalog and rebuild, never hand-edit (CI fails on drift). The per-type plaintext fixture lists the SQLx matrix consumes are **not** a generated file — they are materialised from each `CATALOG` row at compile time as `eql_domains::INT4_VALUES` / `INT2_VALUES` (the `int_values!` macro) and read directly by `ScalarType::FIXTURE_VALUES`; a Rust source of truth no longer round-trips through a committed generated `.rs`. Generated SQL carries a `-- AUTOMATICALLY GENERATED FILE` header (the project-wide marker `docs:validate` greps on); change the catalog and rebuild, never hand-edit. Hand-written SQL beyond the fixed surface goes in `src/v3/scalars//_extensions.sql` with no auto-generated header and explicit `-- REQUIRE:` edges — that file IS committed. `jsonb` (see above) never enters this pipeline: every consumer here (`generate_all`, `list-types`, the SQLx matrix) iterates `eql_domains::scalar_families()`, which excludes any non-`Shape::Scalar` row, so `jsonb` is invisible to the materializer and the matrix by construction, not by a per-type exception. + +The same generator also emits the **Rust payload bindings** under `crates/eql-bindings/src/v3/.rs` (structs + `DomainType` impls) and the `inventory.rs` `all()` list, from the same `CATALOG` — committed with a `// @generated` header (the bindings must exist on a clean clone because `ts-rs`/`schemars` derive the committed TypeScript/JSON Schema off them; the SQL surface is now committed too, so both generated targets are handled consistently — committed in place, drift-gated by regenerate-and-`git diff`). The hand-written `DomainType` trait, the shared newtypes (`SchemaVersion`/`Identifier`/`Ciphertext`/`Hmac256`/`OreBlock256`/`BloomFilter`), the `PhantomData` plumbing, and the architectural module doc (including the non-derivable float-NaN and bool storage-only caveats) stay hand-written in `crates/eql-bindings/src/v3/{mod,domain_type,terms}.rs`. Generated structs carry a catalog-derived struct doc — a summary line (`` `eql_v3.` — . ``) plus a detail line listing the supported operators and required payload keys, all derived from data the catalog already holds (the capability label, `Term::operators_for_terms`, and `ENVELOPE_KEYS` ++ `Term::term_json_keys` — see `struct_doc_lines` in `crates/eql-codegen/src/bindings.rs`). The required-key list makes structural distinctions visible — e.g. `text_ord` lists `` `v` `i` `c` `hm` `ob` `` (dual-term) versus an integer `integer_ord`'s `` `v` `i` `c` `ob` ``. There are **no per-field docs**: per-field/term semantics live on the shared term newtypes (`terms.rs`, flowing into the TS term files and JSON Schema `$defs`), and non-derivable per-family caveats (float-NaN, bool storage-only) in `mod.rs`. Free-form prose belongs at the **struct level** (a future optional catalog `doc` field emitted as extra `#[doc]` lines), never as per-field docs. JSON Schemas are emitted by **schemars 1.x** as JSON Schema 2020-12. `mise run types:generate` regenerates the Rust bindings (via `eql-codegen bindings`) then the TS/JSON; `mise run types:check` is the committed-reference drift gate — it regenerates and `git diff`s all three (`crates/eql-bindings/src/v3` + `bindings/` + `schema/`), the same regenerate-and-diff pattern `codegen:parity` now uses for the committed SQL surface. Both gates run in CI; `mise run install-hooks` wires a pre-commit hook that runs both locally whenever a commit touches the catalog, the generator, or a committed generated surface. The `jsonb` family's own structs (`SteVecDocument`/`SteVecEntry`/`SteVecQuery`, plus the shared `SteVecTerm`/`SteVecQueryEntry`/`OreCllw`/`Selector` newtypes) are hand-written for the same reason as its SQL — in `crates/eql-bindings/src/v3/jsonb.rs`, symmetric with `src/v3/jsonb/` — their field layout (`#[serde(flatten)]`, an `Option` array marker, per-struct serde strictness) isn't derivable from the catalog the way a flat scalar struct is. Only inventory membership and ordering are catalog-driven: `inventory.rs::all()` iterates the full `CATALOG` (not `scalar_families()`), branching on `Shape` to include the three jsonb structs alongside the generated ones. + +**Adding a new encrypted-domain type: follow `docs/reference/adding-a-scalar-encrypted-domain-type.md`.** The mechanics are fixed for ordered scalar domains; the catalog row only declares the name, kind, bare domain names, and terms. New term behavior belongs in the `Term` enum's `impl` methods in `crates/eql-domains/src` with tests, not in free-form catalog data. + +Regeneration is deterministic: an identical `CATALOG` produces byte-identical SQL. If `mise run build` produces unexpected output, the change is in `crates/eql-domains/src` (the catalog/terms) or `crates/eql-codegen/src` (the renderers) — not in random run-to-run variation. + +**Committed generated code is never "in conflict" and never needs analysis — the generator is the source of truth.** After anything that changes the catalog (a merge/rebase that pulls in catalog changes, a `crates/eql-domains` edit), the committed generated surfaces (`src/v3/scalars/`, `crates/eql-bindings/{bindings,schema}`, `packages/eql/src/generated`) are brought up to date by **regenerating and committing** — it is a deterministic no-op, not a merge to resolve: + +``` +cargo clean # only if a stale incremental cache makes eql-codegen misbehave (see below) +mise run types:generate && mise run typescript:generate # regenerate bindings +mise run build # regenerate SQL surface +git add -A && git commit +``` + +Do **not** run the drift gates (`types:check` / `typescript:check` / `codegen:parity`) to "diagnose" a stale generated tree — a failing gate after a catalog change trivially means "regenerate and commit," nothing more; run the gates only to *confirm* after committing. And if `eql-codegen` fails to compile against source that is byte-identical to a base that compiles (e.g. `no method named …` on a catalog type), it is a **stale cargo incremental cache**, not a semantic merge break — `cargo clean` fixes it; do not go forensic on the code. + +Footguns the spec exists to prevent: + +- **Blockers must never be `STRICT`.** A `STRICT` blocker lets PostgreSQL skip the body and return `NULL` on a `NULL` argument, silently bypassing the "operator not supported" exception. +- **No domain-over-domain** (`CREATE DOMAIN a AS b`). Operators resolve against the ultimate base type (`jsonb`), so a derived domain does not inherit the base domain's operator surface — blockers stop engaging. +- **No operator class on a domain.** Index through a functional index on the extractor (`eq_term` / `ord_term`), whose return type already carries a default opclass. +- **Inlinable functions** (extractors, comparison wrappers) need `LANGUAGE sql`, a single-statement `SELECT`, `IMMUTABLE`, and **no `SET` clause** — a pinned `search_path` disables inlining. No per-type allowlist edit: the `pin_search_path.sql` structural rule recognises encrypted-domain functions intrinsically and `tasks/test/splinter.sh` covers the converged extractor/wrapper names. +- **Blockers must be `LANGUAGE plpgsql`, not `LANGUAGE sql`.** The inverse of the rule above. A blocker exists to always raise, but a `LANGUAGE sql` body is inlinable and the planner can elide the call when the result is provably unused (dead `CASE` branch, folded predicate). `LANGUAGE plpgsql` is opaque to the planner, so the call — and its `RAISE` — survives. The blocker renderers in `crates/eql-codegen/src` enforce this; don't "simplify" the rendered blockers to `LANGUAGE sql` even though the body is a single expression. +- **Build with `mise run clean && mise run build`** — a bare build can leave stale `release/*.sql`. ### Testing Infrastructure - Tests are written in Rust using SQLx, located in `tests/sqlx/` - Tests run against PostgreSQL 14, 15, 16, 17 using Docker containers - Use `mise run test --postgres 14|15|16|17` to test against a specific version - Container configuration in `tests/docker-compose.yml` -- SQL test fixtures and helpers in `tests/test_helpers.sql` - Database connection: `localhost:7432` (cipherstash/password) -## Project Learning & Retrospectives +#### Tests run against real encrypted data (hard requirement) -Valuable lessons and insights from completed work: +EQL is searchable encryption; tests MUST use real ciphertexts/index terms from the actual crypto, +never hand-curated or synthetic blobs. Fixtures are **generated** by encrypting plaintext through +cipherstash-client: `mise run test:sqlx:prep` runs `fixture:generate:all` (the +`generate_all_fixtures` test, `--features fixture-gen`, over `eql-domains::CATALOG`) → gitignored +`tests/sqlx/fixtures/eql_v3_*.sql`. -- **SQLx Test Migration (2025-10-24)**: See `docs/retrospectives/2025-10-24-sqlx-migration-retrospective.md` - - Migrated 40 SQL assertions to Rust/SQLx (100% coverage) - - Key insights: Blake3 vs HMAC differences, batch-review pattern effectiveness, coverage metric definitions - - Lessons: TDD catches setup issues, infrastructure investment pays off, code review after each batch prevents compound errors +- The SQLx suite **requires** CipherStash creds — ZeroKMS auth (`CS_CLIENT_ACCESS_KEY` + + `CS_WORKSPACE_CRN`) AND a client key (`CS_CLIENT_ID` + `CS_CLIENT_KEY`); see the + `test:sqlx:prep` comment in `mise.toml`. CI has them. This is expected, not a reason to avoid + generated fixtures. +- Do NOT add static/committed fixtures to dodge the creds dependency. There are no committed + fixture exceptions: the jsonb SteVec document fixture `tests/sqlx/fixtures/v3_ste_vec.sql` is + now generated through the same `FixtureSpec` machinery (`tests/sqlx/src/fixtures/v3_ste_vec.rs`) + and gitignored/regenerated like every scalar fixture — it is not a committed blob to copy. ## Documentation Standards @@ -112,32 +140,21 @@ All SQL functions and types must be documented using Doxygen-style comments: ### Documentation Example ```sql ---! @brief Create encrypted index configuration +--! @brief Convert JSONB hex array to bytea array +--! @internal --! ---! Initializes a new encrypted index configuration for a table column. ---! The configuration tracks encryption settings and index types. +--! Converts a JSONB array of hex-encoded strings into a PostgreSQL bytea array. +--! Used for deserializing binary data (like ORE terms) from JSONB storage. --! ---! @param p_table_name text Table name (schema-qualified) ---! @param p_column_name text Column name to encrypt ---! @param p_index_type text Type of encrypted index (blake3, hmac_256, etc.) +--! @param val jsonb JSONB array of hex-encoded strings +--! @return bytea[] Array of decoded binary values --! ---! @return uuid Configuration ID for the created index ---! ---! @throws unique_violation If configuration already exists for this column ---! ---! @note This function executes DDL and modifies database schema ---! @see eql_v2.activate_encrypted_index ---! ---! @example ---! -- Create blake3 index configuration ---! SELECT eql_v2.create_encrypted_index( ---! 'public.users', ---! 'email', ---! 'blake3' ---! ); -CREATE FUNCTION eql_v2.create_encrypted_index(...) +--! @note Returns NULL if input is JSON null +CREATE FUNCTION ... ``` +(Adapted from a real block in `src/v3/common.sql` — use existing `src/v3` files as the reference for style.) + ### Validation Tools Verify documentation quality: @@ -163,8 +180,8 @@ The documentation is generated in **XML format** as the primary output: - **Location**: `docs/api/xml/` - **Format**: Doxygen XML (v1.15.0) with XSD schemas - **Usage**: Machine-readable, suitable for downstream processing -- **Publishing**: Package with `mise run docs:package` → creates `eql-docs-xml-2.x.tar.gz` -- **Integration**: See `docs/api/README.md` for XML structure and transformation examples +- **Publishing**: Package with `mise run docs:package` → creates `eql-docs-xml-.tar.gz` +- **Integration**: XML output ships with XSD schemas for downstream transformation HTML output is also generated in `docs/api/html/` for local preview only. @@ -173,7 +190,6 @@ HTML output is also generated in `docs/api/html/` for local preview only. - SQL files are modular - put operator wrappers in `operators.sql`, implementation in `functions.sql` - All SQL files must have `-- REQUIRE:` dependency declarations - Build system uses `tsort` to resolve dependency order -- Supabase build excludes operator classes (not supported) - **Documentation**: All functions/types must have Doxygen comments (see Documentation Standards above) ### Function Language Choice (SQL vs PL/pgSQL) @@ -190,7 +206,7 @@ Prefer `LANGUAGE SQL` over `LANGUAGE plpgsql` unless you need procedural feature **Why SQL wins for simple functions:** 1. **Inlining** - PostgreSQL can inline simple SQL functions into the calling query, eliminating function call overhead entirely. PL/pgSQL functions are never inlined. -2. **Index context** - Functions used in index expressions (e.g., `CREATE INDEX ... USING GIN (eql_v2.jsonb_array(col))`) are called on every row insertion/update. Inlining matters. +2. **Index context** - Functions used in index expressions (e.g., `CREATE INDEX ... USING GIN (eql_v3.jsonb_array(col))`) are called on every row insertion/update. Inlining matters. 3. **Simple logic** - A CASE expression is a single statement. PL/pgSQL's procedural features aren't needed. **When PL/pgSQL is appropriate:** @@ -199,16 +215,28 @@ Prefer `LANGUAGE SQL` over `LANGUAGE plpgsql` unless you need procedural feature - Exception handling (`BEGIN...EXCEPTION...END`) - Complex control flow (loops, early returns) - Dynamic SQL (`EXECUTE`) +- Functions that must remain opaque to the planner — typically blockers whose only job is to `RAISE`. `LANGUAGE sql` would be inlined and may be elided when the result is provably unused; `LANGUAGE plpgsql` is never inlined, so the body always runs. See the encrypted-domain footgun list above and the blocker renderers in `crates/eql-codegen/src`. ## Release & changelog discipline -EQL maintains a [Keep-a-Changelog](https://keepachangelog.com/en/1.1.0/)-style `CHANGELOG.md` and per-version upgrade guides under `docs/upgrading/`. The conventions are documented at the top of `CHANGELOG.md`; what follows is what to do when working in this repo. +EQL's release version and changelog are both owned by **[Changesets](https://github.com/changesets/changesets)**. `@cipherstash/eql`'s package version is the single source of truth for the release identity `V` (SQL, the crate, and npm all ship at `V` — see `docs/development/releasing.md`), and the release changelog — **`packages/eql/CHANGELOG.md`** (Changesets writes per-package changelogs; with everything in lockstep at one version, that file covers the whole release) — is **generated from the `.changeset/*.md` files** you add, not hand-edited. The root `CHANGELOG.md` is the frozen pre-3.0 archive. Per-version upgrade guides live under `docs/upgrading/`. What follows is what to do when working in this repo. + +**Cutting a release is scripted — don't hand-roll `gh release create`, and don't hand-edit `CHANGELOG.md`.** The single entrypoint is `.github/workflows/release.yml`: + +- **Final (non-prerelease) release** — from `main`. Changesets maintains a "Version Packages" PR that bumps `V` **and writes the `CHANGELOG.md` section** from the pending changesets; merging that PR triggers `release.yml` to publish npm, publish the crate (via `release-plz.yml`, which crates.io Trusted Publishing requires as the entry point), and build + attach the `eql-` SQL + docs release. +- **Prerelease (alpha/beta/rc)** — from `eql_v3`, via an explicit conventional release commit (`chore(release): ...`) that already pins the prerelease version (Changesets pre-mode). `release.yml` builds SQL + docs and publishes all language packages in one run. Validate on a scratch branch before cutting a real prerelease — a package publish is irreversible. + +Full reference for both: **`docs/development/releasing.md`**. + +The **language binding packages** are generated from the same `eql-domains::CATALOG` as the SQL surface: the **`eql-bindings` crate** (published to crates.io by **release-plz**, tagged `eql-bindings-v`) and the **`@cipherstash/eql` npm package** (published via npm Trusted Publishing from `release.yml`, tagged `eql-typescript-v`). Both bundle the exact self-contained SQL installer/uninstaller they were generated against (the crate exposes it as `eql_bindings::sql`; the npm package via its `./sql` subpath exports). Prerelease release commits on `eql_v3` carry the committed version and bundled SQL for the release; `release.yml` publishes that commit as the prerelease and then dispatches `release-plz.yml` for the crate. release-plz publishes the committed `Cargo.toml` version verbatim and has no absolute-version config, so the release commit must already carry the version pin. ### When you make a user-facing change -If your PR adds, changes, removes, deprecates, or fixes anything observable to a caller — new function, new operator, behaviour change, error message change, performance characteristic that callers might notice (e.g. an index now engages), changed default — **add an entry under `## [Unreleased]` in `CHANGELOG.md` as part of the same PR.** +If your PR adds, changes, removes, deprecates, or fixes anything observable to a caller — new function, new operator, behaviour change, error message change, performance characteristic that callers might notice (e.g. an index now engages), changed default — **add a changeset in the same PR** (`pnpm changeset`, or hand-write a `.changeset/.md`). Do **not** edit `CHANGELOG.md` directly — Changesets assembles it from changeset files at release time. + +Because SQL, the crate, and npm all release in lockstep at one version, **every releasable change needs a changeset** — including SQL-only or crate-only changes. See `.changeset/README.md`. -User-facing means: someone outside EQL would care. If in doubt, add the entry; it's cheap. +User-facing means: someone outside EQL would care. If in doubt, add the changeset; it's cheap. What does *not* need an entry: @@ -218,13 +246,22 @@ What does *not* need an entry: - Documentation typo fixes - Doxygen comments -### How to write the entry +### How to write the changeset -Pick the right section (`Added` / `Changed` / `Deprecated` / `Removed` / `Fixed` / `Security`). Lead with the user-visible fact, then a short "Why." explanation, then a PR link in parentheses. Match the tone and density of existing entries — a single dense paragraph per entry, not a bullet list. +A changeset is a small markdown file: YAML frontmatter selecting the bump type, then the entry body. -Example shape (real entry from `2.3.0`): +```md +--- +'@cipherstash/eql': minor # patch | minor | major — see Versioning below +--- + +**Lead with the user-visible fact.** Then a short "Why." explanation. Match the tone +and density of existing entries — a single dense paragraph, not a bullet list. +``` -> **`=`, `<>`, `~~` (`LIKE`), `~~*` (`ILIKE`) on `eql_v2_encrypted` are now inlinable SQL functions.** The planner can structurally match these operators against the documented functional indexes (`eql_v2.hmac_256(col)` for equality, `eql_v2.bloom_filter(col)` for `LIKE`/`ILIKE`), so bare-form queries (`WHERE col = $1`) engage the index without per-query rewriting. Previously these operators wrapped multi-branch PL/pgSQL bodies that the planner could not inline, forcing seq scans on Supabase / managed Postgres installations that lack operator-class indexes. ([#193](...), [#196](...)) +The body becomes the `CHANGELOG.md` entry; Changesets adds the version heading and the PR/commit link (don't add one by hand). Example body (adapted from `2.3.0`): + +> **`=`, `<>`, `~~` (`LIKE`), `~~*` (`ILIKE`) on `eql_v2_encrypted` are now inlinable SQL functions.** The planner can structurally match these operators against the documented functional indexes (`eql_v2.hmac_256(col)` for equality, `eql_v2.bloom_filter(col)` for `LIKE`/`ILIKE`), so bare-form queries (`WHERE col = $1`) engage the index without per-query rewriting. Previously these operators wrapped multi-branch PL/pgSQL bodies that the planner could not inline, forcing seq scans on Supabase / managed Postgres installations that lack operator-class indexes. ### When a change warrants an upgrade note @@ -239,18 +276,20 @@ The entry under `Changed` / `Deprecated` should cross-link to the `U-NNN`. See ` ### Versioning -The `eql_v2` PostgreSQL schema name is part of the public API and is **independent of the EQL release version**. Major-version bumps to EQL do not rename the schema. When deciding on a version bump: +The `eql_v3` PostgreSQL schema name is part of the public API and is **independent of the EQL release version**: major-version bumps to EQL do not rename the schema. `eql_v3` is **not** a rename of `eql_v2` — it is a distinct surface (the encrypted-domain scalar type families). The earlier `eql_v2` schema was removed in 3.0.0 (a major, public-API-breaking change); it is no longer shipped, and `eql_v3` is the sole surface going forward. When deciding on a version bump: - **Patch (`2.3.x`)** — bug fixes, no behaviour changes - **Minor (`2.x.0`)** — additive changes, behaviour changes that don't break the public API (signatures, schema name, payload format, operator names) - **Major (`3.0.0`)** — only for changes that break the public API. Do not reach for a major bump just because a behaviour change has wide blast radius — that's what upgrade notes are for. +Declare the chosen bump in your changeset's frontmatter (`'@cipherstash/eql': patch|minor|major`). Changesets aggregates all pending changesets to compute the next `V`, which `sync-lockstep-versions.mjs` then propagates to the crate and the bundled SQL. + ### Cutting a release -When a release is being prepared: +Releases are cut by **Changesets**, not by hand — see **`docs/development/releasing.md`** for the full runbook (production and prerelease). In short, for a final release from `main`: + +1. Ensure the work to release has merged to `main`, each PR carrying a changeset. +2. Changesets maintains a **"Version Packages" PR** that bumps `V` and writes the `CHANGELOG.md` section from the pending changesets. Review it. +3. Merge that PR. `release.yml` then publishes npm, dispatches the crate publish, and builds + attaches the `eql-` SQL + docs release automatically. -1. Confirm `[Unreleased]` is non-empty and entries are coherent. -2. Rename `## [Unreleased]` to `## [] — YYYY-MM-DD` and add a fresh empty `[Unreleased]` above it. -3. Update the link references at the bottom of `CHANGELOG.md` (new `[Unreleased]` compare URL, new `[]` tag URL). -4. Commit, then create the GitHub release. The release workflow (`.github/workflows/release-eql.yml`) takes the tag and builds artefacts. -5. The `[]` section is the GitHub release body — paste it verbatim. +Do not hand-edit `CHANGELOG.md` or create the GitHub release manually — Changesets and `release.yml` own all of it. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..3ec2a2f7a --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,133 @@ + +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of + any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, + without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official email address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +support@cipherstash.com. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[Mozilla CoC]: https://github.com/mozilla/diversity +[FAQ]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..608f09650 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,5597 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common 0.1.6", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures 0.2.17", + "zeroize", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", + "zeroize", +] + +[[package]] +name = "aes-gcm-siv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae0784134ba9375416d469ec31e7c5f9fa94405049cf08c5ce5b4698be673e0d" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "polyval", + "subtle", + "zeroize", +] + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.16", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "getrandom 0.3.4", + "once_cell", + "serde", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "allocator-api2" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + +[[package]] +name = "aquamarine" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f50776554130342de4836ba542aa85a4ddb361690d7e8df13774d7284c3d5c2" +dependencies = [ + "include_dir", + "itertools 0.10.5", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", + "zeroize", +] + +[[package]] +name = "async-compression" +version = "0.4.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79b3f8a79cccc2898f31920fc69f304859b3bd567490f75ebf51ae1c792a9ac" +dependencies = [ + "compression-codecs", + "compression-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73112ce9e1059d8604242af62c7ec8e5975ac58ac251686c8403b45e8a6fe778" +dependencies = [ + "event-listener 2.5.3", +] + +[[package]] +name = "async-trait" +version = "0.1.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "atoi" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" +dependencies = [ + "num-traits", +] + +[[package]] +name = "atomic" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89cbf775b137e9b968e67227ef7f775587cde3fd31b0d8599dbd0f598a48340" +dependencies = [ + "bytemuck", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" + +[[package]] +name = "aws-lc-rs" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00" +dependencies = [ + "aws-lc-sys", + "untrusted 0.7.1", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.41.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "backtrace" +version = "0.3.76" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-link", +] + +[[package]] +name = "backtrace-ext" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" +dependencies = [ + "backtrace", +] + +[[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] +name = "base32" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022dfe9eb35f19ebbcb51e0b40a5ab759f46ad60cadf7297e0bd085afb50e076" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" + +[[package]] +name = "base85" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36915bbaca237c626689b5bd14d02f2ba7a5a359d30a2a08be697392e3718079" +dependencies = [ + "thiserror 1.0.69", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +dependencies = [ + "serde_core", +] + +[[package]] +name = "bitvec" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +dependencies = [ + "funty", + "radium", + "tap", + "wyz", +] + +[[package]] +name = "blake3" +version = "1.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0aa83c34e62843d924f905e0f5c866eb1dd6545fc4d719e803d9ba6030371fce" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "cpufeatures 0.3.0", + "zeroize", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdd35008169921d80bc60d3d0ab416eecb028c4cd653352907921d95084790be" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "block-modes" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2211b0817f061502a8dd9f11a37e879e79763e3c698d2418cf824d8cb2f21e" + +[[package]] +name = "borrow-or-share" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" + +[[package]] +name = "borsh" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd1e3f8955a5d7de9fab72fc8373fade9fb8a703968cb200ae3dc6cf08e185a" +dependencies = [ + "borsh-derive", + "bytes", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfcfdc083699101d5a7965e49925975f2f55060f94f9a05e7187be95d530ca59" +dependencies = [ + "once_cell", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "brotli" +version = "8.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bd8b9603c7aa97359dbd97ecf258968c95f3adddd6db2f7e7a5bef101c84560" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "874bb8112abecc98cbd6d81ea4fa7e94fb9449648c93cc89aa40c81c24d7de03" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bumpalo" +version = "3.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" + +[[package]] +name = "bytecheck" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" +dependencies = [ + "bytecheck_derive", + "ptr_meta", + "simdutf8", +] + +[[package]] +name = "bytecheck_derive" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bytecount" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175812e0be2bccb6abe50bb8d566126198344f707e304f45c648fd8f2cc0365e" + +[[package]] +name = "bytemuck" +version = "1.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" +dependencies = [ + "serde", +] + +[[package]] +name = "cached" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9718806c4a2fe9e8a56fd736f97b340dd10ed1be8ed733ed50449f351dc33cae" +dependencies = [ + "ahash 0.8.12", + "cached_proc_macro", + "cached_proc_macro_types", + "hashbrown 0.14.5", + "once_cell", + "thiserror 1.0.69", + "web-time", +] + +[[package]] +name = "cached_proc_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f42a145ed2d10dce2191e1dcf30cfccfea9026660e143662ba5eec4017d5daa" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "cached_proc_macro_types" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" + +[[package]] +name = "cc" +version = "1.2.62" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "chacha20" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + +[[package]] +name = "chrono" +version = "0.4.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common 0.1.6", + "inout", +] + +[[package]] +name = "cipherstash-client" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f97f8cfcd346e687a89016bcdac771609142356bde883ea8b317bb3acb3e397" +dependencies = [ + "aes-gcm-siv", + "anyhow", + "async-mutex", + "async-trait", + "base16ct", + "base64", + "base64ct", + "base85", + "blake3", + "chrono", + "cipherstash-config", + "cipherstash-core", + "cllw-ore", + "cts-common", + "derive_more 1.0.0", + "dirs", + "futures", + "hex", + "hmac", + "itertools 0.12.1", + "lazy_static", + "log", + "miette", + "opaque-debug", + "orderable-bytes", + "ore-rs", + "percent-encoding", + "rand 0.8.6", + "recipher", + "reqwest", + "rmp-serde", + "rust-stemmers", + "rust_decimal", + "serde", + "serde_bytes", + "serde_cbor", + "serde_json", + "serdect", + "sha2", + "stack-auth", + "stack-profile", + "static_assertions", + "thiserror 1.0.69", + "tokio", + "toml", + "tracing", + "url", + "uuid", + "vitaminc", + "vitaminc-protected", + "winnow 0.6.26", + "zeroize", + "zerokms-protocol", +] + +[[package]] +name = "cipherstash-config" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27afe834fb74c0e52290655a5ee9a40dd85c450ea6158d9c7e152a7e61183d91" +dependencies = [ + "bitflags", + "serde", + "serde_json", + "thiserror 1.0.69", +] + +[[package]] +name = "cipherstash-core" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b6cc90478252039aeb9527e8b178684cff7a59271facafb8a411d474d660740" +dependencies = [ + "getrandom 0.2.16", + "hmac", + "lazy_static", + "num-bigint", + "rand 0.8.6", + "regex", + "sha2", + "thiserror 1.0.69", +] + +[[package]] +name = "cllw-ore" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f73a23cbc15404d9b314c03b16a888f798dbc681bceeb2e18674f602f9da02d" +dependencies = [ + "blake3", + "chrono", + "hex", + "orderable-bytes", + "rust_decimal", + "subtle", + "thiserror 1.0.69", + "unicode-normalization", +] + +[[package]] +name = "cmac" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8543454e3c3f5126effff9cd44d562af4e31fb8ce1cc0d3dcd8f084515dbc1aa" +dependencies = [ + "cipher", + "dbl", + "digest 0.10.7", +] + +[[package]] +name = "cmake" +version = "0.1.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" +dependencies = [ + "cc", +] + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "compression-codecs" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce2548391e9c1929c21bf6aa2680af86fe4c1b33e6cea9ac1cfeec0bd11218cf" +dependencies = [ + "brotli", + "compression-core", + "flate2", + "memchr", +] + +[[package]] +name = "compression-core" +version = "0.4.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc14f565cf027a105f7a44ccf9e5b424348421a1d8952a8fc9d499d313107789" + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "const-hex" +version = "1.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e2a781ebdf4467d1428dc4593067825fb646f6871475098d8577421af73558" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "proptest", + "serde_core", +] + +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "critical-section" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" + +[[package]] +name = "crossbeam-channel" +version = "0.5.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82b8f8f868b36967f9606790d1903570de9ceaf870a7bf9fbbd3016d636a2cb2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-queue" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "rand_core 0.6.4", + "typenum", +] + +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "cts-common" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4648220c1c584228c9b655f401c2f743469b29436d9a6f3d542be47ef8e45167" +dependencies = [ + "arrayvec", + "base32", + "cached", + "chrono", + "derive_more 2.1.1", + "either", + "getrandom 0.4.2", + "miette", + "nom", + "regex", + "serde", + "serde_json", + "thiserror 1.0.69", + "tracing", + "url", + "utoipa", + "uuid", + "vitaminc", +] + +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.108", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "data-encoding" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + +[[package]] +name = "dbl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd2735a791158376708f9347fe8faba9667589d82427ef3aed6794a8981de3d9" +dependencies = [ + "generic-array", +] + +[[package]] +name = "der" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" +dependencies = [ + "const-oid", + "pem-rfc7468", + "zeroize", +] + +[[package]] +name = "deranged" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derive_more" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl 1.0.0", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl 2.1.1", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", + "unicode-xid", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "convert_case", + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.108", + "unicode-xid", +] + +[[package]] +name = "deunicode" +version = "1.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "const-oid", + "crypto-common 0.1.6", + "subtle", +] + +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.0", + "crypto-common 0.2.2", +] + +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dummy" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cac124e13ae9aa56acc4241f8c8207501d93afdd8d8e62f0c1f2e12f6508c65" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] + +[[package]] +name = "email_address" +version = "0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" +dependencies = [ + "serde", +] + +[[package]] +name = "enum-as-inner" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "eql-bindings" +version = "3.0.0-alpha.4" +dependencies = [ + "eql-domains", + "schemars", + "serde", + "serde_json", + "ts-rs", +] + +[[package]] +name = "eql-codegen" +version = "0.1.0" +dependencies = [ + "eql-domains", + "minijinja", + "prettyplease", + "proc-macro2", + "quote", + "serde", + "serde_json", + "syn 2.0.108", + "thiserror 2.0.18", +] + +[[package]] +name = "eql-domains" +version = "0.1.0" +dependencies = [ + "proptest", +] + +[[package]] +name = "eql-tests-macros" +version = "0.1.0" +dependencies = [ + "eql-domains", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "eql_tests" +version = "0.1.0" +dependencies = [ + "anyhow", + "chrono", + "cipherstash-client", + "eql-bindings", + "eql-domains", + "eql-tests-macros", + "hex", + "jsonschema", + "paste", + "proptest", + "rust_decimal", + "serde", + "serde_json", + "sqlx", + "tokio", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "etcetera" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" +dependencies = [ + "cfg-if", + "home", + "windows-sys 0.48.0", +] + +[[package]] +name = "event-listener" +version = "2.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" + +[[package]] +name = "event-listener" +version = "5.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "fake" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d391ba4af7f1d93f01fcf7b2f29e2bc9348e109dfdbf4dcbdc51dfa38dab0b6" +dependencies = [ + "deunicode", + "dummy", + "rand 0.8.6", + "uuid", +] + +[[package]] +name = "fancy-regex" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1e1dacd0d2082dfcf1351c4bdd566bbe89a2b263235a2b50058f1e130a47277" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "fastrand" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" + +[[package]] +name = "find-msvc-tools" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" + +[[package]] +name = "flate2" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "fluent-uri" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc74ac4d8359ae70623506d512209619e5cf8f347124910440dbc221714b328e" +dependencies = [ + "borrow-or-share", + "ref-cast", + "serde", +] + +[[package]] +name = "flume" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" +dependencies = [ + "futures-core", + "futures-sink", + "spin", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fraction" +version = "0.15.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e076045bb43dac435333ed5f04caf35c7463631d0dae2deb2638d94dd0a5b872" +dependencies = [ + "lazy_static", + "num", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "funty" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-intrusive" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" +dependencies = [ + "futures-core", + "lock_api", + "parking_lot", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "gethostname" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc3655aa6818d65bc620d6911f05aa7b6aeb596291e1e9f79e52df85583d1e30" +dependencies = [ + "rustix 0.38.44", + "windows-targets 0.52.6", +] + +[[package]] +name = "getrandom" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 5.3.0", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi 6.0.0", + "rand_core 0.10.1", + "wasip2", + "wasip3", + "wasm-bindgen", +] + +[[package]] +name = "ghash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" +dependencies = [ + "opaque-debug", + "polyval", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" + +[[package]] +name = "half" +version = "1.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash 0.8.12", + "allocator-api2", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.1.5", +] + +[[package]] +name = "hashbrown" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash 0.2.0", +] + +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.5", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "hickory-proto" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna", + "ipnet", + "once_cell", + "rand 0.9.4", + "ring", + "thiserror 2.0.18", + "tinyvec", + "tokio", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "moka", + "once_cell", + "parking_lot", + "rand 0.9.4", + "resolv-conf", + "smallvec", + "thiserror 2.0.18", + "tokio", + "tracing", +] + +[[package]] +name = "hkdf" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" +dependencies = [ + "hmac", +] + +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hybrid-array" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" +dependencies = [ + "typenum", +] + +[[package]] +name = "hyper" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "icu_collections" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" + +[[package]] +name = "icu_properties" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "potential_utf", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" + +[[package]] +name = "icu_provider" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +dependencies = [ + "displaydoc", + "icu_locale_core", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "indexmap" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f" +dependencies = [ + "equivalent", + "hashbrown 0.16.0", + "serde", + "serde_core", +] + +[[package]] +name = "inout" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipconfig" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d40460c0ce33d6ce4b0630ad68ff63d6661961c48b6dba35e5a4d81cfb48222" +dependencies = [ + "socket2", + "widestring", + "windows-registry", + "windows-result", + "windows-sys 0.61.2", +] + +[[package]] +name = "ipnet" +version = "2.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + +[[package]] +name = "is_ci" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" + +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.18", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.108", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.108", +] + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08" +dependencies = [ + "cfg-if", + "futures-util", + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "jsonschema" +version = "0.46.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc59d2432e047d6090ba1d83c782d0128bd6203857978218f5614dbd3287281f" +dependencies = [ + "ahash 0.8.12", + "bytecount", + "data-encoding", + "email_address", + "fancy-regex", + "fraction", + "getrandom 0.3.4", + "idna", + "itoa", + "num-cmp", + "num-traits", + "percent-encoding", + "referencing", + "regex", + "regex-syntax", + "serde", + "serde_json", + "unicode-general-category", + "uuid-simd", +] + +[[package]] +name = "jsonwebtoken" +version = "9.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a87cc7a48537badeae96744432de36f4be2b4a34a05a5ef32e9dd8a1c169dde" +dependencies = [ + "base64", + "js-sys", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +dependencies = [ + "spin", +] + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + +[[package]] +name = "libc" +version = "0.2.186" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" + +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +dependencies = [ + "bitflags", + "libc", + "redox_syscall", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "linux-raw-sys" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53" + +[[package]] +name = "litemap" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if", + "digest 0.10.7", +] + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "memo-map" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38d1115007560874e373613744c6fba374c17688327a71c1476d1a5954cc857b" + +[[package]] +name = "micromap" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a86d3146ed3995b5913c414f6664344b9617457320782e64f0bb44afd49d74" + +[[package]] +name = "miette" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f98efec8807c63c752b5bd61f862c165c115b0a35685bdcfd9238c7aeb592b7" +dependencies = [ + "backtrace", + "backtrace-ext", + "cfg-if", + "miette-derive", + "owo-colors", + "supports-color", + "supports-hyperlinks", + "supports-unicode", + "terminal_size", + "textwrap", + "unicode-width 0.1.14", +] + +[[package]] +name = "miette-derive" +version = "7.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "minijinja" +version = "2.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2929e494b2280e1e18959bb2e121da03347ae896896fdfaceaab43c88a02803f" +dependencies = [ + "memo-map", + "serde", +] + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "moka" +version = "0.12.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "957228ad12042ee839f93c8f257b62b4c0ab5eaae1d4fa60de53b27c9d7c5046" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "equivalent", + "parking_lot", + "portable-atomic", + "smallvec", + "tagptr", + "uuid", +] + +[[package]] +name = "nom" +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9761775871bdef83bee530e60050f7e54b1105350d6884eb0fb4f46c2f9405" +dependencies = [ + "memchr", +] + +[[package]] +name = "num" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" +dependencies = [ + "num-bigint", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint-dig" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" +dependencies = [ + "lazy_static", + "libm", + "num-integer", + "num-iter", + "num-traits", + "rand 0.8.6", + "smallvec", + "zeroize", +] + +[[package]] +name = "num-cmp" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa" + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", + "libm", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "critical-section", + "portable-atomic", +] + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "open" +version = "5.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fbaa89d2ddc8473c78a3adf69eea8cffa28c483b8e02a971ef31527cd0fc92c" +dependencies = [ + "is-wsl", + "libc", + "pathdiff", +] + +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + +[[package]] +name = "orderable-bytes" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adba0469737879cabc3bdcaa6a7beb4ff7f5bb4aa5d624816c8bb9d425a7d5df" +dependencies = [ + "chrono", + "rust_decimal", +] + +[[package]] +name = "ore-rs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77fb65718f1aba7bb7f568db90a2b17a48871d83cd9d1101d19fce449dd8dea" +dependencies = [ + "aes", + "block-modes", + "byteorder", + "chrono", + "hex", + "lazy_static", + "num", + "orderable-bytes", + "rand 0.8.6", + "rand_chacha 0.3.1", + "rust_decimal", + "subtle-ng", + "thiserror 1.0.69", + "zeroize", +] + +[[package]] +name = "outref" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a80800c0488c3a21695ea981a54918fbb37abf04f4d0720c453632255e2ff0e" + +[[package]] +name = "owo-colors" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d211803b9b6b570f68772237e415a029d5a50c65d382910b879fb19d3271f94d" + +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pathdiff" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" + +[[package]] +name = "pem" +version = "3.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" +dependencies = [ + "base64", + "serde_core", +] + +[[package]] +name = "pem-rfc7468" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" +dependencies = [ + "base64ct", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkcs1" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" +dependencies = [ + "der", + "pkcs8", + "spki", +] + +[[package]] +name = "pkcs8" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" +dependencies = [ + "der", + "spki", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "polyval" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" + +[[package]] +name = "potential_utf" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.108", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.6+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "proc-macro2" +version = "1.0.102" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e0f6df8eaa422d97d72edcd152e1451618fed47fabbdbd5a8864167b1d4aff7" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "proptest" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" +dependencies = [ + "bit-set", + "bit-vec", + "bitflags", + "num-traits", + "rand 0.9.4", + "rand_chacha 0.9.0", + "rand_xorshift", + "regex-syntax", + "rusty-fork", + "tempfile", + "unarray", +] + +[[package]] +name = "ptr_meta" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +dependencies = [ + "ptr_meta_derive", +] + +[[package]] +name = "ptr_meta_derive" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.18", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand 0.9.4", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.18", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "radium" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" + +[[package]] +name = "rand" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.5", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.16", +] + +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_xorshift" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "513962919efc330f829edb2535844d1b912b0fbe2ca165d613e4e8788bb05a5a" +dependencies = [ + "rand_core 0.9.5", +] + +[[package]] +name = "recipher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9398dce78ddfce08f93e9d9a3ac64d9b0a4fed478c0a82003c6e4c90dc245125" +dependencies = [ + "aes", + "cmac", + "getrandom 0.2.16", + "hex", + "hex-literal", + "opaque-debug", + "rand 0.8.6", + "rand_chacha 0.3.1", + "serde", + "serde_cbor", + "sha2", + "thiserror 1.0.69", + "zeroize", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.16", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "ref-cast" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "referencing" +version = "0.46.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb674900ca31acd75c4aaf63f48e43e719631c0539ea5a9e64163d1296bcb730" +dependencies = [ + "ahash 0.8.12", + "fluent-uri", + "getrandom 0.3.4", + "hashbrown 0.16.0", + "itoa", + "micromap", + "parking_lot", + "percent-encoding", + "serde_json", +] + +[[package]] +name = "regex" +version = "1.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" + +[[package]] +name = "rend" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" +dependencies = [ + "bytecheck", +] + +[[package]] +name = "reqwest" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e0021ea2c22aed41653bc7e1419abb2c97e038ff2c33d0e1309e49a97deec0" +dependencies = [ + "base64", + "bytes", + "futures-core", + "futures-util", + "hickory-resolver", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "resolv-conf" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.16", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rkyv" +version = "0.7.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" +dependencies = [ + "bitvec", + "bytecheck", + "bytes", + "hashbrown 0.12.3", + "ptr_meta", + "rend", + "rkyv_derive", + "seahash", + "tinyvec", + "uuid", +] + +[[package]] +name = "rkyv_derive" +version = "0.7.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "rmp" +version = "0.8.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" +dependencies = [ + "num-traits", +] + +[[package]] +name = "rmp-serde" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" +dependencies = [ + "rmp", + "serde", +] + +[[package]] +name = "rsa" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" +dependencies = [ + "const-oid", + "digest 0.10.7", + "num-bigint-dig", + "num-integer", + "num-traits", + "pkcs1", + "pkcs8", + "rand_core 0.6.4", + "signature", + "spki", + "subtle", + "zeroize", +] + +[[package]] +name = "rust-stemmers" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e46a2036019fdb888131db7a4c847a1063a7493f971ed94ea82c67eada63ca54" +dependencies = [ + "serde", + "serde_derive", +] + +[[package]] +name = "rust_decimal" +version = "1.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c5108e3d4d903e21aac27f12ba5377b6b34f9f44b325e4894c7924169d06995" +dependencies = [ + "arrayvec", + "borsh", + "bytes", + "num-traits", + "rand 0.8.6", + "rkyv", + "serde", + "serde_json", + "wasm-bindgen", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" + +[[package]] +name = "rustc-hash" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustix" +version = "1.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.12.1", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls" +version = "0.23.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" +dependencies = [ + "aws-lc-rs", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.103.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "rusty-fork" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6bf79ff24e648f6da1f8d1f011e9cac26491b619e6b9280f2b47f1774e6ee2" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91c1b7e4904c873ef0710c1f407dde2e6287de2bebc1bbbf7d430bb7cbffd939" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "schemars_derive", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.108", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "seahash" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" + +[[package]] +name = "security-framework" +version = "3.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7f4bc775c73d9a02cde8bf7b2ec4c9d12743edf609006c7facc23998404cd1d" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2691df843ecc5d231c0b14ece2acc3efb62c0a398c7e1d875f3983ce020e3" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d440709e79d88e51ac01c4b72fc6cb7314017bb7da9eeff678aa94c10e3ea8" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde_cbor" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" +dependencies = [ + "half", + "serde", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "serde_json" +version = "1.0.145" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", + "serde_core", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serdect" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f42f67da2385b51a5f9652db9c93d78aeaf7610bf5ec366080b6de810604af53" +dependencies = [ + "base16ct", + "serde", + "zeroize", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "sha1_smol" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures 0.2.17", + "digest 0.10.7", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +dependencies = [ + "digest 0.10.7", + "rand_core 0.6.4", +] + +[[package]] +name = "simd-adler32" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" + +[[package]] +name = "simd_cesu8" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94f90157bb87cddf702797c5dadfa0be7d266cdf49e22da2fcaa32eff75b2c33" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + +[[package]] +name = "simple_asn1" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d585997b0ac10be3c5ee635f1bab02d512760d14b7c468801ac8a01d9ae5f1d" +dependencies = [ + "num-bigint", + "num-traits", + "thiserror 2.0.18", + "time", +] + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +dependencies = [ + "lock_api", +] + +[[package]] +name = "spki" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "sqlx" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fefb893899429669dcdd979aff487bd78f4064e5e7907e4269081e0ef7d97dc" +dependencies = [ + "sqlx-core", + "sqlx-macros", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", +] + +[[package]] +name = "sqlx-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" +dependencies = [ + "base64", + "bytes", + "chrono", + "crc", + "crossbeam-queue", + "either", + "event-listener 5.4.1", + "futures-core", + "futures-intrusive", + "futures-io", + "futures-util", + "hashbrown 0.15.5", + "hashlink", + "indexmap", + "log", + "memchr", + "once_cell", + "percent-encoding", + "rust_decimal", + "serde", + "serde_json", + "sha2", + "smallvec", + "thiserror 2.0.18", + "tokio", + "tokio-stream", + "tracing", + "url", +] + +[[package]] +name = "sqlx-macros" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2d452988ccaacfbf5e0bdbc348fb91d7c8af5bee192173ac3636b5fb6e6715d" +dependencies = [ + "proc-macro2", + "quote", + "sqlx-core", + "sqlx-macros-core", + "syn 2.0.108", +] + +[[package]] +name = "sqlx-macros-core" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19a9c1841124ac5a61741f96e1d9e2ec77424bf323962dd894bdb93f37d5219b" +dependencies = [ + "dotenvy", + "either", + "heck", + "hex", + "once_cell", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2", + "sqlx-core", + "sqlx-mysql", + "sqlx-postgres", + "sqlx-sqlite", + "syn 2.0.108", + "tokio", + "url", +] + +[[package]] +name = "sqlx-mysql" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "bytes", + "chrono", + "crc", + "digest 0.10.7", + "dotenvy", + "either", + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "generic-array", + "hex", + "hkdf", + "hmac", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "percent-encoding", + "rand 0.8.6", + "rsa", + "rust_decimal", + "serde", + "sha1", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.18", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-postgres" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" +dependencies = [ + "atoi", + "base64", + "bitflags", + "byteorder", + "chrono", + "crc", + "dotenvy", + "etcetera", + "futures-channel", + "futures-core", + "futures-util", + "hex", + "hkdf", + "hmac", + "home", + "itoa", + "log", + "md-5", + "memchr", + "once_cell", + "rand 0.8.6", + "rust_decimal", + "serde", + "serde_json", + "sha2", + "smallvec", + "sqlx-core", + "stringprep", + "thiserror 2.0.18", + "tracing", + "whoami", +] + +[[package]] +name = "sqlx-sqlite" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2d12fe70b2c1b4401038055f90f151b78208de1f9f89a7dbfd41587a10c3eea" +dependencies = [ + "atoi", + "chrono", + "flume", + "futures-channel", + "futures-core", + "futures-executor", + "futures-intrusive", + "futures-util", + "libsqlite3-sys", + "log", + "percent-encoding", + "serde", + "serde_urlencoded", + "sqlx-core", + "thiserror 2.0.18", + "tracing", + "url", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "stack-auth" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "756fc8b999d012b560a633849cb48aa30f8f4a1ecc0b6f25c4cea6acc7c88885" +dependencies = [ + "aquamarine", + "base64", + "cts-common", + "jsonwebtoken", + "miette", + "open", + "reqwest", + "serde", + "serde_json", + "stack-profile", + "thiserror 1.0.69", + "tokio", + "tracing", + "url", + "uuid", + "vitaminc", + "vitaminc-protected", + "web-time", + "zeroize", + "zerokms-protocol", +] + +[[package]] +name = "stack-profile" +version = "0.38.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d83d7e0e1e7b6c8dd50200d6564bcc65df8a285ca28f52010c3fd6dbd402845" +dependencies = [ + "dirs", + "gethostname", + "serde", + "serde_json", + "thiserror 1.0.69", + "uuid", +] + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "stringprep" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" +dependencies = [ + "unicode-bidi", + "unicode-normalization", + "unicode-properties", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "subtle-ng" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" + +[[package]] +name = "supports-color" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" +dependencies = [ + "is_ci", +] + +[[package]] +name = "supports-hyperlinks" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e396b6523b11ccb83120b115a0b7366de372751aa6edf19844dfb13a6af97e91" + +[[package]] +name = "supports-unicode" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.108" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "tagptr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417" + +[[package]] +name = "tap" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" + +[[package]] +name = "tempfile" +version = "3.27.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" +dependencies = [ + "fastrand", + "getrandom 0.4.2", + "once_cell", + "rustix 1.1.4", + "windows-sys 0.61.2", +] + +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "terminal_size" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "230a1b821ccbd75b185820a1f1ff7b14d21da1e442e22c0863ea5f08771a8874" +dependencies = [ + "rustix 1.1.4", + "windows-sys 0.61.2", +] + +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "unicode-linebreak", + "unicode-width 0.2.2", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl 2.0.18", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "time" +version = "0.3.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" + +[[package]] +name = "time-macros" +version = "0.2.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", +] + +[[package]] +name = "toml_datetime" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "1.1.1+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" +dependencies = [ + "indexmap", + "serde", + "serde_spanned", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", +] + +[[package]] +name = "toml_edit" +version = "0.25.6+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0db3bae107c9522f86d361697dee1d7386a2ddcf659d5aea5159819a21a3c4a7" +dependencies = [ + "indexmap", + "toml_datetime 1.1.1+spec-1.1.0", + "toml_parser", + "winnow 1.0.3", +] + +[[package]] +name = "toml_parser" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +dependencies = [ + "winnow 1.0.3", +] + +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "async-compression", + "bitflags", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "pin-project-lite", + "tokio", + "tokio-util", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "tracing-core" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "ts-rs" +version = "10.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e640d9b0964e9d39df633548591090ab92f7a4567bc31d3891af23471a3365c6" +dependencies = [ + "lazy_static", + "thiserror 2.0.18", + "ts-rs-macros", +] + +[[package]] +name = "ts-rs-macros" +version = "10.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e9d8656589772eeec2cf7a8264d9cda40fb28b9bc53118ceb9e8c07f8f38730" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", + "termcolor", +] + +[[package]] +name = "typenum" +version = "1.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" + +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + +[[package]] +name = "unicode-bidi" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" + +[[package]] +name = "unicode-general-category" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f" + +[[package]] +name = "unicode-ident" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06" + +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-properties" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" + +[[package]] +name = "unicode-segmentation" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "universal-hash" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" +dependencies = [ + "crypto-common 0.1.6", + "subtle", +] + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utoipa" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bde15df68e80b16c7d16b9616e80770ad158988daa56a27dccd1e55558b0160" +dependencies = [ + "indexmap", + "serde", + "serde_json", + "utoipa-gen", +] + +[[package]] +name = "utoipa-gen" +version = "5.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba0b99ee52df3028635d93840c797102da61f8a7bb3cf751032455895b52ef8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", + "url", + "uuid", +] + +[[package]] +name = "uuid" +version = "1.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddd74a9687298c6858e9b88ec8935ec45d22e8fd5e6394fa1bd4e99a87789c76" +dependencies = [ + "atomic", + "getrandom 0.4.2", + "js-sys", + "md-5", + "serde_core", + "sha1_smol", + "wasm-bindgen", +] + +[[package]] +name = "uuid-simd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b082222b4f6619906941c17eb2297fff4c2fb96cb60164170522942a200bd8" +dependencies = [ + "outref", + "vsimd", +] + +[[package]] +name = "validator" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43fb22e1a008ece370ce08a3e9e4447a910e92621bb49b85d6e48a45397e7cfa" +dependencies = [ + "idna", + "once_cell", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_derive", +] + +[[package]] +name = "validator_derive" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7df16e474ef958526d1205f6dda359fdfab79d9aa6d54bafcb92dcd07673dca" +dependencies = [ + "darling", + "once_cell", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vitaminc" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9807fc6a29a9ab4a9cd24f103573661d7e04d48651ce8c752d32e73a686446" +dependencies = [ + "vitaminc-aead", + "vitaminc-encrypt", + "vitaminc-protected", + "vitaminc-random", + "vitaminc-traits", +] + +[[package]] +name = "vitaminc-aead" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3933759550ab4841536e8d019fc73cd77ec2e43dcdaefa3218936534eefabb8d" +dependencies = [ + "bytes", + "serde", + "vitaminc-protected", + "vitaminc-random", + "zeroize", +] + +[[package]] +name = "vitaminc-encrypt" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdbcfd5e9054ce2a3f0cfac67c3e3164d65f38f3a6d593bc4d5d943e53aaf44" +dependencies = [ + "aes-gcm", + "aws-lc-rs", + "vitaminc-aead", + "vitaminc-protected", + "vitaminc-random", + "zeroize", +] + +[[package]] +name = "vitaminc-protected" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c639c70c23871680d0cedabb2fb8cfd0ff91eb98d90dd27e9bdebf6eac1fd18" +dependencies = [ + "bitvec", + "digest 0.11.3", + "serde", + "serde_bytes", + "subtle", + "vitaminc-protected-derive", + "zeroize", +] + +[[package]] +name = "vitaminc-protected-derive" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "659afc33e7252768204f44bd9f377a120a35dc586aa3538b66a3f4cc54a88653" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "vitaminc-random" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac67bf5f90acc53c87deb5f612ad1beefd0e0e7f5452ab3443d9fa4b0e23f9c5" +dependencies = [ + "getrandom 0.4.2", + "rand 0.10.1", + "thiserror 2.0.18", + "vitaminc-protected", + "vitaminc-random-derives", + "zeroize", +] + +[[package]] +name = "vitaminc-random-derives" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efeeb4347ca86ff167228cfbd655c7a6e8a5bd6f032330ac881d6c4c0441768b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "vitaminc-traits" +version = "0.2.0-pre" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6ef24c094d225d00753134f082eba59ea2ba8d5d0b5ba761c038ca9375b3" +dependencies = [ + "anyhow", + "bytes", + "rmp-serde", + "serde", + "thiserror 2.0.18", + "vitaminc-protected", + "vitaminc-random", + "zeroize", +] + +[[package]] +name = "vsimd" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" + +[[package]] +name = "wait-timeout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" +dependencies = [ + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.3+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" +dependencies = [ + "wit-bindgen 0.57.1", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" +dependencies = [ + "wit-bindgen 0.51.0", +] + +[[package]] +name = "wasite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" + +[[package]] +name = "wasm-bindgen" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "serde", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 2.0.108", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.121" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + +[[package]] +name = "web-sys" +version = "0.3.98" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31141ce3fc3e300ae89b78c0dd67f9708061d1d2eda54b8209346fd6be9a92c" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "whoami" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d4a4db5077702ca3015d3d02d74974948aba2ad9e12ab7df718ee64ccd7e97d" +dependencies = [ + "libredox", + "wasite", +] + +[[package]] +name = "widestring" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72069c3113ab32ab29e5584db3c6ec55d416895e60715417b5b883a357c3e471" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "winnow" +version = "0.6.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e90edd2ac1aa278a5c4599b1d89cf03074b610800f866d4026dc199d7929a28" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.7.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +dependencies = [ + "memchr", +] + +[[package]] +name = "wit-bindgen" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.108", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.108", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] + +[[package]] +name = "writeable" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" + +[[package]] +name = "wyz" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" +dependencies = [ + "tap", +] + +[[package]] +name = "yoke" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] + +[[package]] +name = "zerokms-protocol" +version = "0.12.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc0b6b5e5f6c63d676bb1e1d27bee21b178b71526727e08c3e393dcd3cd3e0a" +dependencies = [ + "base64", + "cipherstash-config", + "const-hex", + "cts-common", + "fake", + "getrandom 0.2.16", + "opaque-debug", + "rand 0.8.6", + "serde", + "static_assertions", + "thiserror 1.0.69", + "utoipa", + "uuid", + "validator", + "zeroize", +] + +[[package]] +name = "zerotrie" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.108", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000..0c8086b8f --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,36 @@ +# Cargo workspace root. +# +# Members: +# crates/eql-domains — the scalar/term catalog (std-only, no deps). Source of +# truth for the Rust generator (Plan 2) and the SQLx test +# harness (Plan 3). +# crates/eql-codegen — the SQL generator binary (stub here; Plan 2 fills it in). +# crates/eql-tests-macros — proc-macros expanding the single scalar-harness +# list into the per-type SQLx-matrix wiring. +# crates/eql-bindings — canonical Rust wire types for EQL payloads, parity- +# tested against the eql-domains catalog. (TypeScript +# bindings and JSON Schemas are generated from these +# types in stacked changes.) +# tests/sqlx — the existing `eql_tests` SQLx integration crate. +# +# resolver = "2" keeps the heavy test-crate feature set (sqlx/tokio/cipherstash- +# client) from unifying into the lean catalog/generator crates. +# +# default-members = ["tests/sqlx"] keeps a bare `cargo test` / `cargo build` at the +# root building only the test crate, exactly as the pre-workspace layout did. +[workspace] +resolver = "2" +members = [ + "crates/eql-domains", + "crates/eql-codegen", + "crates/eql-tests-macros", + "crates/eql-bindings", + "tests/sqlx", +] +default-members = ["tests/sqlx"] + +# Dead code is a hard error. Note: rustc exempts unused `pub` items in a lib, so +# don't `pub` a test-support item unless an integration test consumes it. +[workspace.lints.rust] +dead_code = "deny" +unused_imports = "deny" diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 2df601162..2b351ae03 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -3,81 +3,115 @@ ## Table of Contents - [How this project is organised](#how-this-project-is-organised) + - [The `eql_v3` surface](#the-eql_v3-surface) + - [Repository layout](#repository-layout) - [Set up a local development environment](#set-up-a-local-development-environment) - [Installing mise](#installing-mise) +- [Building](#building) + - [The catalog and code generation](#the-catalog-and-code-generation) + - [The dependency system](#the-dependency-system) + - [Building a release locally](#building-a-release-locally) - [Testing](#testing) - [Running tests locally](#running-tests-locally) + - [Rust workspace tests (no database)](#rust-workspace-tests-no-database) +- [Adding to the `eql_v3` surface](#adding-to-the-eql_v3-surface) + - [Adding a scalar encrypted-domain type](#adding-a-scalar-encrypted-domain-type) + - [Hand-written SQL](#hand-written-sql) + - [Documentation comments](#documentation-comments) - [Releasing](#releasing) -- [Building](#building) - - [Dependencies](#dependencies) - - [Building a release locally](#building-a-release-locally) -- [Structure](#structure) - - [Schema](#schema) - - [Types](#types) - - [Encrypted column type](#encrypted-column-type) - - [Encrypted index term types](#encrypted-index-term-types) - - [Operators](#operators) - - [Working without operators](#working-without-operators) - - [Configuration table](#configuration-table) + - [dbdev](#dbdev) -### How this project is organised +## How this project is organised -Development is managed through [mise](https://mise.jdx.dev/), both locally and [in CI](https://github.com/cipherstash/encrypt-query-language/actions). +Encrypt Query Language (EQL) is a PostgreSQL extension for searchable +encryption. Development is managed through [mise](https://mise.jdx.dev/), both +locally and [in CI](https://github.com/cipherstash/encrypt-query-language/actions). mise has tasks for: -- Building EQL install and uninstall scripts (`build`) +- Building the EQL install and uninstall scripts (`build`) - Starting and stopping PostgreSQL containers (`postgres:up`, `postgres:down`) -- Running unit and integration tests (`test`, `reset`) - -These are the important files in the repo: - -``` +- Running tests and resetting database state (`test`, `reset`) +- Regenerating the encrypted-domain SQL surface from the Rust catalog (run as + part of `build`) +- Validating and generating documentation (`docs:validate`, `docs:generate`) + +### The `eql_v3` surface + +EQL installs a single, self-contained PostgreSQL schema, **`eql_v3`**, which +namespaces the encrypted-domain **scalar type families** (`integer`, `smallint`, +`bigint`, `date`, `timestamp`, `numeric`, `text`, `boolean`, `real`, `double`). +It owns its own copies of the searchable-encrypted-metadata (SEM) index-term +types it needs (`eql_v3.hmac_256`, `eql_v3.ore_block_256`, `eql_v3.bloom_filter`), +so the surface has no dependency on any other EQL schema and installs into a +database with nothing else present. + +> **About `eql_v2`.** Earlier EQL releases shipped an `eql_v2` schema — a +> composite encrypted column type, database-side configuration management, and +> operator-class-on-column indexing. That surface was **removed in 3.0.0**; the +> repo now builds and ships only `eql_v3`, and the encryption client +> (CipherStash Proxy / CipherStash Stack) owns the configuration model the database-side +> `eql_v2` functions previously provided. You will still see `eql_v2` named in +> fork-provenance comments under `src/v3/` (the v3 SEM types were forked from the +> old v2 originals) and in historical records (`CHANGELOG.md`, the v2.x upgrade +> guides) — those mentions are deliberate and do not mean `eql_v2` is installed. + +### Repository layout + +These are the important files and directories in the repo: + +```text . -├── mise.toml <-- the main config file for mise -├── tasks/ <-- mise tasks -├── src/ <-- The individual SQL components that make up EQL -│ ├── blake3/ <-- blake3 index term type -│ ├── encrypted/ <-- Encrypted column type -│ ├── operators/ <-- Operators for the encrypted column type -│ ├── match/ <-- match index term type -│ ├── unique/ <-- unique index term type -│ ├── ore/ <-- ore index term type -│ ├── ore_cllw_u64_8/ <-- ore-cllw fixed index term type -│ ├── ore_cllw_var_8/ <-- ore-cllw variable index term type -│ ├── config/ <-- Configuration management for encrypted columns -│ ├── schema.sql <-- Defines the PostgreSQL schema for namespacing EQL -│ ├── crypto.sql <-- Installs pg_crypto extension, required by ORE -│ ├── common.sql <-- Shared helper functions -│ └── version.sql <-- Defines function to query current EQL version - automatically generated on build -├── docs/ <-- Tutorial, reference, and concept documentation -├── tests/ <-- Unit and integration tests -│ ├── docker-compose.yml <-- Docker configuration for running PostgreSQL instances -│ └── *.sql <-- Helpers and test data loaded during test runs -├── release/ <-- Build artifacts produced by the `build` task -├── examples/ <-- Example uses of EQL in different languages -└── playground/ <-- Playground enviroment for experimenting with EQL and CipherStash Proxy +├── mise.toml <-- the main config file for mise +├── tasks/ <-- mise task scripts (build, test, reset, docs, …) +│ ├── build.sh <-- regenerates + assembles the release SQL +│ ├── test.sh <-- runs the SQLx test suite +│ ├── reset.sh <-- uninstall + install EQL into local postgres +│ ├── postgres.toml <-- postgres:up / postgres:down / postgres:reset +│ ├── docs/ <-- documentation generate/validate tasks +│ └── test/ <-- additional test tasks (self_contained_v3, …) +├── crates/ <-- Rust workspace: catalog, code generator, types +│ ├── eql-domains/ <-- THE catalog (eql-domains::CATALOG): source of truth +│ ├── eql-codegen/ <-- renders the eql_v3 scalar SQL from the catalog +│ ├── eql-bindings/ <-- shared Rust types + generated TS/JSON Schema bindings +│ └── eql-tests-macros/ <-- proc-macros used by the SQLx test matrix +├── src/ <-- SQL components that make up EQL +│ ├── v3/ <-- the self-contained eql_v3 surface +│ │ ├── schema.sql <-- defines the eql_v3 PostgreSQL schema +│ │ ├── crypto.sql <-- crypto helpers (forked for v3) +│ │ ├── common.sql <-- shared helper functions (forked for v3) +│ │ ├── version.sql <-- eql_v3.version() — generated from version.template +│ │ ├── version.template <-- template for version.sql +│ │ ├── sem/ <-- hand-written SEM index-term types (hmac_256, ore_block_256, …) +│ │ ├── scalars/ <-- generated scalar domain families, one dir per type +│ │ │ ├── functions.sql <-- shared blocker for native jsonb operators +│ │ │ └── / <-- e.g. integer/, text/, boolean/ (generated, committed in place) +│ │ ├── jsonb/ <-- jsonb SteVec support +│ │ └── lint/ <-- structural lints +│ ├── deps-v3.txt <-- REQUIRE edges for the v3 surface +│ ├── deps-ordered-v3.txt <-- tsorted build order +│ └── README.md +├── docs/ <-- reference, concept, and API documentation +├── tests/ <-- test framework and fixtures +│ ├── docker-compose.yml <-- Docker config for PostgreSQL 14–17 (port 7432) +│ └── sqlx/ <-- Rust/SQLx test suite +└── release/ <-- build artifacts produced by `mise run build` + ├── cipherstash-encrypt.sql <-- installer + └── cipherstash-encrypt-uninstall.sql <-- uninstaller ``` -Tests are in the `tests/sqlx/` directory using Rust and the SQLx framework. - -We break SQL into small modules named after what they do. - -In general, operator functions are thin wrappers around larger functions that do the actual work. -Put the wrapper functions in `operators.sql` and the larger functions in `functions.sql`. - -Dependencies between SQL in `src/` are declared in a comment at the top of each file. -All SQL files should `REQUIRE` the source file of any other object they reference. - -All files must have at least one declaration, and the default is to reference the schema: - -``` --- REQUIRE: src/schema.sql -``` +> [!IMPORTANT] +> The per-type scalar SQL files (`src/v3/scalars//_types.sql`, +> `*_functions.sql`, `*_operators.sql`, `*_aggregates.sql`) are **generated** +> but **committed in place** (so the shipped SQL is reviewable in diffs and the +> file is consistent with the committed Rust bindings). Never hand-edit them — +> they are overwritten on every build and CI's `codegen:parity` gate fails on any +> drift. See [The catalog and code generation](#the-catalog-and-code-generation). ## Set up a local development environment -> [!IMPORTANT] > **Before you follow this how-to** you need to have this software installed: +> [!IMPORTANT] +> **Before you follow this how-to** you need to have this software installed: > > - [mise](https://mise.jdx.dev/) — see the [installing mise](#installing-mise) instructions > - [Docker](https://www.docker.com/) — see Docker's [documentation for installing](https://docs.docker.com/get-started/get-docker/) @@ -89,10 +123,14 @@ Local development quickstart: git clone https://github.com/cipherstash/encrypt-query-language cd encrypt-query-language -# Install dependencies +# Trust the mise config and install tooling (Rust toolchain, sqlx-cli, …) mise trust --yes -# Build EQL installer and uninstaller, outputting to release/ +# (Optional, recommended) Install the git pre-commit hook that drift-gates the +# generated surfaces (committed SQL + bindings) locally, before push. +mise run install-hooks + +# Build the EQL installer and uninstaller, outputting to release/ mise run build # Start a postgres instance (defaults to PostgreSQL 17) @@ -127,38 +165,118 @@ echo 'eval "$(mise activate bash)"' >> ~/.bashrc echo 'eval "$(mise activate zsh)"' >> ~/.zshrc ``` -We use [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall) for faster installation of tools installed via `mise` and Cargo. -We install `cargo-binstall` via `mise` when installing development and testing dependencies. +We use [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall) for +faster installation of tools installed via mise and Cargo. It is installed via +mise when bootstrapping development and testing dependencies. > [!TIP] -> We provide abbreviations for most of the commands that follow. -> For example, `mise run postgres:setup` can be abbreviated to `mise r s`. -> Run `mise tasks --extended` to see the task shortcuts. +> Many tasks have short aliases. For example, `mise run build` can be +> abbreviated to `mise r b`, and `mise run clean` to `mise r k`. +> Run `mise tasks --extended` to see the available tasks and shortcuts. -## Testing +## Building + +The build regenerates the `eql_v3` scalar SQL surface from the Rust catalog, +resolves SQL dependencies into a single ordered file, and writes the install +and uninstall scripts to `release/`. + +### The catalog and code generation + +The `eql_v3` scalar encrypted-domain types are **generated** from a single Rust +source of truth — the `CATALOG` const in +[`crates/eql-domains/src/lib.rs`](./crates/eql-domains/src/lib.rs). There is no +TOML manifest and no Python. + +Each scalar type is one `DomainFamily` row in `CATALOG`, declaring: + +- the type `name` (e.g. `bigint`), +- its `ScalarKind` (the `kind` field), +- the `Domain`s mapping each generated (bare) domain name to its fixed index + `Term`s (`eq => [Hm]`, `ord` / `ord_ore => [Ore]`), and +- the plaintext `Fixture` value list the SQLx test matrix consumes. + +`mise run build` invokes `cargo run -p eql-codegen`, which regenerates the SQL +surface into `src/v3/scalars//` from `CATALOG` at the start of every build. +For an unchanged catalog, regeneration is deterministic and byte-identical. + +The generated files +(`_types.sql` / `_functions.sql` / `_operators.sql` / +`_aggregates.sql`) carry an `-- AUTOMATICALLY GENERATED FILE` header (the +project-wide marker that `docs:validate` greps for) and are **committed in +place** under `src/v3/scalars//`. Because regeneration is deterministic, a +catalog change shows up as a reviewable diff in these files; `mise run build` +keeps them fresh, and `mise run codegen:parity` (CI + the optional pre-commit +hook) fails if the committed copy ever drifts from the catalog. If +`mise run build` produces unexpected output, the change is in +`crates/eql-domains/src` (the catalog/terms) or `crates/eql-codegen/src` (the +renderers), not in run-to-run variation. + +### The dependency system -There are tests for checking EQL against PostgreSQL versions 14–17, that verify: +SQL sources under `src/v3/` are split into small modules. Dependencies between +them are declared with `-- REQUIRE:` comments at the top of each file — every +file should `REQUIRE` the source of any other object it references. -- Adding, removing, and modifying encrypted data and indexes -- Validating, applying, and removing configuration for encrypted data and encrypted indexes -- Validating schemas for EQL configuration, encrypted data, and encrypted indexes -- Using PostgreSQL operators on encrypted data and indexes (`=`, `<>`, `@>`) +At minimum, a file references the schema: -Tests are written in Rust using the SQLx framework and live in `tests/sqlx/`. +```text +-- REQUIRE: src/v3/schema.sql +``` + +The build collects these edges into `src/deps-v3.txt`, resolves them with +`tsort` into `src/deps-ordered-v3.txt`, and concatenates the files in +dependency order to produce a single installer. The build fails loudly if a +file referenced in the dependency list does not exist. + +The `eql_v3` surface is **self-contained**: no `eql_v2.` reference +appears anywhere under `src/v3/`. This invariant is enforced in CI by +`mise run test:self_contained_v3`. + +### Building a release locally + +To build a release locally, run: -The easiest way to run the tests [is in GitHub Actions](./.github/workflows/test-eql.yml): +```bash +# alias: mise r b +mise run build +``` -- Automatically whenever there are changes in the `sql/`, `tests/`, or `tasks/` directories -- By manually running [the workflow](https://github.com/cipherstash/encrypt-query-language/actions/workflows/test-eql.yml) +This produces two SQL files in `release/`: -You can also [run the tests locally](#running-tests-locally) when doing local development. +- An installer (`cipherstash-encrypt.sql`), and +- An uninstaller (`cipherstash-encrypt-uninstall.sql`) + +> [!TIP] +> A bare build can leave stale generated files. When in doubt, run a clean +> build: +> +> ```bash +> mise run clean && mise run build # alias: mise r k && mise r b +> ``` + +## Testing + +EQL is tested against PostgreSQL versions 14–17. The suite is written in Rust +using the SQLx framework and lives in `tests/sqlx/`. Container configuration is +in `tests/docker-compose.yml`; the database listens on **port 7432** +(`localhost:7432`, user `cipherstash`, password `password`). + +> [!IMPORTANT] +> EQL is searchable encryption, so tests run against **real ciphertexts and +> index terms** produced by the actual crypto — never hand-curated or synthetic +> blobs. Fixtures are generated by encrypting plaintext through +> cipherstash-client, so the SQLx suite **requires** CipherStash credentials +> (ZeroKMS auth plus a client key). CI has them. Do not add static/committed +> fixtures to dodge this dependency. See the `test:sqlx:prep` comment in +> `mise.toml` for the exact environment variables. ### Running tests locally > [!IMPORTANT] -> **Before you run the tests locally** you need to [set up a local dev environment](#set-up-a-local-development-environment). +> **Before you run the tests locally** you need to +> [set up a local dev environment](#set-up-a-local-development-environment). -To run tests locally with PostgreSQL 17: +To run the tests against PostgreSQL 17: ```shell # Start a postgres instance (defaults to PostgreSQL 17) @@ -171,7 +289,8 @@ mise run test mise run postgres:down ``` -You can run the same tasks for Postgres 14, 15, 16, and 17 by specifying arguments: +You can run the same tasks against Postgres 14, 15, and 16 by specifying +arguments: ```shell # Start a postgres 14 instance @@ -184,193 +303,157 @@ mise run test --postgres 14 mise run postgres:down ``` -The configuration for the Postgres containers in `tests/docker-compose.yml`. - Limitations: -- **Volumes for Postgres containers are not persistent.** - If you need to look at data in the container, uncomment a volume in - `tests/docker-compose.yml` -- **You can't run multiple Postgres containers at the same time.** - All the containers bind to the same port (`7543`). If you want to run - multiple containers at the same time, you have to change the ports by - editing `tests/docker-compose.yml` - -## Releasing - -To cut a [release](https://github.com/cipherstash/encrypt-query-language/releases) of EQL: - -1. Draft a [new release](https://github.com/cipherstash/encrypt-query-language/releases/new) on GitHub. -1. Choose a tag, and create a new one with the prefix `eql-` followed by a [semver](https://semver.org/) (for example, `eql-1.2.3`). -1. Generate the release notes. -1. Optionally set the release to be the latest (you can set a release to be latest later on if you are testing out a release first). -1. Click `Publish release`. - -This will trigger the [Release EQL](https://github.com/cipherstash/encrypt-query-language/actions/workflows/release-eql.yml) workflow, which will build and attach artifacts to [the release](https://github.com/cipherstash/encrypt-query-language/releases/). - -#### Public documentation updates - -When a tag with the `eql-` prefix is pushed (for example, `eql-1.2.3`), the workflow at `.github/workflows/rebuild-docs.yml` runs and sends a webhook to our Vercel-hosted public docs site to trigger a rebuild. - -What happens end-to-end: - -- Release EQL builds EQL artifacts and generates API docs (HTML, XML, Markdown). The Markdown frontmatter includes the release version. -- Rebuild Docs posts to the `DOCS_WEBHOOK_URL` secret, which Vercel uses to kick off a fresh build of the public docs. -- The public docs site pulls the latest generated reference (`docs/api/markdown/API.md`) and publishes it under the corresponding version. - -Manual triggers and troubleshooting: +- **Volumes for Postgres containers are not persistent.** If you need to look at + data in the container, uncomment a volume in `tests/docker-compose.yml`. +- **You can't run multiple Postgres containers at the same time.** All the + containers bind to the same port (`7432`). To run multiple containers + concurrently, change the ports in `tests/docker-compose.yml`. -- You can re-run the “Rebuild Docs” workflow from the Actions tab if a build fails downstream. -- Ensure the repository secret `DOCS_WEBHOOK_URL` is set and valid; the workflow simply POSTs to that URL. +### Rust workspace tests (no database) -This mirrors the process used in the sibling `protect` repository so both products’ documentation stay in sync with releases. +The catalog, code generator, and shared types have fast tests that do not need a +database: -### dbdev - -We publish a Trusted Language Extension for PostgreSQL for use on [dbdev](https://database.dev/). -You can find the extension on [dbdev's extension catalog](https://database.dev/cipherstash/eql). - -#### Publishing to dbdev - -**DISCLAIMER:** At the moment, we are manually publishing the extension to dbdev and the versions might not be in sync with the releases on GitHub until we automate this process. - -Steps to publish - -> [!NOTE] -> Make sure you have the [dbdev CLI](https://supabase.github.io/dbdev/cli/) installed and logged in using the `dbdev shared token` in 1Password. - -1. Run `mise run build` to build the extension which will create the following file in the `dbdev` directory. (Note: this release artifact is built from the Supabase release artifact). -2. After the build is complete, you will have a file in the `dbdev` directory called `eql--0.0.0.sql`. -3. Update the file name from `eql--0.0.0.sql` replacing `0.0.0` with the version number of the release. -4. Also update the `eql.control` file with the new version number. -5. Run `dbdev publish` to publish the extension to dbdev. - -Reach out to @calvinbrewer if you need help. +```bash +# Catalog + generator tests (eql-domains, eql-codegen) +mise run test:codegen -## Building +# Compile, lint, and test the std-only workspace crates +mise run test:crates -### Dependencies +# Drift gate: regenerate the SQL surface and fail if committed src/v3/scalars drifts +mise run codegen:parity -SQL sources are split into smaller files in `src/`. -Dependencies are resolved at build time to construct a single SQL file with the correct ordering. +# Assert the eql_v3 surface is self-contained (no eql_v2 leakage) +mise run test:self_contained_v3 +``` -### Building a release locally - -To build a release locally, run: +The catalog is validated by the Rust compiler (an undefined term or unknown +scalar is a compile error) plus catalog `#[test]`s, so many mistakes are caught +without a database at all. + +## Adding to the `eql_v3` surface + +### Adding a scalar encrypted-domain type + +Adding a scalar encrypted-domain type (e.g. a new ordered numeric scalar) is one +`DomainFamily` row in `eql-domains::CATALOG` +([`crates/eql-domains/src/lib.rs`](./crates/eql-domains/src/lib.rs)). New term +behaviour belongs in the `Term` enum's `impl` methods (with tests), not in +free-form catalog data. After editing the catalog, run `mise run build` to +regenerate the SQL surface. + +Follow the reference guide: +[`docs/reference/adding-a-scalar-encrypted-domain-type.md`](./docs/reference/adding-a-scalar-encrypted-domain-type.md). +The mechanics are fixed for ordered scalar domains; the catalog row only +declares the name, kind, bare domain names, and terms. + +A few footguns the generator exists to prevent — worth knowing when reading the +output: + +- **Blockers must never be `STRICT`** and must be `LANGUAGE plpgsql`, not + `LANGUAGE sql`. A blocker exists to always `RAISE`; a `STRICT` or inlinable + body lets the planner skip it and silently bypass the "operator not supported" + exception. +- **No domain-over-domain** (`CREATE DOMAIN a AS b`) and **no operator class on + a domain.** Index through a functional index on the extractor + (`eq_term` / `ord_term`). +- **Inlinable functions** (extractors, comparison wrappers) need `LANGUAGE sql`, + a single-statement `SELECT`, `IMMUTABLE`, and **no `SET` clause** — a pinned + `search_path` disables inlining. + +### Hand-written SQL + +Generated files are overwritten on every build (and CI fails on any drift), so +hand-written SQL never goes in them — even though they are committed. Hand-written +SQL beyond the fixed generated surface goes in +`src/v3/scalars//_extensions.sql` — no auto-generated header, explicit +`-- REQUIRE:` edges, and it is committed (and, unlike the generated files, never +rewritten by the generator). The hand-written SEM index-term types live under +`src/v3/sem/`. + +When adding SQL, follow these conventions: + +- Never drop the configuration table — it may contain customer data and must + survive across EQL versions. +- Everything else should have a `DROP IF EXISTS`. +- Functions should be `DROP` then `CREATE` (not `CREATE OR REPLACE`) — data + types cannot be changed once created, so dropping first is more flexible. +- Keep `DROP` and `CREATE` together in the code. +- In general, put operator wrappers in `operators.sql` and the larger + implementation functions in `functions.sql`. Operator functions are thin + wrappers around the functions that do the actual work. + +### Documentation comments + +All SQL functions and types must be documented with Doxygen-style comments using +the `--!` prefix. At minimum provide `@brief`, plus `@param` for parameters and +`@return` for non-void returns. Verify coverage and required tags with: ```bash -mise run build +mise run docs:validate ``` -This produces two SQL files in `releases/`: - -- An installer (`cipherstash-encrypt.sql`), and -- An uninstaller (`cipherstash-encrypt-uninstall.sql`) - -## Structure +See the **Documentation Standards** section in +[`CLAUDE.md`](./CLAUDE.md) for the full tag list, an annotated example, and the +generation tasks (`mise run docs:generate`). -### Adding SQL - -When adding new SQL files to the project, follow these guidelines: - -- Never drop the configuration table as it may contain customer data and needs to live across EQL versions -- Everything else should have a `DROP IF EXISTS` -- Functions should be `DROP` and `CREATE`, instead of `CREATE OR REPLACE` - - Data types cannot be changed once created, so dropping first is more flexible -- Keep `DROP` and `CREATE` together in the code -- Types need to be dropped last, add to the `666-drop_types.sql` - -### Schema - -EQL is installed into the `eql_v2` PostgreSQL schema. - -### Types - -#### Encrypted column type - -`public.eql_v2_encrypted` is EQL's encrypted column type, defined as PostgreSQL composite type. - -This column type is used for storing the encrypted value and any associated indexes for searching. -The associated indexes are described in the [index term types](#index-term-types) section. - -`public.eql_v2_encrypted` is in the public schema, because once it's used by a user in one of their tables, encrypted column types cannot be dropped without dropping data. - -#### Encrypted index term types - -Each type of encrypted index (`unique`, `match`, `ore`) has an associated type, functions, and operators. - -These are transient runtime types, used internally by EQL functions and operators: - -- `eql_v2.blake3` -- `eql_v2.hmac_256` -- `eql_v2.bloom_filter` -- `eql_v2.ore_cllw_u64_8` -- `eql_v2.ore_cllw_var_8` -- `eql_v2.ore_block_u64_8_256` -- `eql_v2.ore_block_u64_8_256_term` - -The data in the column is converted into these types, when any operations are being performed on that encrypted data. - -### Operators - -Searchable encryption functionality is driven by operators on two types: - -- EQL's `eql_v2_encrypted` column type -- PostgreSQL's `jsonb` column type - -For convenience, operators allow comparisons between `eql_v2_encrypted` and `jsonb` column types. - -Operators allow comparisons between: - -- `eql_v2_encrypted` and `eql_v2_encrypted` -- `jsonb` and `eql_v2_encrypted` -- `eql_v2_encrypted` and `jsonb` +## Releasing -Operators defined on the `eql_v2_encrypted` dispatch to the underlying index terms based on the most efficient order of operations. +EQL releases through a single workflow, `.github/workflows/release.yml`, driven +by **[Changesets](https://github.com/changesets/changesets)** — you do not create +GitHub releases by hand. Finals are cut from `main` (merge the Changesets +"Version Packages" PR); prereleases from `eql_v3` (an explicit `chore(release):` +commit). `release.yml` builds and attaches the SQL + docs artifacts, publishes +the `@cipherstash/eql` npm package and the `eql-bindings` crate, and creates the +`eql-` release — all at one lockstep version. -For example, it is possible to have both `unique` and `ore` indexes defined. -For equality (`=`, `<>`) operations, a `unique` index term is a text comparison and should be preferred over an `ore` index term. +For the full runbook and release architecture, see +**[`docs/development/releasing.md`](./docs/development/releasing.md)**. -The index term types and functions are internal implementation details and should not be exposed as operators on the `eql_v2_encrypted` type. -For example, `eql_v2_encrypted` should not have an operator with the `ore_block_u64_8_256` type. -Users should never need to think about or interact with EQL internals. +User-facing changes need a **changeset** in the same PR (`pnpm changeset`) — +Changesets assembles `CHANGELOG.md` and computes the version from these files, so +do not hand-edit `CHANGELOG.md`. Behaviour callers should be aware of also needs +a numbered upgrade note under `docs/upgrading/`. -#### Working without operators +#### Public documentation updates -There are scenarios where users are unable to install EQL operators in your database. -Users will experience this in more restrictive environments like Supabase. +When a tag with the `eql-` prefix is pushed (for example, `eql-1.2.3`), the +workflow at `.github/workflows/rebuild-docs.yml` runs and sends a webhook to the +Vercel-hosted public docs site to trigger a rebuild. -EQL can still be used, but requires the use of functions instead of operators. +What happens end-to-end: -For example, to perform an equality query: +- Release EQL builds EQL artifacts and generates API docs (HTML, XML, Markdown). + The Markdown frontmatter includes the release version. +- Rebuild Docs posts to the `DOCS_WEBHOOK_URL` secret, which Vercel uses to kick + off a fresh build of the public docs. +- The public docs site pulls the latest generated reference + (`docs/api/markdown/API.md`) and publishes it under the corresponding version. -```sql -SELECT email FROM users WHERE eql_v2.eq(email, $1); -``` +Manual triggers and troubleshooting: -### Configuration table +- You can re-run the "Rebuild Docs" workflow from the Actions tab if a build + fails downstream. +- Ensure the repository secret `DOCS_WEBHOOK_URL` is set and valid; the workflow + simply POSTs to that URL. -EQL uses a table for tracking configuration state in the database, called `public.eql_v2_configuration`. +### dbdev -This table should never be dropped, except by a user explicitly uninstalling EQL. +We publish a Trusted Language Extension for PostgreSQL for use on +[dbdev](https://database.dev/). You can find the extension on +[dbdev's extension catalog](https://database.dev/cipherstash/eql). - +1. Run `mise run build` to build the extension artifacts. +1. Update the artifact file name and the `eql.control` file with the new version + number. +1. Run `dbdev publish` to publish the extension to dbdev. diff --git a/Doxyfile b/Doxyfile index 3e5bb7209..0994f1097 100644 --- a/Doxyfile +++ b/Doxyfile @@ -45,7 +45,11 @@ XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- INPUT = src/ -FILE_PATTERNS = *.sql *.template +# Only the generated *.sql is documented. *.template files are build-time +# sources (they still carry $RELEASE_VERSION placeholders and duplicate their +# generated .sql), so documenting them produced a spurious second `version` +# memberdef with placeholder text. +FILE_PATTERNS = *.sql RECURSIVE = YES EXCLUDE_PATTERNS = *_test.sql diff --git a/README.md b/README.md index 7722cfa72..f5b514aaf 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ # Encrypt Query Language (EQL) [![Test EQL](https://github.com/cipherstash/encrypt-query-language/actions/workflows/test-eql.yml/badge.svg?branch=main)](https://github.com/cipherstash/encrypt-query-language/actions/workflows/test-eql.yml) -[![Release EQL](https://github.com/cipherstash/encrypt-query-language/actions/workflows/release-eql.yml/badge.svg?event=release)](https://github.com/cipherstash/encrypt-query-language/actions/workflows/release-eql.yml) +[![Release EQL](https://github.com/cipherstash/encrypt-query-language/actions/workflows/release.yml/badge.svg?branch=main)](https://github.com/cipherstash/encrypt-query-language/actions/workflows/release.yml) Encrypt Query Language (EQL) is a set of abstractions for transmitting, storing, and interacting with encrypted data and indexes in PostgreSQL. > [!TIP] > **New to EQL?** -> EQL is the basis for searchable encryption functionality when using [Protect.js](https://github.com/cipherstash/protectjs) and/or [CipherStash Proxy](https://github.com/cipherstash/proxy). +> EQL is the basis for searchable encryption functionality when using [CipherStash Stack](https://github.com/cipherstash/stack) and/or [CipherStash Proxy](https://github.com/cipherstash/proxy). Store encrypted data alongside your existing data: @@ -45,7 +45,7 @@ docker run --rm -p 5432:5432 -e POSTGRES_PASSWORD=postgres \ ghcr.io/cipherstash/postgres-eql:17 ``` -EQL is installed automatically on first boot. Pin a specific version with `:17-2.1.8`. Other PostgreSQL majors are available as `:14`, `:15`, `:16`. See [`docker/README.md`](./docker/README.md) for the full tag scheme and details. +EQL is installed automatically on first boot. Pin a specific version with `:17-` (see [releases](https://github.com/cipherstash/encrypt-query-language/releases) for available versions). Other PostgreSQL majors are available as `:14`, `:15`, `:16`. See [`docker/README.md`](./docker/README.md) for the full tag scheme and details. ### Install into an existing database @@ -66,48 +66,31 @@ Execute the install SQL file directly: ## EQL Components -EQL installs and manages the following components +EQL installs the following components into the `eql_v3` schema: -| Name | Entity Type -| ---------------------------------- | --------------- | -| eql_v2.* | Schema | -| public.eql_v2_encrypted | Type | -| public.eql_v2_configuration_state | Type | -| public.eql_v2_configuration | Table | +| Name | Entity Type | Purpose | +| --------------------------------------------------- | ------------- | ------------------------------------------------------------------- | +| `eql_v3` | Schema | Holds EQL operators, term extractors, comparison wrappers, and aggregates | +| `public.`, `public._eq`, `public._ord` | Domain types | Per-scalar encrypted columns (one family per scalar: `integer`, `text`, `timestamp`, …) | +| `public.eql_v3_json` | Domain type | Encrypted JSON (structured-encryption) documents | +| `eql_v3.eq_term` / `ord_term` / `match_term` | Functions | Index-term extractors for functional indexes | -### `eql_v2` Schema +### `eql_v3` Schema -The `eql_v2` schema holds all of the functions, types and operators required to query and interact with encrypted data. -The schema is stateless and the schema can be dropped without risk of data loss. +The `eql_v3` schema holds the operators, term extractors, comparison wrappers, and `MIN` / `MAX` aggregates for the encrypted-domain types. The encrypted-domain types themselves live in `public` (see below), and the internal SEM index-term types live in `eql_v3_internal`. -Updating EQL will drop and re-create the schema. -Unless otherwise documented this is a safe operation that requires no data migration or changes. +Encrypted columns are typed as `public` domains (e.g. `public.eql_v3_text_eq`, `public.eql_v3_json`), and the searchable surface available on a column is fixed by its domain **variant** — there is no database-side configuration state. Which index terms a value carries is decided by the encryption client (CipherStash Stack / CipherStash Proxy). +The domain types deliberately live in `public`, not `eql_v3`, so application tables survive an EQL uninstall: `DROP SCHEMA eql_v3 CASCADE` removes the operators, extractors, and aggregates but leaves the `public`-typed columns (and their data) intact. Re-running the install script is idempotent. -### Configuration Table & Type -The `public.eql_v2_configuration` table holds the searchable encryption configuration. -The `public.eql_v2_configuration_state` type is used by the configuration table. +### Release artifacts -The table and associated type are created in the `public` schema to avoid any risk of data loss when updating or uninstalling EQL. - -EQL updates will automatically migrate the configuration if the internal structure changes. - -On uninstall the configuration table is renamed with a timestamp suffix -The table is not automatically dropped to avoid any potential risk of data loss. - -Renaming avoids potential conflicts in CI pipelines that may repeatedly install and uninstall EQL. - - -### `public.eql_v2_encrypted` Type - -The `public.eql_v2_encrypted` is the type used to define encrypted columns, and is used in customer table definitions. -The type is created in the `public` schema to avoid any risk of data loss when updating or uninstalling EQL. - -Dropping the `public.eql_v2_encrypted` type will remove any associated columns from the database. - -Uninstalling EQL will not drop the `public.eql_v2_encrypted` type to avoid risk of data loss. +EQL v3 prereleases can ship three artifacts under one identity: the SQL + docs +GitHub release, the Rust `eql-bindings` crate, and the TypeScript +`@cipherstash/eql` npm package. The language packages bundle the exact SQL +installer they were generated against. ## Database Permissions @@ -122,13 +105,10 @@ For most use cases, grant the following permissions to the database user that wi -- Database-level permissions GRANT CREATE ON DATABASE your_database TO your_eql_user; --- Schema permissions +-- Schema permissions GRANT USAGE ON SCHEMA public TO your_eql_user; GRANT CREATE ON SCHEMA public TO your_eql_user; --- Configuration table permissions -GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.eql_v2_configuration TO your_eql_user; - -- User table permissions (for encrypted column constraints) GRANT ALTER ON ALL TABLES IN SCHEMA public TO your_eql_user; -- Or grant ALTER on specific tables that will have encrypted columns: @@ -137,10 +117,9 @@ GRANT ALTER ON ALL TABLES IN SCHEMA public TO your_eql_user; **Why these permissions are needed:** -- **CREATE ON DATABASE**: Required to create the `eql_v2` schema, types, and functions during installation -- **CREATE ON SCHEMA public**: Required to create types and tables in the public schema -- **Configuration table access**: EQL manages searchable encryption configuration in `public.eql_v2_configuration` -- **ALTER on user tables**: EQL adds check constraints to encrypted columns for data validation +- **CREATE ON DATABASE**: Required to create the `eql_v3` schema, domain types, and functions during installation +- **CREATE ON SCHEMA public**: Required to add encrypted columns (typed as `public` domains) to tables in the public schema +- **ALTER on user tables**: encrypted-domain `CHECK` constraints are validated on the user tables ### Splitting Read and Write Access @@ -154,7 +133,6 @@ Use during database migrations and EQL installation: -- All default permissions above, plus: GRANT CREATE ON DATABASE your_database TO your_migration_user; GRANT CREATE ON SCHEMA public TO your_migration_user; -GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE public.eql_v2_configuration TO your_migration_user; GRANT ALTER ON ALL TABLES IN SCHEMA public TO your_migration_user; ``` @@ -163,21 +141,23 @@ GRANT ALTER ON ALL TABLES IN SCHEMA public TO your_migration_user; Use for application queries in production: ```sql --- Configuration read access -GRANT SELECT ON TABLE public.eql_v2_configuration TO your_app_user; +-- EQL schema usage (resolves the encrypted operators / extractors) +GRANT USAGE ON SCHEMA eql_v3 TO your_app_user; +GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA eql_v3 TO your_app_user; --- EQL schema usage -GRANT USAGE ON SCHEMA eql_v2 TO your_app_user; -GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA eql_v2 TO your_app_user; +-- eql_v3_internal holds the implementation the public eql_v3 operators dispatch +-- into. Grant it the same way as eql_v3 — explicitly, per runtime role. +GRANT USAGE ON SCHEMA eql_v3_internal TO your_app_user; +GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA eql_v3_internal TO your_app_user; -- User table access (normal application permissions) GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE your_tables TO your_app_user; ``` **Migration Workflow:** -1. Use the migration user to install EQL and configure encrypted columns +1. Use the migration user to install EQL and add encrypted columns 2. Use the runtime user for normal application operations -3. Configuration changes (adding/removing encrypted columns) require the migration user +3. Schema changes (adding/removing encrypted columns) require the migration user ### dbdev @@ -193,33 +173,32 @@ Once EQL is installed in your PostgreSQL database, you can start using encrypted ### Enable encrypted columns -Define encrypted columns using the `eql_v2_encrypted` type, which stores encrypted data as `jsonb` with additional constraints to ensure data integrity. +Define encrypted columns using a `public` encrypted-domain type. Type the column as the **variant** for the capability you need — `public.eql_v3_text_eq` for equality, `public._ord` for range/ordering, `public.eql_v3_text_match` for full-text, `public.eql_v3_json` for encrypted JSON. Each is stored as `jsonb` with a `CHECK` constraint that validates the encrypted payload. **Example:** ```sql --- Step 1: Create a table with an encrypted column +-- Step 1: Create a table with an equality-searchable encrypted column CREATE TABLE users ( id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, - encrypted_email eql_v2_encrypted + encrypted_email public.eql_v3_text_eq ); --- Step 2: Configure the column for encryption/decryption -SELECT eql_v2.add_column('users', 'encrypted_email', 'text'); - --- Step 3: (Optional) Add search indexes -SELECT eql_v2.add_search_config('users', 'encrypted_email', 'unique', 'text'); +-- Step 2: Add a functional index on the term extractor (engages bare-form queries) +CREATE INDEX users_email_eq ON users USING hash (eql_v3.eq_term(encrypted_email)); ``` +See the [SQL support matrix](docs/reference/sql-support.md) for every variant and [Database Indexes](docs/reference/database-indexes.md) for the index recipes. + > [!NOTE] -> You must use [CipherStash Proxy](https://github.com/cipherstash/proxy) or [Protect.js](https://github.com/cipherstash/protectjs) to encrypt and decrypt data. EQL provides the database functions and types, while these tools handle the actual cryptographic operations. +> You must use [CipherStash Proxy](https://github.com/cipherstash/proxy) or [CipherStash Stack](https://github.com/cipherstash/stack) to encrypt and decrypt data. EQL provides the database functions and types, while these tools handle the actual cryptographic operations. ## Encrypt configuration In order to enable searchable encryption, you will need to configure your CipherStash integration appropriately. - If you are using [CipherStash Proxy](https://github.com/cipherstash/proxy), see [this guide](docs/tutorials/proxy-configuration.md). -- If you are using [Protect.js](https://github.com/cipherstash/protectjs), use the [Protect.js schema](https://github.com/cipherstash/protectjs/blob/main/docs/reference/schema.md). +- If you are using [CipherStash Stack](https://github.com/cipherstash/stack), use the [CipherStash Stack schema](https://cipherstash.com/docs/stack/cipherstash/encryption/schema). ## Performance @@ -280,7 +259,7 @@ All SQL functions, types, and operators include: - **@throws** - Exception conditions - **@note** - Important notes and caveats -For contribution guidelines, see [CLAUDE.md](./CLAUDE.md). +For contribution guidelines, see the [development guide](./DEVELOPMENT.md). ### Validation Tools @@ -291,9 +270,9 @@ Verify documentation quality using these scripts: mise run docs:validate # Or run individual checks -./tasks/check-doc-coverage.sh # Check 100% coverage -./tasks/validate-required-tags.sh # Validate @brief, @param, @return -./tasks/validate-documented-sql.sh # Validate SQL syntax +./tasks/docs/validate/coverage.sh # Check 100% coverage +./tasks/docs/validate/required-tags.sh # Validate @brief, @param, @return +./tasks/docs/validate/documented-sql.sh # Validate SQL syntax ``` Documentation validation runs automatically in CI for all pull requests. @@ -304,16 +283,18 @@ These frameworks use EQL to enable searchable encryption functionality in Postgr | Framework | Repo | | ----------- | ------------------------------------------ | -| Protect.js | [Protect.js](https://github.com/cipherstash/protectjs) | +| CipherStash Stack | [CipherStash Stack](https://github.com/cipherstash/stack) | | Protect.php | [Protect.php](https://github.com/cipherstash/protectphp) | | CipherStash Proxy | [CipherStash Proxy](https://github.com/cipherstash/proxy) | ## Versioning -You can find the version of EQL installed in your database by running the following query: +EQL is distributed as a versioned install script (`cipherstash-encrypt.sql`) published with each [GitHub release](https://github.com/cipherstash/encrypt-query-language/releases). Track the release tag you installed; re-running the install script is idempotent and upgrades the `eql_v3` surface in place. + +You can check the version installed in a database by running: ```sql -SELECT eql_v2.version(); +SELECT eql_v3.version(); ``` ### Upgrading @@ -343,17 +324,17 @@ Follow the instructions in the [dbdev documentation](https://database.dev/cipher ### Common Errors -**Error: "Some pending columns do not have an encrypted target"** -- **Cause**: Trying to configure a column that doesn't exist as `eql_v2_encrypted` type -- **Solution**: First create the column: `ALTER TABLE table_name ADD COLUMN column_name eql_v2_encrypted;` +**A query returns no rows / silently runs native `jsonb` semantics** +- **Cause**: the query operand was an untyped literal, so PostgreSQL flattened the `eql_v3` domain to its `jsonb` base type and resolved the native operator +- **Solution**: type the operand — `WHERE col = $1::public.eql_v3_text_eq` (CipherStash Proxy supplies typed parameters automatically) -**Error: "Config exists for column: table_name column_name"** -- **Cause**: Attempting to add a column configuration that already exists -- **Solution**: Use `eql_v2.add_search_config()` to add indexes, or `eql_v2.remove_column()` first to reconfigure +**Error: "operator not supported" (raised)** +- **Cause**: the operator is blocked for the column's domain variant (e.g. `<` on an `_eq` column, or `LIKE` on any encrypted column) +- **Solution**: type the column as a variant that carries the required term (see the [SQL support matrix](docs/reference/sql-support.md)); use `@>` rather than `LIKE` for text match -**Error: "No configuration exists for column: table_name column_name"** -- **Cause**: Trying to add search configuration before configuring the column -- **Solution**: Run `eql_v2.add_column()` first, then add search indexes +**`=` returns no rows on a populated column** +- **Cause**: the column's values do not carry an `hm` equality term +- **Solution**: confirm the encryption client is configured to emit the equality term for the column's variant, and that data was written after configuring it ### Getting Help diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..fa33d9950 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,75 @@ +# Security Policy + +CipherStash takes the security of our software, infrastructure, and customers extremely seriously. +This document describes the security posture and reporting process for this repository. + +## Supported Versions + +EQL is distributed as a versioned SQL install bundle (`cipherstash-encrypt.sql`) attached to [GitHub releases](https://github.com/cipherstash/encrypt-query-language/releases), as the `ghcr.io/cipherstash/postgres-eql` Docker image, and via [dbdev](https://database.dev/cipherstash/eql). + +**Security fixes are released for the latest release line.** Security reports are welcome for any version, but fixes land in the latest release — if you are running an older version, plan to upgrade to receive them. + +Note that EQL itself performs no encryption or decryption: cryptographic operations are performed by the encryption client ([CipherStash Stack](https://github.com/cipherstash/stack), [CipherStash Proxy](https://github.com/cipherstash/proxy)). Vulnerabilities in those components are also in scope for the reporting process below — we will route them to the right team. + +## Reporting a Vulnerability + +If you believe you have found a security vulnerability in any CipherStash code, service, or dependency: + +📧 **Please email: `security@cipherstash.com`** + +We request that you **do not publicly disclose** the issue before we have had a chance to investigate and provide a fix. + +When reporting, please include (as applicable): + +- Description of the vulnerability +- Steps to reproduce +- Impact assessment or potential misuse +- Any relevant logs, PoCs, or screenshots +- Suggested remediation (if you have one) + +We will acknowledge receipt within **48 hours** and provide regular updates until the issue is resolved. + +## Disclosure & Response Policy + +CipherStash follows a **coordinated responsible disclosure** process: + +1. **Submit report** privately via `security@cipherstash.com`. +2. **Acknowledgement** within 48 hours. +3. **Assessment** of severity using CVSS and internal risk models. +4. **Fix development** and patch release in a private branch. +5. **Coordinated disclosure**, including: + - New patch release(s) + - Security advisory on GitHub + - Credit to reporter (optional) + +We will never take legal action against good-faith security researchers who follow this policy. + +## Scope + +The following are **in scope**: + +- The `cipherstash/encrypt-query-language` GitHub repository +- Released SQL install bundles and the `postgres-eql` Docker image recipe +- EQL's encrypted index-term handling, operators, and type machinery +- Documentation or code examples that could lead to insecure usage +- CipherStash's internal infrastructure +- CipherStash Stack, Proxy, ZeroKMS, or other CipherStash products + +The following are **out of scope**: + +- Social engineering, physical attacks, or denial-of-service +- Attacks requiring privileged access to developer machines or CI/CD infrastructure + +## Questions? + +For general questions about CipherStash security practices (not security incidents), contact: + +📧 **support@cipherstash.com** + +For vulnerability disclosures: + +📧 **security@cipherstash.com** + +--- + +Thank you for helping keep the CipherStash ecosystem secure. diff --git a/SUPABASE.md b/SUPABASE.md index 4f2cea50b..2e1afcae1 100644 --- a/SUPABASE.md +++ b/SUPABASE.md @@ -1,146 +1,225 @@ -# Supabase - -## No operators, no problems - -Supabase [does not currently support](https://github.com/supabase/supautils/issues/72) custom operators. -The EQL operator functions can be used in this situation. - -In EQL, PostgreSQL operators are an alias for a function, so the implementation and behaviour remains the same across operators and functions. - -| Operator | Function | Example | -| -------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| `=` | `eql_v2.eq(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.eq(encrypted_email, $1)`
| -| `<>` | `eql_v2.neq(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.neq(encrypted_email, $1)`
| -| `<` | `eql_v2.lt(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.lt(encrypted_email, $1)`
| -| `<=` | `eql_v2.lte(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.lte(encrypted_email, $1)`
| -| `>` | `eql_v2.gt(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.gt(encrypted_email, $1)`
| -| `>=` | `eql_v2.gte(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.gte(encrypted_email, $1)`
| -| `~~` | `eql_v2.like(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.like(encrypted_email, $1)`
| -| `~~*` | `eql_v2.ilike(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.ilike(encrypted_email, $1)`
| -| `LIKE` | `eql_v2.like(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.like(encrypted_email, $1)`
| -| `ILIKE` | `eql_v2.ilike(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.ilike(encrypted_email, $1)`
| -| `@>` | `eql_v2.ste_vec_contains(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.ste_vec_contains(encrypted_array, $1)`
| -| `<@` | `eql_v2.ste_vec_contains(eql_v2_encrypted, eql_v2_encrypted)` | `SELECT * FROM users WHERE eql_v2.ste_vec_contains($1, encrypted_array)`
| - -### Core Functions - -| Function | Description | Exa mple | -| --------------------------------- | --------------------------------------------------------- | ----------------------------------------------- | -| `eql_v2.ciphertext(val)` | Extract ciphertext from encrypted value | `SELECT eql_v2.ciphertext (encrypted_field)` | -| `eql_v2.blake3(val)` | Extract blake3 hash from encrypted value | `SELECT eql_v2.blake3( encrypted_field)` | -| `eql_v2.hmac_256(val)` | Extract hmac_256 index from encrypted value | `SELECT eql_v2.hmac_256(encrypted_fie ld)` | -| `eql_v2.bloom_filter(val)` | Extract match index from encrypted value | `SELECT eql_v2.bloom_filter(encrypted_field)` | -| `eql_v2.ore_block_u64_8_256(val)` | Extract ORE index from encrypted value | `SELECT eql_v2.ore_block_u64_8_256(encrypted_field)` | -| `eql_v2.ore_cllw_u64_8(val)` | Extract CLLW ORE index from encrypted value | `SELECT eql_v2.ore_cllw_u64_8(encrypted_fie ld)` | -| `eql_v2.ore_cllw_var_8(val)` | Extract variable CLLW ORE index from encrypted value | `SELECT eql_v2.ore_cllw_var_8( encrypted_field)` | - -### Aggregate Functions - -| Function | Description | Example | -| ----------------- | --------------------------------------- | ------------------------------------ | -| `eql_v2.min(val)` | Get minimum value from encrypted column | `SELECT eql_v2.min(encrypted_field)` | -| `eql_v2.max(val)` | Get maximum value from encrypted column | `SELECT eql_v2.max(encrypted_field)` | - -### Configuration Functions - -| Function | Description | Example | -| ---------------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------- | -| `eql_v2.config_default(config)` | Get default configuration | `SELECT eql_v2.config_default(NULL)` | -| `eql_v2.config_add_table(table_name, config)` | Add table to configuration | `SELECT eql_v2.config_add_table('users', config)` | -| `eql_v2.config_add_column(table_name, column_name, config)` | Add column to configuration | `SELECT eql_v2.config_add_column('users', 'email', config)` | -| `eql_v2.config_add_cast(table_name, column_name, cast_as, config)` | Add cast configuration | `SELECT eql_v2.config_add_cast('users', 'email', 'text', config)` | -| `eql_v2.config_add_index(table_name, column_name, index_name, opts, config)` | Add index to configuration | `SELECT eql_v2.config_add_index('users', 'email', 'match', opts, config)` | -| `eql_v2.config_match_default()` | Get default match index options | `SELECT eql_v2.config_match_default()` | - -### Example SQL Statements - -#### Equality `=` - -**Operator** +# EQL on Supabase and managed PostgreSQL -```sql -SELECT * FROM users WHERE encrypted_email = $1 -``` +EQL's `eql_v3` surface is designed to work on Supabase and other managed +PostgreSQL deployments where you cannot run as superuser, cannot install +custom operator classes, and cannot edit `postgresql.conf` per session. + +There is **no separate Supabase build of EQL**. The single installer +(`release/cipherstash-encrypt.sql`) is the same artefact you install +everywhere. This page explains *why* `eql_v3` runs on Supabase unchanged, +and the small number of things you do differently on a managed platform. + +## Why `eql_v3` works on Supabase + +Earlier EQL relied on PostgreSQL operator classes to make encrypted +comparisons engage indexes. Operator classes require elevated privileges +and Supabase [does not support custom operators](https://github.com/supabase/supautils/issues/72), +so that recipe needed a cut-down build. -**Function** +`eql_v3` removes the dependency entirely. Every encrypted column is typed as +a `jsonb`-backed **domain** in the `public` schema (for example +`public.eql_v3_text_eq`, `public.eql_v3_integer_ord`, `public.eql_v3_json`), and search is driven by +**functional indexes over small term-extractor functions** rather than an +operator class on the column: + +- `eql_v3.eq_term(col)` — the equality (`hm` / hmac_256) term. +- `eql_v3.ord_term(col)` — the ordering (`ob` / ore_block_256) term. +- `eql_v3.match_term(col)` — the text-containment (`bf` / bloom_filter) term. + +These extractors are inlinable (`LANGUAGE sql`, single `SELECT`, `IMMUTABLE`, +no pinned `search_path`), so the planner rewrites a bare-form predicate into +the same expression as the index and matches it structurally — no per-query +rewriting required. Creating a functional index needs no superuser and no +operator class, so the recipe is identical on Supabase, RDS, Cloud SQL, and a +self-hosted server: ```sql -SELECT * FROM users WHERE eql_v2.eq(encrypted_email, $1) +-- Equality (hash index on the eq_term extractor) +CREATE INDEX users_email_eq ON users USING hash (eql_v3.eq_term(encrypted_email)); + +-- Ordering / range (btree index on the ord_term extractor) +CREATE INDEX events_at_ord ON events USING btree (eql_v3.ord_term(encrypted_at)); + +-- Text containment (GIN index on the match_term extractor) +CREATE INDEX users_name_match ON users USING gin (eql_v3.match_term(encrypted_name)); + +ANALYZE users; ``` -#### Like & ILIKE `~~, ~~*` +`eql_v3` deliberately ships **no** `encrypted_operator_class`, so there is +nothing operator-class-shaped to install and nothing that needs superuser. +See [Database Indexes for Encrypted Columns](./docs/reference/database-indexes.md) +for the full recipes, GIN containment, and large-table build guidance. + +## Typed columns, not database-side config + +`eql_v3` has **no database-side configuration API**. The earlier +`config_add_table` / `config_add_column` / `config_add_index` functions are +gone. The searchable surface of a column is fixed by the **domain variant you +type it as**, and which index terms travel in a value's payload is decided by +the encryption client — [CipherStash Proxy](https://github.com/cipherstash/proxy) +or [CipherStash Stack](https://github.com/cipherstash/stack): + +- `public._eq` carries an `hm` term — supports `=` / `<>`, `GROUP BY`, `DISTINCT`. +- `public._ord` (and the `_ord_ore` twin) carries an `ob` term — adds `<` `<=` `>` `>=`, `ORDER BY`, `MIN` / `MAX`. +- `public.eql_v3_text_match` carries a `bf` term — supports bloom-filter token containment (`@>` / `<@`). +- `public.eql_v3_text_search` carries all three terms — equality, ordering, and containment on `text`. + +Configuring those columns is a client-side concern. See: + +- [CipherStash Proxy configuration tutorial](./docs/tutorials/proxy-configuration.md) +- [CipherStash Stack schema reference](https://cipherstash.com/docs/stack/cipherstash/encryption/schema) + +## Operators on Supabase + +In `eql_v3`, each supported SQL operator is an alias for an EQL function, so +implementation and behaviour are identical whether you write the operator or +the function. The operator forms are inlinable and engage the functional +indexes above, so the operator form is the recommended one. The function +equivalents exist for environments or query builders where the bare operator +is awkward to express. + +| Operator | Function equivalent | Example | +| -------- | -------------------------------------------------- | ----------------------------------------------------------------- | +| `=` | `eql_v3.eq(col, $1)` | `SELECT * FROM users WHERE eql_v3.eq(encrypted_email, $1)` | +| `<>` | `eql_v3.neq(col, $1)` | `SELECT * FROM users WHERE eql_v3.neq(encrypted_email, $1)` | +| `<` | `eql_v3.lt(col, $1)` | `SELECT * FROM events WHERE eql_v3.lt(encrypted_at, $1)` | +| `<=` | `eql_v3.lte(col, $1)` | `SELECT * FROM events WHERE eql_v3.lte(encrypted_at, $1)` | +| `>` | `eql_v3.gt(col, $1)` | `SELECT * FROM events WHERE eql_v3.gt(encrypted_at, $1)` | +| `>=` | `eql_v3.gte(col, $1)` | `SELECT * FROM events WHERE eql_v3.gte(encrypted_at, $1)` | +| `@>` | `eql_v3.contains(col, $1)` | `SELECT * FROM users WHERE eql_v3.contains(encrypted_name, $1)` | +| `<@` | `eql_v3.contained_by(col, $1)` | `SELECT * FROM users WHERE eql_v3.contained_by(encrypted_name, $1)` | -**Operator** +`eql_v3.eq` / `neq` / `lt` / `lte` / `gt` / `gte` / `contains` / +`contained_by` are each overloaded for `(domain, domain)`, `(domain, jsonb)`, +and `(jsonb, domain)`, so a `jsonb` operand is accepted directly and resolved +against the typed side. + +### Equality `=` + +Operator form (recommended — engages the index): ```sql -SELECT * FROM users WHERE encrypted_email LIKE $1 +SELECT * FROM users WHERE encrypted_email = $1; ``` -**Function** +Function form (equivalent): ```sql -SELECT * FROM users WHERE eql_v2.like(encrypted_email, $1) +SELECT * FROM users WHERE eql_v3.eq(encrypted_email, $1); ``` -#### Case Sensitivity +### Range and ordering `<` `<=` `>` `>=` -The EQL `eql_v2.like` and `eql_v2.ilike` functions are equivalent. +The column must be typed as an `_ord` / `_ord_ore` variant (or +`text_search`) so it carries the `ob` term: -The behaviour of EQL's encrypted `LIKE` operators is slightly different to the behaviour of PostgreSQL's `LIKE` operator. -In EQL, the `LIKE` operator can be used on `match` indexes. -Case sensitivity is determined by the [index term configuration](./docs/reference/INDEX.md#options-for-match-indexes-opts) of `match` indexes. -A `match` index term can be configured to enable case sensitive searches with token filters (for example, `downcase` and `upcase`). -The data is encrypted based on the index term configurat ion. -The `LIKE` operation is always the same, even if the data is----- tokenised differently. -The different operators are kept to preserve the semantics of SQL statements in client applications. +```sql +SELECT * FROM events WHERE encrypted_at < $1; +SELECT * FROM events WHERE eql_v3.lt(encrypted_at, $1); +``` ### `ORDER BY` -Ordering requires wrapping the ordered column in the `eql_v2.order_by` function, like this: +Ordering uses the same ORE (`ob`) term as range comparisons, on an `_ord` / +`_ord_ore` (or `text_search`) column. The `<`/`>` operators inline in +*predicates*, but the planner does **not** rewrite *sort keys* — so to stream +rows out of the btree already ordered (no `Sort` node), write the sort key in +extractor form: ```sql -SELECT * FROM users ORDER BY eql_v2.order_by(encrypted_created_at) DESC; +SELECT * FROM events + WHERE encrypted_at < $1 + ORDER BY eql_v3.ord_term(encrypted_at) DESC + LIMIT 10; ``` -PostgreSQL uses operators when handling `ORDER BY` operations. The `eql_v2.order_by` function behaves in the same way as the comparison operators, using the appropriate index type (ore_block_u64_8_256, ore_cllw_u64_8, or ore_cllw_var_8) to determine the ordering. +Writing the sort key as `eql_v3.ord_term(col)` is the way to order encrypted +rows directly out of the btree. See the +[sort-key trap](./docs/reference/database-indexes.md#range-queries-and-order-by) +for the full explanation. -### JSONB Support +### Aggregates `MIN` / `MAX` -All comparison functions also support `jsonb` parameters through automatic type casting. This means you can use either `eql_v2_encrypted` or `jsonb` values in your queries: +`MIN` / `MAX` are exposed on the ordered variants as +`eql_v3.min(public._ord)` / `eql_v3.max(public._ord)` (and the +`_ord_ore` twin). Type the column as `_ord`, or cast at the call site: ```sql --- Using eql_v2_encrypted -SELECT * FROM users WHERE eql_v2.eq(encrypted_email, encrypted_value); - --- Using jsonb -SELECT * FROM users WHERE eql_v2.eq(encrypted_email, jsonb_value); +SELECT eql_v3.min(encrypted_at) FROM events; +SELECT eql_v3.max(encrypted_amount::public.eql_v3_integer_ord) FROM orders; ``` -The functions will automatically cast the `jsonb` value to `eql_v2_encrypted` before performing the comparison. +## Text matching (not `LIKE`) -### Array Operations +There is **no SQL `LIKE` / `ILIKE` pattern matching on encrypted text in +`eql_v3`**. The `LIKE` / `ILIKE` operators (`~~` / `~~*`) are blocked on every +encrypted domain variant and raise an "operator not supported" exception. -EQL supports array operations on encrypted data: +Text search is now **bloom-filter token containment** via `@>` / `<@` on a +column typed `public.eql_v3_text_match` or `public.eql_v3_text_search`. This tests whether +the encrypted text contains the (encrypted) search terms — a probabilistic +ngram match, not a SQL pattern match: ```sql --- Get array length -SELECT eql_v2.jsonb_array_length(encrypted_array) FROM users; +-- Column typed public.eql_v3_text_match or public.eql_v3_text_search, +-- with: CREATE INDEX ... USING gin (eql_v3.match_term(encrypted_name)); +SELECT * FROM users WHERE encrypted_name @> $1; +SELECT * FROM users WHERE eql_v3.contains(encrypted_name, $1); +``` + +Case sensitivity and tokenisation are properties of how the value was +encrypted (token filters configured in the client), not of the SQL operator. +See the [SQL support matrix](./docs/reference/sql-support.md) for which +operator resolves on which variant. --- Get array elements -SELECT eql_v2.jsonb_array_elements(encrypted_array) FROM users; +## Encrypted JSON documents --- Get array element ciphertexts -SELECT eql_v2.jsonb_array_elements_text(encrypted_array) FROM users; +`public.eql_v3_json` is the structured-encryption (ste_vec) document domain. It +supports document containment (`@>` / `<@`), field access (`->` / `->>`), and +the `eql_v3.jsonb_path_*` helper functions, all without operator classes: + +```sql +-- Document containment (GIN-indexable on Supabase) +SELECT * FROM orders WHERE data_encrypted @> $1::eql_v3.query_jsonb; + +-- Field access (selector is the deterministic selector hash, typed as text) +SELECT data_encrypted -> ''::text FROM orders; ``` -### JSON Path Operations +For containment indexing, build a GIN index over the query shape — see +[GIN Indexes for JSONB Containment](./docs/reference/database-indexes.md#gin-indexes-for-jsonb-containment). +Worked examples are in [EQL with JSON and JSONB](./docs/reference/json-support.md). + +## Typed operands matter -EQL supports JSON path operations on encrypted data: +For the encrypted operator (and therefore the functional index) to resolve, +the comparison operand must carry a known type — a typed parameter (`$1`, +which CipherStash Proxy supplies) or an explicit cast: ```sql --- Get encrypted value at path -SELECT encrypted_data->'$.field' FROM users; +-- ✓ resolves the encrypted operator → uses the index +WHERE encrypted_email = $1; +WHERE encrypted_email = $1::public.eql_v3_text_eq; --- Get ciphertext at path -SELECT encrypted_data->>'$.field' FROM users; +-- ✗ a bare jsonb literal falls through to native jsonb semantics +WHERE encrypted_email = '{"hm":"abc"}'::jsonb; ``` + +CipherStash Proxy rewrites bound parameters so the encrypted operator and any +functional indexes are selected automatically. When bypassing the Proxy, type +the parameter yourself. + +## See also + +- [Database Indexes for Encrypted Columns](./docs/reference/database-indexes.md) — functional-index and GIN recipes, plus large-table build guidance. +- [SQL support matrix](./docs/reference/sql-support.md) — which operators work against which domain variant. +- [EQL Functions Reference](./docs/reference/eql-functions.md) — complete function and operator API. +- [EQL with JSON and JSONB](./docs/reference/json-support.md) — `public.eql_v3_json` worked examples. +- [CipherStash Proxy configuration tutorial](./docs/tutorials/proxy-configuration.md) — setting up encrypted columns end to end. + +--- + +### Didn't find what you wanted? + +[Click here to let us know what was missing from our docs.](https://github.com/cipherstash/encrypt-query-language/issues/new?template=docs-feedback.yml&title=[Docs:]%20Feedback%20on%20SUPABASE.md) diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 000000000..c0223eaa5 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,34 @@ +# git-cliff changelog template for release-plz (mirrors cipherstash-suite). +# Drives the per-crate CHANGELOG.md that release-plz generates for eql-bindings. +# The repository-root CHANGELOG.md is the hand-maintained EQL SQL-surface +# changelog and is NOT touched by release-plz. +[changelog] +header = "" +body = """ +{% for group, commits in commits | group_by(attribute="group") %} +### {{ group | upper_first }} +{% for commit in commits %} +- {{ commit.message | split(pat="\n") | first | trim }}\ +{% endfor %} +{% endfor %} +""" +trim = true + +[git] +conventional_commits = true +filter_unconventional = false +# `review(...)` commits are PR-feedback housekeeping (addressing reviewer +# comments). They don't represent user-facing changes — the underlying +# feat/fix/refactor commits already capture those — so skip them rather than +# letting the raw `review` type become a stray "### Review" changelog section. +commit_parsers = [ + { message = "^review", skip = true }, + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Fixes" }, + { message = "^docs", group = "Documentation" }, + { message = "^perf", group = "Performance" }, + { message = "^refactor", group = "Refactoring" }, + { message = "^test", group = "Testing" }, + { message = "^chore", group = "Miscellaneous" }, + { message = "^ci", group = "CI" }, +] diff --git a/crates/eql-bindings/.gitignore b/crates/eql-bindings/.gitignore new file mode 100644 index 000000000..4fffb2f89 --- /dev/null +++ b/crates/eql-bindings/.gitignore @@ -0,0 +1,2 @@ +/target +/Cargo.lock diff --git a/crates/eql-bindings/CHANGELOG.md b/crates/eql-bindings/CHANGELOG.md new file mode 100644 index 000000000..6c96e809a --- /dev/null +++ b/crates/eql-bindings/CHANGELOG.md @@ -0,0 +1,121 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +### Added + +- **Scalar query-operand bindings (CIP-3432).** Every term-bearing scalar + domain now has a generated query twin — `IntegerEqQuery`, `IntegerOrdOpeQuery`, + `TextSearchQuery`, … — the **enveloped term-only** operand `{v, i, }` + (envelope minus the ciphertext `c`) for its `eql_v3.query_` query + domain, with matching TypeScript bindings (`bindings/v3/*Query.ts`) and JSON + Schemas (`schema/v3/query_.json`). Storage-only domains (no operators) + get no twin. `QueryPayload` is now catalog-generated — a variant per query + twin plus the SteVec containment needle — superseding the hand-written + single-variant enum. A new `all_query()` inventory exposes the query twins + separately from `all()` (which stays the stored + SteVec conversion-target + inventory). + +### Changed + +- **Query-operand domain names switched to the `query_` prefix, homed + in the `eql_v3` schema (CIP-3442).** The SQL domain names carried by the + query twins — in `DomainType::sql_domain`, the names `QueryPayload::parse` + accepts, and the exported JSON Schema file names — are now `query_` / + `eql_v3.query_` (e.g. `query_integer_eq`), and the SteVec containment + needle is `eql_v3.query_jsonb` (was `public.jsonb_query`). + `DomainType::domain` now strips whichever schema qualifies `sql_domain` + (`public.` for column domains, `eql_v3.` for query operands) instead of + assuming `public.`. Matches the renamed/relocated SQL surface — query + operands are never column types, so they leave the `public` column-type + namespace; supersedes the `public._query` naming shipped only in + 3.0.0 pre-releases. +- **`from_v2_query` / `from_v2_query_typed` now convert scalar query targets.** + A term-bearing scalar target hoists the v2 payload's required terms into the + `{v: 3, i, }` operand for its `query_` domain (dropping the + stored `c`/`k`; `bf` reinterpreted to signed `smallint[]`), validated through + the generated `QueryPayload`. Storage-only scalar targets still return + `UnsupportedQueryTarget`. Previously every scalar query target failed closed. + +## [0.4.2] - 2026-07-03 + +### Fixed + +- Compiling the crate no longer emits ts-rs's "failed to parse serde + attribute" warning for `skip_serializing_if` on `SteVecEntry.a` (the + `no-serde-warnings` feature is enabled). The attribute was always ignored + by design — TS optionality is declared explicitly with + `#[ts(optional = nullable)]` — and the emitted TS/JSON is byte-identical. + +## [0.4.1] - 2026-07-03 + +### Fixed + +- The `from_v2_query_typed` rustdoc links only public items, fixing the + `private_intra_doc_links` lint on docs.rs builds. No API changes. + +## [0.4.0] - 2026-07-03 + +### Added + +- `QueryPayload` — a hand-written enum spanning every v3 QUERY payload shape. + Today that is exactly one variant: `SteVec(SteVecQuery)`, the jsonb + containment needle. The single-term scalar query variants (an Ore / Ope / + Bloom / Hm term value) are deliberately absent until the eql-mapper + redesign defines a v3 scalar-query wire shape — fail-closed, no invented + shapes. Serialize-only (`#[serde(untagged)]` — the wire form is exactly the + inner type's) and constructed only from a known domain + (`QueryPayload::parse`), never inferred from bytes. No ts-rs/schemars + derives: the enum adds no wire shape of its own, so the exported TS / + JSON-Schema artifacts are unchanged. +- `from_v2_query_typed(&Value, TargetDomain) -> Result` — the typed counterpart to `from_v2_query`, sharing its + conversion core and performing the single strict parse as parse-and-keep + instead of validate-and-discard. `from_v2_query -> Value` is unchanged, and + scalar targets still fail with `UnsupportedQueryTarget` on both entry + points. + +## [0.3.0] - 2026-07-03 + +### Added + +- `DomainPayload` — a catalog-generated enum spanning every stored-payload + domain type (all scalar binding structs plus `SteVecDocument`), emitted by + eql-codegen so it cannot drift when the catalog grows a domain. + Serialize-only (`#[serde(untagged)]` — the wire form is exactly the inner + struct's) and constructed only from a known `TargetDomain`, never inferred + from bytes (cross-token payloads are byte-identical on the wire). +- `from_v2_typed(&Value, TargetDomain) -> Result` + — the typed counterpart to `from_v2`, sharing its conversion core and + performing the single strict parse as parse-and-keep instead of + validate-and-discard. `from_v2 -> Value` is unchanged. + +## [0.2.0] - 2026-07-03 + +### Changed + +- **BREAKING**: the EQL envelope version is now `v: 3` (was `v: 2`) — + `EQL_SCHEMA_VERSION`, the `SchemaVersion` newtype, the emitted TypeScript + alias, and the JSON Schema `const` accept exactly `3`, matching the + `eql_v3` domain CHECKs. + +### Added + +- `from_v2` — EQL v2.3 → v3 wire payload conversion: `from_v2(&Value, + TargetDomain)` for storage payloads (fail-closed on missing terms, drops + the v2 `k` discriminator, strict-parses through the target binding type), + `from_v2_query` for jsonb containment needles, and `is_v3_payload` for + envelope sniffing. Zero cipherstash-client dependency. +- SteVec (encrypted JSONB) document surface: `SteVecDocument` (carrying the + `k: "sv"` form discriminator), entry/query types, and the `OreCllw` / + `Selector` term newtypes, with generated inventory, TypeScript bindings, + and JSON Schemas. +- CLLW-OPE ordering term: the `OpeCllw` newtype (`op` wire key) and the + `OrdOpe` binding types for every ordered scalar family. +- `TargetDomain::parse` resolving domain names via the catalog-generated + inventory; `term_json_keys` / `parse_value` threaded through `DomainType`. diff --git a/crates/eql-bindings/Cargo.toml b/crates/eql-bindings/Cargo.toml new file mode 100644 index 000000000..4a4519f58 --- /dev/null +++ b/crates/eql-bindings/Cargo.toml @@ -0,0 +1,41 @@ +[package] +name = "eql-bindings" +version = "3.0.0-alpha.4" +edition = "2021" +description = "Canonical wire types for EQL payloads — single source of truth for Rust, TypeScript (ts-rs), and JSON Schema (schemars)." +# crates.io metadata. `license` is REQUIRED by crates.io — publish fails without +# it. The rest drive discoverability and the docs.rs / crates.io sidebar links. +license = "MIT" +repository = "https://github.com/cipherstash/encrypt-query-language" +homepage = "https://github.com/cipherstash/encrypt-query-language" +readme = "README.md" +keywords = ["encryption", "postgres", "eql", "cipherstash", "searchable"] +categories = ["cryptography", "database"] +include = [ + "Cargo.toml", + "README.md", + "CHANGELOG.md", + "src/**", + "bindings/**", + "schema/**", + "sql/**", +] + +[dependencies] +serde = { version = "1", features = ["derive"] } +# Direct dependency again at this layer: SchemaVersion's manual JsonSchema +# impl pins `const: 2` via serde_json::json!. +serde_json = "1" +# no-serde-warnings: ts-rs's serde-compat vocabulary doesn't include +# `skip_serializing_if`, so it warns and ignores it on SteVecEntry.a — which is +# exactly what we want (TS optionality is declared explicitly via +# `#[ts(optional = nullable)]`). Ignored-attr drift that DID matter would be +# caught by the `types:check` gate on the committed TS/JSON output. +ts-rs = { version = "10", features = ["no-serde-warnings"] } +schemars = "1" + +[dev-dependencies] +# Parity oracle: tests/catalog_parity.rs asserts the v3 domain inventory +# exactly covers eql_domains::CATALOG, so the types here cannot drift from +# the generated SQL surface. +eql-domains = { path = "../eql-domains" } diff --git a/crates/eql-bindings/README.md b/crates/eql-bindings/README.md new file mode 100644 index 000000000..f7c9536ac --- /dev/null +++ b/crates/eql-bindings/README.md @@ -0,0 +1,99 @@ +# eql-bindings + +Canonical wire types for EQL payloads — **one Rust definition per payload +shape**, the single source of truth for every tool that produces or consumes +EQL payloads (`cipherstash-client`, `protect-ffi`, CipherStash Proxy). + +TypeScript bindings are generated from these definitions via [`ts-rs`] into +[`bindings/`](bindings/), and JSON Schemas via [`schemars`] into +[`schema/`](schema/). + +## Why + +Type information is lost at every hop of `EQL → cipherstash-client → +protect-ffi → stack`. protect-ffi hand-writes its TypeScript types; they drift +from the Rust they describe; stack widens them further. The result is bugs +like the `protect-dynamodb` search-term check that validates a payload shape +EQL never actually defined. A generated, single-source crate removes the +hand-copying. + +## Capability-encoded types + +The [`src/v3/`](src/v3/) module has one type per **SQL domain** in the +`eql_v3` schema — `Integer` / `IntegerEq` / `IntegerOrd` / `IntegerOrdOre`, and likewise +for `smallint`, `bigint`, `date`, `timestamp`, `numeric`, and `text` (which adds +`TextMatch`) — each carrying its index terms as **required** fields. The +capability is the type identity; `Option` never appears. A payload missing +its term key fails to deserialize: the Rust analogue of the SQL domain's +CHECK constraint. + +Shared wire fields are reusable newtypes in +[`src/v3/terms.rs`](src/v3/terms.rs): + +| Newtype | Wire key | Inner | Backs | +|---------|----------|-------|-------| +| `Ciphertext` | `c` | `String` | every domain (envelope) | +| `Hmac256` | `hm` | `String` | `_eq` domains | +| `OreBlock256` | `ob` | `Vec` | `_ord` / `_ord_ore` domains | +| `BloomFilter` | `bf` | `Vec` (signed!) | `_match` domains | + +Note "v3" names the SQL schema generation (`eql_v3.*`); the JSON envelope +version is `v: 3` — the generated domain CHECKs assert `VALUE->>'v' = '3'`, and +the wire field names are unchanged from v2 (the purpose-named rename in +`docs/plans/eql-payload-scheme-discipline-rfc.md` is deferred). + +## Drift protection + +`tests/catalog_parity.rs` asserts the domain inventory — +[`v3::all()`](src/v3/mod.rs), a `Vec>` of zero-sized +type-level handles — exactly covers `eql-domains::CATALOG` (the same catalog +that generates the `eql_v3` SQL surface): every domain, in order. Adding a +scalar to the catalog without adding its types here fails the build. +Wire-key strictness (required term keys, unknown-key rejection, envelope +version) is covered per-type in `tests/v3_conformance.rs` and pinned against +the catalog by the JSON Schema parity test in the stacked schemars change. + +## Develop + +```sh +mise run types:generate # clean-regenerate bindings/ and schema/ +mise run types:check # regenerate + fail if checked-in outputs are stale +``` + +Both wrap `cargo test -p eql-bindings`, which runs the conformance tests and +regenerates `bindings/` (TypeScript, via ts-rs) and `schema/` (JSON Schema, +via `tests/export.rs`, with canonical `$id`s injected). Both directories are +checked in so reviewers can see the codegen output without running anything; +CI runs `types:check` to keep them fresh. The crate is also part of the lean +`mise run test:crates` set (fmt, clippy, test — no database). + +Note that both exporters default to writing under the crate dir (ts-rs to +`./bindings`, `tests/export.rs` to `./schema`), so a plain +`cargo test -p eql-bindings` (and therefore `mise run test:crates`) regenerates +`bindings/` and `schema/` **in place** as a side effect — it can leave your +working tree dirty if the checked-in copies were stale. Only `types:generate` +isolates the writes (it exports into a temp dir and swaps them in after the +build succeeds). + +Published `eql-bindings` crates also include `eql_bindings::sql`, which exposes +the exact self-contained SQL installer and uninstaller built for the same EQL +release identity as the Rust wire types. + +## Future direction: self-describing payloads + +On the wire, a v3 payload is discriminated only by *which key is present* +(`hm` vs `ob` vs `bf`) — the SQL domain name carries the rest. Once the JSON +leaves SQL (into protect-ffi, into TypeScript, into a log line) that +information is gone, and a consumer is back to sniffing keys: the untagged +failure mode that produced the original protect-dynamodb bug. An earlier +prototype here carried an `IntegerTagged` enum with a one-field capability tag +(`"x": "integer_eq"`), which generates a clean TypeScript discriminated union +and a JSON Schema `oneOf` with per-branch `const`s. It was removed because +the tag is not part of the v3 wire contract (the generated domain CHECKs +know no `x` key) — but it remains the recommended shape if a future payload +revision adds a discriminator. See +`docs/plans/eql-payload-scheme-discipline-rfc.md` for the wider payload +evolution plan. + +[`ts-rs`]: https://github.com/Aleph-Alpha/ts-rs +[`schemars`]: https://graham.cool/schemars/ diff --git a/crates/eql-bindings/bindings/v3/Bigint.ts b/crates/eql-bindings/bindings/v3/Bigint.ts new file mode 100644 index 000000000..24ec75b14 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Bigint.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_bigint` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Bigint = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/BigintEq.ts b/crates/eql-bindings/bindings/v3/BigintEq.ts new file mode 100644 index 000000000..84d0ddacc --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_bigint_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type BigintEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/BigintEqQuery.ts b/crates/eql-bindings/bindings/v3/BigintEqQuery.ts new file mode 100644 index 000000000..7166ab6c8 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_bigint_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type BigintEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/BigintOrd.ts b/crates/eql-bindings/bindings/v3/BigintOrd.ts new file mode 100644 index 000000000..e599e71cd --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_bigint_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type BigintOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/BigintOrdOpe.ts b/crates/eql-bindings/bindings/v3/BigintOrdOpe.ts new file mode 100644 index 000000000..2e84b90fc --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_bigint_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type BigintOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/BigintOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/BigintOrdOpeQuery.ts new file mode 100644 index 000000000..7c01b2c77 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_bigint_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type BigintOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/BigintOrdOre.ts b/crates/eql-bindings/bindings/v3/BigintOrdOre.ts new file mode 100644 index 000000000..247ff5201 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_bigint_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type BigintOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/BigintOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/BigintOrdOreQuery.ts new file mode 100644 index 000000000..28b2fc2a7 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_bigint_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type BigintOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/BigintOrdQuery.ts b/crates/eql-bindings/bindings/v3/BigintOrdQuery.ts new file mode 100644 index 000000000..219b6f2dd --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BigintOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_bigint_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type BigintOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/BloomFilter.ts b/crates/eql-bindings/bindings/v3/BloomFilter.ts new file mode 100644 index 000000000..6861ce1c5 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/BloomFilter.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Bloom-filter match term — the `bf` wire key. Backs the `_match` domains + * (`@>`/`<@` containment). + * + * **Signed** i16, not u16: EQL stores the filter as PostgreSQL `smallint[]`, + * and filters sized above 32768 emit upper-half bit positions as negative + * signed values. + */ +export type BloomFilter = Array; diff --git a/crates/eql-bindings/bindings/v3/Boolean.ts b/crates/eql-bindings/bindings/v3/Boolean.ts new file mode 100644 index 000000000..a79845f75 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Boolean.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_boolean` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Boolean = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/Ciphertext.ts b/crates/eql-bindings/bindings/v3/Ciphertext.ts new file mode 100644 index 000000000..7beff648e --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Ciphertext.ts @@ -0,0 +1,8 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * mp_base85 source ciphertext — the `c` envelope key. + * + * Required by every v3 domain CHECK; present on every payload. + */ +export type Ciphertext = string; diff --git a/crates/eql-bindings/bindings/v3/Date.ts b/crates/eql-bindings/bindings/v3/Date.ts new file mode 100644 index 000000000..d256c0f67 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Date.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_date` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Date = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/DateEq.ts b/crates/eql-bindings/bindings/v3/DateEq.ts new file mode 100644 index 000000000..eb53bcb1c --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_date_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type DateEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/DateEqQuery.ts b/crates/eql-bindings/bindings/v3/DateEqQuery.ts new file mode 100644 index 000000000..39b987447 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_date_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type DateEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/DateOrd.ts b/crates/eql-bindings/bindings/v3/DateOrd.ts new file mode 100644 index 000000000..fe624a5cc --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_date_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type DateOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/DateOrdOpe.ts b/crates/eql-bindings/bindings/v3/DateOrdOpe.ts new file mode 100644 index 000000000..546c12a8a --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_date_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type DateOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/DateOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/DateOrdOpeQuery.ts new file mode 100644 index 000000000..396687d7b --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_date_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type DateOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/DateOrdOre.ts b/crates/eql-bindings/bindings/v3/DateOrdOre.ts new file mode 100644 index 000000000..6010aef5c --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_date_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type DateOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/DateOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/DateOrdOreQuery.ts new file mode 100644 index 000000000..726326377 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_date_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type DateOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/DateOrdQuery.ts b/crates/eql-bindings/bindings/v3/DateOrdQuery.ts new file mode 100644 index 000000000..bf3bfa66b --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DateOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_date_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type DateOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/Double.ts b/crates/eql-bindings/bindings/v3/Double.ts new file mode 100644 index 000000000..3174e5c2d --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Double.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_double` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Double = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleEq.ts b/crates/eql-bindings/bindings/v3/DoubleEq.ts new file mode 100644 index 000000000..531e2fe23 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_double_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type DoubleEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleEqQuery.ts b/crates/eql-bindings/bindings/v3/DoubleEqQuery.ts new file mode 100644 index 000000000..3ec5ce8e7 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_double_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type DoubleEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleOrd.ts b/crates/eql-bindings/bindings/v3/DoubleOrd.ts new file mode 100644 index 000000000..f9058a363 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_double_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type DoubleOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleOrdOpe.ts b/crates/eql-bindings/bindings/v3/DoubleOrdOpe.ts new file mode 100644 index 000000000..af12d2381 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_double_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type DoubleOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/DoubleOrdOpeQuery.ts new file mode 100644 index 000000000..7aab5ae6e --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_double_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type DoubleOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleOrdOre.ts b/crates/eql-bindings/bindings/v3/DoubleOrdOre.ts new file mode 100644 index 000000000..821033ee8 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_double_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type DoubleOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/DoubleOrdOreQuery.ts new file mode 100644 index 000000000..937c44c41 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_double_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type DoubleOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/DoubleOrdQuery.ts b/crates/eql-bindings/bindings/v3/DoubleOrdQuery.ts new file mode 100644 index 000000000..9b35d87d3 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/DoubleOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_double_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type DoubleOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/Hmac256.ts b/crates/eql-bindings/bindings/v3/Hmac256.ts new file mode 100644 index 000000000..e6fc7db2e --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Hmac256.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains + * (`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`. + */ +export type Hmac256 = string; diff --git a/crates/eql-bindings/bindings/v3/Identifier.ts b/crates/eql-bindings/bindings/v3/Identifier.ts new file mode 100644 index 000000000..d8914e8f8 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Identifier.ts @@ -0,0 +1,16 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Table + column identifier — wire shape `{"t": "...", "c": "..."}`. + * + * Shared by every payload. + */ +export type Identifier = { +/** + * Table name. + */ +t: string, +/** + * Column name. + */ +c: string, }; diff --git a/crates/eql-bindings/bindings/v3/Integer.ts b/crates/eql-bindings/bindings/v3/Integer.ts new file mode 100644 index 000000000..4d8f47a2e --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Integer.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_integer` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Integer = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerEq.ts b/crates/eql-bindings/bindings/v3/IntegerEq.ts new file mode 100644 index 000000000..b6c8b95c0 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_integer_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type IntegerEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerEqQuery.ts b/crates/eql-bindings/bindings/v3/IntegerEqQuery.ts new file mode 100644 index 000000000..c63844234 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_integer_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type IntegerEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerOrd.ts b/crates/eql-bindings/bindings/v3/IntegerOrd.ts new file mode 100644 index 000000000..ffcad6088 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_integer_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type IntegerOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerOrdOpe.ts b/crates/eql-bindings/bindings/v3/IntegerOrdOpe.ts new file mode 100644 index 000000000..f0f3b5dec --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_integer_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type IntegerOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/IntegerOrdOpeQuery.ts new file mode 100644 index 000000000..a04709d0b --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_integer_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type IntegerOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerOrdOre.ts b/crates/eql-bindings/bindings/v3/IntegerOrdOre.ts new file mode 100644 index 000000000..fa55866a8 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_integer_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type IntegerOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/IntegerOrdOreQuery.ts new file mode 100644 index 000000000..e7c4c9e0b --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_integer_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type IntegerOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/IntegerOrdQuery.ts b/crates/eql-bindings/bindings/v3/IntegerOrdQuery.ts new file mode 100644 index 000000000..27952f861 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/IntegerOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_integer_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type IntegerOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/Numeric.ts b/crates/eql-bindings/bindings/v3/Numeric.ts new file mode 100644 index 000000000..598545745 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Numeric.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_numeric` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Numeric = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/NumericEq.ts b/crates/eql-bindings/bindings/v3/NumericEq.ts new file mode 100644 index 000000000..beae0ca00 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_numeric_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type NumericEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/NumericEqQuery.ts b/crates/eql-bindings/bindings/v3/NumericEqQuery.ts new file mode 100644 index 000000000..aa4cd6883 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_numeric_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type NumericEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/NumericOrd.ts b/crates/eql-bindings/bindings/v3/NumericOrd.ts new file mode 100644 index 000000000..ccecec1cd --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_numeric_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type NumericOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/NumericOrdOpe.ts b/crates/eql-bindings/bindings/v3/NumericOrdOpe.ts new file mode 100644 index 000000000..691514270 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_numeric_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type NumericOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/NumericOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/NumericOrdOpeQuery.ts new file mode 100644 index 000000000..f6f2fd8ca --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_numeric_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type NumericOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/NumericOrdOre.ts b/crates/eql-bindings/bindings/v3/NumericOrdOre.ts new file mode 100644 index 000000000..e6579faf9 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_numeric_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type NumericOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/NumericOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/NumericOrdOreQuery.ts new file mode 100644 index 000000000..1b3c39a82 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_numeric_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type NumericOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/NumericOrdQuery.ts b/crates/eql-bindings/bindings/v3/NumericOrdQuery.ts new file mode 100644 index 000000000..f2c7a2fc8 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/NumericOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_numeric_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type NumericOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/OpeCllw.ts b/crates/eql-bindings/bindings/v3/OpeCllw.ts new file mode 100644 index 000000000..13a172087 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/OpeCllw.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope` + * domains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec + * document (exactly one of `hm` (equality) XOR `op` (ordering) per entry — + * enforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext, + * sortable via native bytea comparison after hex-decode — unlike `ob` + * (block-ORE) it needs no custom comparator. SQL-side constructor: + * `eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`. + */ +export type OpeCllw = string; diff --git a/crates/eql-bindings/bindings/v3/OreBlock256.ts b/crates/eql-bindings/bindings/v3/OreBlock256.ts new file mode 100644 index 000000000..c5fd7c510 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/OreBlock256.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore` + * domains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's + * domain, so it serves equality too. The block count is width-agnostic on the + * wire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the + * array just carries more block strings. SQL-side constructor: + * `eql_v3_internal.ore_block_256`. + */ +export type OreBlock256 = Array; diff --git a/crates/eql-bindings/bindings/v3/Real.ts b/crates/eql-bindings/bindings/v3/Real.ts new file mode 100644 index 000000000..1ac940c15 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Real.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_real` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Real = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/RealEq.ts b/crates/eql-bindings/bindings/v3/RealEq.ts new file mode 100644 index 000000000..069c250a4 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_real_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type RealEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/RealEqQuery.ts b/crates/eql-bindings/bindings/v3/RealEqQuery.ts new file mode 100644 index 000000000..7eb74e86b --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_real_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type RealEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/RealOrd.ts b/crates/eql-bindings/bindings/v3/RealOrd.ts new file mode 100644 index 000000000..9712b1a85 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_real_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type RealOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/RealOrdOpe.ts b/crates/eql-bindings/bindings/v3/RealOrdOpe.ts new file mode 100644 index 000000000..03156da21 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_real_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type RealOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/RealOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/RealOrdOpeQuery.ts new file mode 100644 index 000000000..d815c3cea --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_real_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type RealOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/RealOrdOre.ts b/crates/eql-bindings/bindings/v3/RealOrdOre.ts new file mode 100644 index 000000000..d998be4fd --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_real_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type RealOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/RealOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/RealOrdOreQuery.ts new file mode 100644 index 000000000..08d72e5c6 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_real_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type RealOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/RealOrdQuery.ts b/crates/eql-bindings/bindings/v3/RealOrdQuery.ts new file mode 100644 index 000000000..9867c5af4 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/RealOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_real_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type RealOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/SchemaVersion.ts b/crates/eql-bindings/bindings/v3/SchemaVersion.ts new file mode 100644 index 000000000..05f6e343a --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SchemaVersion.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * The envelope version field (`v`) — always exactly [`EQL_SCHEMA_VERSION`] + * on the wire. + * + * Deserialization rejects any other value: the Rust analogue of the domain + * CHECK's `VALUE->>'v' = '3'`, so a wrong-version payload fails at the type + * boundary instead of at INSERT. The inner value is private; the only + * constructible instance is the current version. + */ +export type SchemaVersion = 3; diff --git a/crates/eql-bindings/bindings/v3/Selector.ts b/crates/eql-bindings/bindings/v3/Selector.ts new file mode 100644 index 000000000..deb18a4da --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Selector.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * A SteVec selector — the `s` wire key. Addresses a JSON path leaf within an + * encrypted document (`public.eql_v3_json`); present on every entry and query element. + */ +export type Selector = string; diff --git a/crates/eql-bindings/bindings/v3/Smallint.ts b/crates/eql-bindings/bindings/v3/Smallint.ts new file mode 100644 index 000000000..ca91c87da --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Smallint.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_smallint` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Smallint = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintEq.ts b/crates/eql-bindings/bindings/v3/SmallintEq.ts new file mode 100644 index 000000000..d46547c73 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_smallint_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type SmallintEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintEqQuery.ts b/crates/eql-bindings/bindings/v3/SmallintEqQuery.ts new file mode 100644 index 000000000..a7909d960 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_smallint_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type SmallintEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintOrd.ts b/crates/eql-bindings/bindings/v3/SmallintOrd.ts new file mode 100644 index 000000000..684f2cacb --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_smallint_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type SmallintOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintOrdOpe.ts b/crates/eql-bindings/bindings/v3/SmallintOrdOpe.ts new file mode 100644 index 000000000..14eeafd82 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_smallint_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type SmallintOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/SmallintOrdOpeQuery.ts new file mode 100644 index 000000000..5924a30f4 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_smallint_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type SmallintOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintOrdOre.ts b/crates/eql-bindings/bindings/v3/SmallintOrdOre.ts new file mode 100644 index 000000000..a0724ec7d --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_smallint_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type SmallintOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/SmallintOrdOreQuery.ts new file mode 100644 index 000000000..78e4f38d9 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_smallint_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type SmallintOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/SmallintOrdQuery.ts b/crates/eql-bindings/bindings/v3/SmallintOrdQuery.ts new file mode 100644 index 000000000..7eabe8d72 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SmallintOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_smallint_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type SmallintOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/SteVecDocument.ts b/crates/eql-bindings/bindings/v3/SteVecDocument.ts new file mode 100644 index 000000000..59b432b26 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SteVecDocument.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; +import type { SteVecEntry } from "./SteVecEntry"; +import type { SteVecForm } from "./SteVecForm"; + +/** + * `public.eql_v3_json` — a SteVec encrypted-JSONB document (`{v, k, i, sv:[entry]}`, + * no root ciphertext). Strict. `k` is the `"sv"` form discriminator (see + * [`SteVecForm`]) — carried on the real wire, so the strict struct models it. + */ +export type SteVecDocument = { v: SchemaVersion, k: SteVecForm, i: Identifier, sv: Array, }; diff --git a/crates/eql-bindings/bindings/v3/SteVecEntry.ts b/crates/eql-bindings/bindings/v3/SteVecEntry.ts new file mode 100644 index 000000000..78f3cd9da --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SteVecEntry.ts @@ -0,0 +1,13 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { OpeCllw } from "./OpeCllw"; +import type { Selector } from "./Selector"; + +/** + * `public.eql_v3_jsonb_entry` — one sv element (returned by `->`). Carries a selector + * `s`, ciphertext `c`, optional array-membership marker `a`, and exactly one of + * `hm` XOR `op`. LAX (flatten precludes `deny_unknown_fields`): tolerates the + * root `i`/`v` merged in by `->`. XOR of the term is enforced by the SQL CHECK. + */ +export type SteVecEntry = { s: Selector, c: Ciphertext, a?: boolean | null, } & ({ hm: Hmac256, } | { op: OpeCllw, }); diff --git a/crates/eql-bindings/bindings/v3/SteVecForm.ts b/crates/eql-bindings/bindings/v3/SteVecForm.ts new file mode 100644 index 000000000..e7c62ef93 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SteVecForm.ts @@ -0,0 +1,20 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. + +/** + * The `k` envelope key — the EQL payload **form discriminator**, always the + * literal `"sv"` for an encrypted-JSONB document. + * + * `k` distinguishes the payload forms in the canonical wire contract (`"ct"` = + * scalar ciphertext, `"sv"` = STE-vec). `eql_v3` itself does not consume `k` + * (the typed domain + the structural `c`-vs-`sv` shape already discriminate, + * and no `eql_v3` SQL reads it), but the canonical `SteVecPayload` + * (`eql-payload-v2.3.schema.json`, `required: [v,k,i,sv]`) mandates it and + * cipherstash-client emits it on every SteVec document — so the strict document + * struct must model it or it rejects the real wire. + * + * Pinned exactly like [`SchemaVersion`] pins `v`: deserialization rejects any + * value other than `"sv"`, so a scalar (`k:"ct"`) payload cannot be read back + * as a document. The inner value is private; the only constructible instance is + * [`SteVecForm::SV`]. + */ +export type SteVecForm = "sv"; diff --git a/crates/eql-bindings/bindings/v3/SteVecQuery.ts b/crates/eql-bindings/bindings/v3/SteVecQuery.ts new file mode 100644 index 000000000..eb1cab954 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SteVecQuery.ts @@ -0,0 +1,7 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { SteVecQueryEntry } from "./SteVecQueryEntry"; + +/** + * `eql_v3.query_jsonb` — a containment needle (`{sv:[query-entry]}`). Strict. + */ +export type SteVecQuery = { sv: Array, }; diff --git a/crates/eql-bindings/bindings/v3/SteVecQueryEntry.ts b/crates/eql-bindings/bindings/v3/SteVecQueryEntry.ts new file mode 100644 index 000000000..96c581a8d --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SteVecQueryEntry.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { OpeCllw } from "./OpeCllw"; +import type { Selector } from "./Selector"; + +/** + * One element of a SteVec containment needle: a selector plus one term, and + * (per the SQL CHECK) no ciphertext. LAX for the same flatten reason as + * `SteVecEntry`; the "no `c`" contract is enforced by `is_valid_ste_vec_query_payload`. + */ +export type SteVecQueryEntry = { s: Selector, } & ({ hm: Hmac256, } | { op: OpeCllw, }); diff --git a/crates/eql-bindings/bindings/v3/SteVecTerm.ts b/crates/eql-bindings/bindings/v3/SteVecTerm.ts new file mode 100644 index 000000000..0460569b8 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/SteVecTerm.ts @@ -0,0 +1,9 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { OpeCllw } from "./OpeCllw"; + +/** + * The per-entry deterministic term: exactly one of `hm` (HMAC equality) or `op` + * (CLLW-OPE ordering). Untagged — a document mixes both across its `sv` array. + */ +export type SteVecTerm = { hm: Hmac256, } | { op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/Text.ts b/crates/eql-bindings/bindings/v3/Text.ts new file mode 100644 index 000000000..059f10cee --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Text.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Text = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/TextEq.ts b/crates/eql-bindings/bindings/v3/TextEq.ts new file mode 100644 index 000000000..984b6cebe --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type TextEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/TextEqQuery.ts b/crates/eql-bindings/bindings/v3/TextEqQuery.ts new file mode 100644 index 000000000..00bfdb41e --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_text_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type TextEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/TextMatch.ts b/crates/eql-bindings/bindings/v3/TextMatch.ts new file mode 100644 index 000000000..eef14fe15 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextMatch.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { BloomFilter } from "./BloomFilter"; +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text_match` — match domain. + * + * Operators: `@>` `<@`. Required keys: `v` `i` `c` `bf`. + */ +export type TextMatch = { v: SchemaVersion, i: Identifier, c: Ciphertext, bf: BloomFilter, }; diff --git a/crates/eql-bindings/bindings/v3/TextMatchQuery.ts b/crates/eql-bindings/bindings/v3/TextMatchQuery.ts new file mode 100644 index 000000000..4e525ab6c --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextMatchQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { BloomFilter } from "./BloomFilter"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_text_match` — match domain query operand. + * + * Operators: `@>` `<@`. Required keys: `v` `i` `bf`. + */ +export type TextMatchQuery = { v: SchemaVersion, i: Identifier, bf: BloomFilter, }; diff --git a/crates/eql-bindings/bindings/v3/TextOrd.ts b/crates/eql-bindings/bindings/v3/TextOrd.ts new file mode 100644 index 000000000..81fae142c --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextOrd.ts @@ -0,0 +1,13 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`. + */ +export type TextOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TextOrdOpe.ts b/crates/eql-bindings/bindings/v3/TextOrdOpe.ts new file mode 100644 index 000000000..69ac3c276 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextOrdOpe.ts @@ -0,0 +1,13 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `op`. + */ +export type TextOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/TextOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/TextOrdOpeQuery.ts new file mode 100644 index 000000000..ae7e69259 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextOrdOpeQuery.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_text_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `op`. + */ +export type TextOrdOpeQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/TextOrdOre.ts b/crates/eql-bindings/bindings/v3/TextOrdOre.ts new file mode 100644 index 000000000..243dcd290 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextOrdOre.ts @@ -0,0 +1,13 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`. + */ +export type TextOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TextOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/TextOrdOreQuery.ts new file mode 100644 index 000000000..00290b7cc --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextOrdOreQuery.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_text_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `ob`. + */ +export type TextOrdOreQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TextOrdQuery.ts b/crates/eql-bindings/bindings/v3/TextOrdQuery.ts new file mode 100644 index 000000000..4fc033acb --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextOrdQuery.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_text_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `ob`. + */ +export type TextOrdQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TextSearch.ts b/crates/eql-bindings/bindings/v3/TextSearch.ts new file mode 100644 index 000000000..3caa523c2 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextSearch.ts @@ -0,0 +1,14 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { BloomFilter } from "./BloomFilter"; +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_text_search` — search domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `c` `hm` `ob` `bf`. + */ +export type TextSearch = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, ob: OreBlock256, bf: BloomFilter, }; diff --git a/crates/eql-bindings/bindings/v3/TextSearchQuery.ts b/crates/eql-bindings/bindings/v3/TextSearchQuery.ts new file mode 100644 index 000000000..7a2f6c822 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TextSearchQuery.ts @@ -0,0 +1,13 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { BloomFilter } from "./BloomFilter"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_text_search` — search domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `hm` `ob` `bf`. + */ +export type TextSearchQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, ob: OreBlock256, bf: BloomFilter, }; diff --git a/crates/eql-bindings/bindings/v3/Timestamp.ts b/crates/eql-bindings/bindings/v3/Timestamp.ts new file mode 100644 index 000000000..cf43a3bf7 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/Timestamp.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_timestamp` — storage-only domain. + * + * Operators: none. Required keys: `v` `i` `c`. + */ +export type Timestamp = { v: SchemaVersion, i: Identifier, c: Ciphertext, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampEq.ts b/crates/eql-bindings/bindings/v3/TimestampEq.ts new file mode 100644 index 000000000..a150ac619 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampEq.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_timestamp_eq` — equality domain. + * + * Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. + */ +export type TimestampEq = { v: SchemaVersion, i: Identifier, c: Ciphertext, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampEqQuery.ts b/crates/eql-bindings/bindings/v3/TimestampEqQuery.ts new file mode 100644 index 000000000..afc2e9820 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampEqQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Hmac256 } from "./Hmac256"; +import type { Identifier } from "./Identifier"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_timestamp_eq` — equality domain query operand. + * + * Operators: `=` `<>`. Required keys: `v` `i` `hm`. + */ +export type TimestampEqQuery = { v: SchemaVersion, i: Identifier, hm: Hmac256, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampOrd.ts b/crates/eql-bindings/bindings/v3/TimestampOrd.ts new file mode 100644 index 000000000..28ddf2957 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampOrd.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_timestamp_ord` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type TimestampOrd = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampOrdOpe.ts b/crates/eql-bindings/bindings/v3/TimestampOrdOpe.ts new file mode 100644 index 000000000..bed5b35c0 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampOrdOpe.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_timestamp_ord_ope` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. + */ +export type TimestampOrdOpe = { v: SchemaVersion, i: Identifier, c: Ciphertext, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampOrdOpeQuery.ts b/crates/eql-bindings/bindings/v3/TimestampOrdOpeQuery.ts new file mode 100644 index 000000000..d35251ae3 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampOrdOpeQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OpeCllw } from "./OpeCllw"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_timestamp_ord_ope` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. + */ +export type TimestampOrdOpeQuery = { v: SchemaVersion, i: Identifier, op: OpeCllw, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampOrdOre.ts b/crates/eql-bindings/bindings/v3/TimestampOrdOre.ts new file mode 100644 index 000000000..2255a38b3 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampOrdOre.ts @@ -0,0 +1,12 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Ciphertext } from "./Ciphertext"; +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `public.eql_v3_timestamp_ord_ore` — ordering domain. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. + */ +export type TimestampOrdOre = { v: SchemaVersion, i: Identifier, c: Ciphertext, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampOrdOreQuery.ts b/crates/eql-bindings/bindings/v3/TimestampOrdOreQuery.ts new file mode 100644 index 000000000..c5979fdbc --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampOrdOreQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_timestamp_ord_ore` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type TimestampOrdOreQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/bindings/v3/TimestampOrdQuery.ts b/crates/eql-bindings/bindings/v3/TimestampOrdQuery.ts new file mode 100644 index 000000000..65c9ab5d5 --- /dev/null +++ b/crates/eql-bindings/bindings/v3/TimestampOrdQuery.ts @@ -0,0 +1,11 @@ +// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. +import type { Identifier } from "./Identifier"; +import type { OreBlock256 } from "./OreBlock256"; +import type { SchemaVersion } from "./SchemaVersion"; + +/** + * `eql_v3.query_timestamp_ord` — ordering domain query operand. + * + * Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. + */ +export type TimestampOrdQuery = { v: SchemaVersion, i: Identifier, ob: OreBlock256, }; diff --git a/crates/eql-bindings/schema/v3/eql_v3_bigint.json b/crates/eql-bindings/schema/v3/eql_v3_bigint.json new file mode 100644 index 000000000..dcf39ca1d --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_bigint.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_bigint.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_bigint` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Bigint", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_bigint_eq.json b/crates/eql-bindings/schema/v3/eql_v3_bigint_eq.json new file mode 100644 index 000000000..376e97e59 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_bigint_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_bigint_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_bigint_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "BigintEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_bigint_ord.json b/crates/eql-bindings/schema/v3/eql_v3_bigint_ord.json new file mode 100644 index 000000000..a6d55585c --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_bigint_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_bigint_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_bigint_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "BigintOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_bigint_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_bigint_ord_ope.json new file mode 100644 index 000000000..c3ec5a37c --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_bigint_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_bigint_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_bigint_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "BigintOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_bigint_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_bigint_ord_ore.json new file mode 100644 index 000000000..2879adeb6 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_bigint_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_bigint_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_bigint_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "BigintOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_boolean.json b/crates/eql-bindings/schema/v3/eql_v3_boolean.json new file mode 100644 index 000000000..feee8688d --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_boolean.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_boolean.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_boolean` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Boolean", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_date.json b/crates/eql-bindings/schema/v3/eql_v3_date.json new file mode 100644 index 000000000..7265731c5 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_date.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_date.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_date` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Date", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_date_eq.json b/crates/eql-bindings/schema/v3/eql_v3_date_eq.json new file mode 100644 index 000000000..87c588b18 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_date_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_date_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_date_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "DateEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_date_ord.json b/crates/eql-bindings/schema/v3/eql_v3_date_ord.json new file mode 100644 index 000000000..82aac0089 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_date_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_date_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_date_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "DateOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_date_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_date_ord_ope.json new file mode 100644 index 000000000..af2b31f56 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_date_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_date_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_date_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "DateOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_date_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_date_ord_ore.json new file mode 100644 index 000000000..1199dca6d --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_date_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_date_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_date_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "DateOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_double.json b/crates/eql-bindings/schema/v3/eql_v3_double.json new file mode 100644 index 000000000..2b2dc709f --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_double.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_double.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_double` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Double", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_double_eq.json b/crates/eql-bindings/schema/v3/eql_v3_double_eq.json new file mode 100644 index 000000000..fea7dbc50 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_double_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_double_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_double_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "DoubleEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_double_ord.json b/crates/eql-bindings/schema/v3/eql_v3_double_ord.json new file mode 100644 index 000000000..5cab990eb --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_double_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_double_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_double_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "DoubleOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_double_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_double_ord_ope.json new file mode 100644 index 000000000..2c5be3ed7 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_double_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_double_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_double_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "DoubleOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_double_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_double_ord_ore.json new file mode 100644 index 000000000..1882c31dd --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_double_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_double_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_double_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "DoubleOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_integer.json b/crates/eql-bindings/schema/v3/eql_v3_integer.json new file mode 100644 index 000000000..92d36fa97 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_integer.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_integer.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_integer` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Integer", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_integer_eq.json b/crates/eql-bindings/schema/v3/eql_v3_integer_eq.json new file mode 100644 index 000000000..7a07dc8dc --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_integer_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_integer_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_integer_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "IntegerEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_integer_ord.json b/crates/eql-bindings/schema/v3/eql_v3_integer_ord.json new file mode 100644 index 000000000..ad4fb9530 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_integer_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_integer_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_integer_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "IntegerOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_integer_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_integer_ord_ope.json new file mode 100644 index 000000000..54de69344 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_integer_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_integer_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_integer_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "IntegerOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_integer_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_integer_ord_ore.json new file mode 100644 index 000000000..22b433573 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_integer_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_integer_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_integer_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "IntegerOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_json.json b/crates/eql-bindings/schema/v3/eql_v3_json.json new file mode 100644 index 000000000..ff3c995fd --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_json.json @@ -0,0 +1,124 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + }, + "Selector": { + "description": "A SteVec selector — the `s` wire key. Addresses a JSON path leaf within an\nencrypted document (`public.eql_v3_json`); present on every entry and query element.", + "type": "string" + }, + "SteVecEntry": { + "anyOf": [ + { + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + } + }, + "required": [ + "hm" + ], + "type": "object" + }, + { + "properties": { + "op": { + "$ref": "#/$defs/OpeCllw" + } + }, + "required": [ + "op" + ], + "type": "object" + } + ], + "description": "`public.eql_v3_jsonb_entry` — one sv element (returned by `->`). Carries a selector\n`s`, ciphertext `c`, optional array-membership marker `a`, and exactly one of\n`hm` XOR `op`. LAX (flatten precludes `deny_unknown_fields`): tolerates the\nroot `i`/`v` merged in by `->`. XOR of the term is enforced by the SQL CHECK.", + "properties": { + "a": { + "type": [ + "boolean", + "null" + ] + }, + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "s": { + "$ref": "#/$defs/Selector" + } + }, + "required": [ + "s", + "c" + ], + "type": "object" + }, + "SteVecForm": { + "const": "sv", + "description": "The `k` envelope form discriminator — always `\"sv\"` for a SteVec document.", + "type": "string" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_json.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_json` — a SteVec encrypted-JSONB document (`{v, k, i, sv:[entry]}`,\nno root ciphertext). Strict. `k` is the `\"sv\"` form discriminator (see\n[`SteVecForm`]) — carried on the real wire, so the strict struct models it.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "k": { + "$ref": "#/$defs/SteVecForm" + }, + "sv": { + "items": { + "$ref": "#/$defs/SteVecEntry" + }, + "type": "array" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "k", + "i", + "sv" + ], + "title": "SteVecDocument", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_jsonb_entry.json b/crates/eql-bindings/schema/v3/eql_v3_jsonb_entry.json new file mode 100644 index 000000000..15d4c7f7e --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_jsonb_entry.json @@ -0,0 +1,67 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "Selector": { + "description": "A SteVec selector — the `s` wire key. Addresses a JSON path leaf within an\nencrypted document (`public.eql_v3_json`); present on every entry and query element.", + "type": "string" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_jsonb_entry.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "anyOf": [ + { + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + } + }, + "required": [ + "hm" + ], + "type": "object" + }, + { + "properties": { + "op": { + "$ref": "#/$defs/OpeCllw" + } + }, + "required": [ + "op" + ], + "type": "object" + } + ], + "description": "`public.eql_v3_jsonb_entry` — one sv element (returned by `->`). Carries a selector\n`s`, ciphertext `c`, optional array-membership marker `a`, and exactly one of\n`hm` XOR `op`. LAX (flatten precludes `deny_unknown_fields`): tolerates the\nroot `i`/`v` merged in by `->`. XOR of the term is enforced by the SQL CHECK.", + "properties": { + "a": { + "type": [ + "boolean", + "null" + ] + }, + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "s": { + "$ref": "#/$defs/Selector" + } + }, + "required": [ + "s", + "c" + ], + "title": "SteVecEntry", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_numeric.json b/crates/eql-bindings/schema/v3/eql_v3_numeric.json new file mode 100644 index 000000000..8d2d08a06 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_numeric.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_numeric.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_numeric` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Numeric", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_numeric_eq.json b/crates/eql-bindings/schema/v3/eql_v3_numeric_eq.json new file mode 100644 index 000000000..741c95904 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_numeric_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_numeric_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_numeric_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "NumericEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_numeric_ord.json b/crates/eql-bindings/schema/v3/eql_v3_numeric_ord.json new file mode 100644 index 000000000..a5b527b2b --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_numeric_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_numeric_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_numeric_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "NumericOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_numeric_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_numeric_ord_ope.json new file mode 100644 index 000000000..a2e3fdd3e --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_numeric_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_numeric_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_numeric_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "NumericOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_numeric_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_numeric_ord_ore.json new file mode 100644 index 000000000..98bd994db --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_numeric_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_numeric_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_numeric_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "NumericOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_real.json b/crates/eql-bindings/schema/v3/eql_v3_real.json new file mode 100644 index 000000000..52da42ac2 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_real.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_real.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_real` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Real", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_real_eq.json b/crates/eql-bindings/schema/v3/eql_v3_real_eq.json new file mode 100644 index 000000000..ce0f03141 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_real_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_real_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_real_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "RealEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_real_ord.json b/crates/eql-bindings/schema/v3/eql_v3_real_ord.json new file mode 100644 index 000000000..efb570ef6 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_real_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_real_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_real_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "RealOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_real_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_real_ord_ope.json new file mode 100644 index 000000000..ab0fb08b6 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_real_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_real_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_real_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "RealOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_real_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_real_ord_ore.json new file mode 100644 index 000000000..0ce74292f --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_real_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_real_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_real_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "RealOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_smallint.json b/crates/eql-bindings/schema/v3/eql_v3_smallint.json new file mode 100644 index 000000000..f04378a6f --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_smallint.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_smallint.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_smallint` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Smallint", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_smallint_eq.json b/crates/eql-bindings/schema/v3/eql_v3_smallint_eq.json new file mode 100644 index 000000000..a793597d4 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_smallint_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_smallint_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_smallint_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "SmallintEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_smallint_ord.json b/crates/eql-bindings/schema/v3/eql_v3_smallint_ord.json new file mode 100644 index 000000000..35d0c9fa2 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_smallint_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_smallint_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_smallint_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "SmallintOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_smallint_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_smallint_ord_ope.json new file mode 100644 index 000000000..903984424 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_smallint_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_smallint_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_smallint_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "SmallintOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_smallint_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_smallint_ord_ore.json new file mode 100644 index 000000000..675d00059 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_smallint_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_smallint_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_smallint_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "SmallintOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text.json b/crates/eql-bindings/schema/v3/eql_v3_text.json new file mode 100644 index 000000000..60a7fdafd --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Text", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text_eq.json b/crates/eql-bindings/schema/v3/eql_v3_text_eq.json new file mode 100644 index 000000000..b7d94f830 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "TextEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text_match.json b/crates/eql-bindings/schema/v3/eql_v3_text_match.json new file mode 100644 index 000000000..e3b30c709 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text_match.json @@ -0,0 +1,68 @@ +{ + "$defs": { + "BloomFilter": { + "description": "Bloom-filter match term — the `bf` wire key. Backs the `_match` domains (`@>`/`<@` containment). Signed i16: EQL stores the filter as PostgreSQL `smallint[]`, and filters sized above 32768 emit upper-half bit positions as negative signed values.", + "items": { + "format": "int16", + "maximum": 32767, + "minimum": -32768, + "type": "integer" + }, + "type": "array" + }, + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text_match.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text_match` — match domain.\n\nOperators: `@>` `<@`. Required keys: `v` `i` `c` `bf`.", + "properties": { + "bf": { + "$ref": "#/$defs/BloomFilter" + }, + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "bf" + ], + "title": "TextMatch", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text_ord.json b/crates/eql-bindings/schema/v3/eql_v3_text_ord.json new file mode 100644 index 000000000..39543b5da --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text_ord.json @@ -0,0 +1,73 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm", + "ob" + ], + "title": "TextOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_text_ord_ope.json new file mode 100644 index 000000000..566ec0499 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text_ord_ope.json @@ -0,0 +1,70 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm", + "op" + ], + "title": "TextOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_text_ord_ore.json new file mode 100644 index 000000000..732f1612c --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text_ord_ore.json @@ -0,0 +1,73 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm", + "ob" + ], + "title": "TextOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_text_search.json b/crates/eql-bindings/schema/v3/eql_v3_text_search.json new file mode 100644 index 000000000..78b4d741b --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_text_search.json @@ -0,0 +1,87 @@ +{ + "$defs": { + "BloomFilter": { + "description": "Bloom-filter match term — the `bf` wire key. Backs the `_match` domains (`@>`/`<@` containment). Signed i16: EQL stores the filter as PostgreSQL `smallint[]`, and filters sized above 32768 emit upper-half bit positions as negative signed values.", + "items": { + "format": "int16", + "maximum": 32767, + "minimum": -32768, + "type": "integer" + }, + "type": "array" + }, + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_text_search.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_text_search` — search domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `c` `hm` `ob` `bf`.", + "properties": { + "bf": { + "$ref": "#/$defs/BloomFilter" + }, + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm", + "ob", + "bf" + ], + "title": "TextSearch", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_timestamp.json b/crates/eql-bindings/schema/v3/eql_v3_timestamp.json new file mode 100644 index 000000000..16e97bd9d --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_timestamp.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_timestamp.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_timestamp` — storage-only domain.\n\nOperators: none. Required keys: `v` `i` `c`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c" + ], + "title": "Timestamp", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_timestamp_eq.json b/crates/eql-bindings/schema/v3/eql_v3_timestamp_eq.json new file mode 100644 index 000000000..c76a60ade --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_timestamp_eq.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_timestamp_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_timestamp_eq` — equality domain.\n\nOperators: `=` `<>`. Required keys: `v` `i` `c` `hm`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "hm" + ], + "title": "TimestampEq", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord.json b/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord.json new file mode 100644 index 000000000..c840264cd --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_timestamp_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_timestamp_ord` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "TimestampOrd", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord_ope.json b/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord_ope.json new file mode 100644 index 000000000..a7a3bd320 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_timestamp_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_timestamp_ord_ope` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "op" + ], + "title": "TimestampOrdOpe", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord_ore.json b/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord_ore.json new file mode 100644 index 000000000..fcb4d3103 --- /dev/null +++ b/crates/eql-bindings/schema/v3/eql_v3_timestamp_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Ciphertext": { + "description": "mp_base85 source ciphertext — the `c` envelope key.\n\nRequired by every v3 domain CHECK; present on every payload.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/eql_v3_timestamp_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`public.eql_v3_timestamp_ord_ore` — ordering domain.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`.", + "properties": { + "c": { + "$ref": "#/$defs/Ciphertext" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "c", + "ob" + ], + "title": "TimestampOrdOre", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_bigint_eq.json b/crates/eql-bindings/schema/v3/query_bigint_eq.json new file mode 100644 index 000000000..1836bf657 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_bigint_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_bigint_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_bigint_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "BigintEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_bigint_ord.json b/crates/eql-bindings/schema/v3/query_bigint_ord.json new file mode 100644 index 000000000..027c55b16 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_bigint_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_bigint_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_bigint_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "BigintOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_bigint_ord_ope.json b/crates/eql-bindings/schema/v3/query_bigint_ord_ope.json new file mode 100644 index 000000000..0dc5ee67d --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_bigint_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_bigint_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_bigint_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "BigintOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_bigint_ord_ore.json b/crates/eql-bindings/schema/v3/query_bigint_ord_ore.json new file mode 100644 index 000000000..eed10008b --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_bigint_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_bigint_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_bigint_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "BigintOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_date_eq.json b/crates/eql-bindings/schema/v3/query_date_eq.json new file mode 100644 index 000000000..984858364 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_date_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_date_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_date_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "DateEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_date_ord.json b/crates/eql-bindings/schema/v3/query_date_ord.json new file mode 100644 index 000000000..a958a401c --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_date_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_date_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_date_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "DateOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_date_ord_ope.json b/crates/eql-bindings/schema/v3/query_date_ord_ope.json new file mode 100644 index 000000000..e100772f5 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_date_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_date_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_date_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "DateOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_date_ord_ore.json b/crates/eql-bindings/schema/v3/query_date_ord_ore.json new file mode 100644 index 000000000..cc68f5d67 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_date_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_date_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_date_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "DateOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_double_eq.json b/crates/eql-bindings/schema/v3/query_double_eq.json new file mode 100644 index 000000000..7aee106cd --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_double_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_double_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_double_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "DoubleEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_double_ord.json b/crates/eql-bindings/schema/v3/query_double_ord.json new file mode 100644 index 000000000..73f779672 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_double_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_double_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_double_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "DoubleOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_double_ord_ope.json b/crates/eql-bindings/schema/v3/query_double_ord_ope.json new file mode 100644 index 000000000..800666ddd --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_double_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_double_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_double_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "DoubleOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_double_ord_ore.json b/crates/eql-bindings/schema/v3/query_double_ord_ore.json new file mode 100644 index 000000000..8d62e570d --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_double_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_double_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_double_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "DoubleOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_integer_eq.json b/crates/eql-bindings/schema/v3/query_integer_eq.json new file mode 100644 index 000000000..d83ab492d --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_integer_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_integer_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_integer_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "IntegerEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_integer_ord.json b/crates/eql-bindings/schema/v3/query_integer_ord.json new file mode 100644 index 000000000..01861ace6 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_integer_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_integer_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_integer_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "IntegerOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_integer_ord_ope.json b/crates/eql-bindings/schema/v3/query_integer_ord_ope.json new file mode 100644 index 000000000..35a48ed5b --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_integer_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_integer_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_integer_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "IntegerOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_integer_ord_ore.json b/crates/eql-bindings/schema/v3/query_integer_ord_ore.json new file mode 100644 index 000000000..039a9076e --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_integer_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_integer_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_integer_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "IntegerOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_jsonb.json b/crates/eql-bindings/schema/v3/query_jsonb.json new file mode 100644 index 000000000..2775e0764 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_jsonb.json @@ -0,0 +1,69 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "Selector": { + "description": "A SteVec selector — the `s` wire key. Addresses a JSON path leaf within an\nencrypted document (`public.eql_v3_json`); present on every entry and query element.", + "type": "string" + }, + "SteVecQueryEntry": { + "anyOf": [ + { + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + } + }, + "required": [ + "hm" + ], + "type": "object" + }, + { + "properties": { + "op": { + "$ref": "#/$defs/OpeCllw" + } + }, + "required": [ + "op" + ], + "type": "object" + } + ], + "description": "One element of a SteVec containment needle: a selector plus one term, and\n(per the SQL CHECK) no ciphertext. LAX for the same flatten reason as\n`SteVecEntry`; the \"no `c`\" contract is enforced by `is_valid_ste_vec_query_payload`.", + "properties": { + "s": { + "$ref": "#/$defs/Selector" + } + }, + "required": [ + "s" + ], + "type": "object" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_jsonb.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_jsonb` — a containment needle (`{sv:[query-entry]}`). Strict.", + "properties": { + "sv": { + "items": { + "$ref": "#/$defs/SteVecQueryEntry" + }, + "type": "array" + } + }, + "required": [ + "sv" + ], + "title": "SteVecQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_numeric_eq.json b/crates/eql-bindings/schema/v3/query_numeric_eq.json new file mode 100644 index 000000000..199d48472 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_numeric_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_numeric_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_numeric_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "NumericEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_numeric_ord.json b/crates/eql-bindings/schema/v3/query_numeric_ord.json new file mode 100644 index 000000000..3e826a01d --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_numeric_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_numeric_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_numeric_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "NumericOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_numeric_ord_ope.json b/crates/eql-bindings/schema/v3/query_numeric_ord_ope.json new file mode 100644 index 000000000..bcb4b7218 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_numeric_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_numeric_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_numeric_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "NumericOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_numeric_ord_ore.json b/crates/eql-bindings/schema/v3/query_numeric_ord_ore.json new file mode 100644 index 000000000..9ee42bbbd --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_numeric_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_numeric_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_numeric_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "NumericOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_real_eq.json b/crates/eql-bindings/schema/v3/query_real_eq.json new file mode 100644 index 000000000..50a2e5b03 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_real_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_real_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_real_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "RealEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_real_ord.json b/crates/eql-bindings/schema/v3/query_real_ord.json new file mode 100644 index 000000000..5e1aa53ac --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_real_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_real_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_real_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "RealOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_real_ord_ope.json b/crates/eql-bindings/schema/v3/query_real_ord_ope.json new file mode 100644 index 000000000..f2c1ce590 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_real_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_real_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_real_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "RealOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_real_ord_ore.json b/crates/eql-bindings/schema/v3/query_real_ord_ore.json new file mode 100644 index 000000000..7f062dda9 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_real_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_real_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_real_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "RealOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_smallint_eq.json b/crates/eql-bindings/schema/v3/query_smallint_eq.json new file mode 100644 index 000000000..77fe5e24c --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_smallint_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_smallint_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_smallint_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "SmallintEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_smallint_ord.json b/crates/eql-bindings/schema/v3/query_smallint_ord.json new file mode 100644 index 000000000..2302c2c55 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_smallint_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_smallint_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_smallint_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "SmallintOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_smallint_ord_ope.json b/crates/eql-bindings/schema/v3/query_smallint_ord_ope.json new file mode 100644 index 000000000..e0011a702 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_smallint_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_smallint_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_smallint_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "SmallintOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_smallint_ord_ore.json b/crates/eql-bindings/schema/v3/query_smallint_ord_ore.json new file mode 100644 index 000000000..b3e2cd7aa --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_smallint_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_smallint_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_smallint_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "SmallintOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_text_eq.json b/crates/eql-bindings/schema/v3/query_text_eq.json new file mode 100644 index 000000000..b0ec58ca3 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_text_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_text_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_text_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "TextEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_text_match.json b/crates/eql-bindings/schema/v3/query_text_match.json new file mode 100644 index 000000000..d7a781677 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_text_match.json @@ -0,0 +1,60 @@ +{ + "$defs": { + "BloomFilter": { + "description": "Bloom-filter match term — the `bf` wire key. Backs the `_match` domains (`@>`/`<@` containment). Signed i16: EQL stores the filter as PostgreSQL `smallint[]`, and filters sized above 32768 emit upper-half bit positions as negative signed values.", + "items": { + "format": "int16", + "maximum": 32767, + "minimum": -32768, + "type": "integer" + }, + "type": "array" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_text_match.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_text_match` — match domain query operand.\n\nOperators: `@>` `<@`. Required keys: `v` `i` `bf`.", + "properties": { + "bf": { + "$ref": "#/$defs/BloomFilter" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "bf" + ], + "title": "TextMatchQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_text_ord.json b/crates/eql-bindings/schema/v3/query_text_ord.json new file mode 100644 index 000000000..6e8412be3 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_text_ord.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_text_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_text_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `ob`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm", + "ob" + ], + "title": "TextOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_text_ord_ope.json b/crates/eql-bindings/schema/v3/query_text_ord_ope.json new file mode 100644 index 000000000..0f2d9d3a9 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_text_ord_ope.json @@ -0,0 +1,62 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_text_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_text_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `op`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm", + "op" + ], + "title": "TextOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_text_ord_ore.json b/crates/eql-bindings/schema/v3/query_text_ord_ore.json new file mode 100644 index 000000000..850d4623c --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_text_ord_ore.json @@ -0,0 +1,65 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_text_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_text_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `ob`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm", + "ob" + ], + "title": "TextOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_text_search.json b/crates/eql-bindings/schema/v3/query_text_search.json new file mode 100644 index 000000000..909eafc67 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_text_search.json @@ -0,0 +1,79 @@ +{ + "$defs": { + "BloomFilter": { + "description": "Bloom-filter match term — the `bf` wire key. Backs the `_match` domains (`@>`/`<@` containment). Signed i16: EQL stores the filter as PostgreSQL `smallint[]`, and filters sized above 32768 emit upper-half bit positions as negative signed values.", + "items": { + "format": "int16", + "maximum": 32767, + "minimum": -32768, + "type": "integer" + }, + "type": "array" + }, + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_text_search.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_text_search` — search domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `hm` `ob` `bf`.", + "properties": { + "bf": { + "$ref": "#/$defs/BloomFilter" + }, + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm", + "ob", + "bf" + ], + "title": "TextSearchQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_timestamp_eq.json b/crates/eql-bindings/schema/v3/query_timestamp_eq.json new file mode 100644 index 000000000..f3e7ca3e0 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_timestamp_eq.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Hmac256": { + "description": "HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains\n(`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`.", + "type": "string" + }, + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_timestamp_eq.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_timestamp_eq` — equality domain query operand.\n\nOperators: `=` `<>`. Required keys: `v` `i` `hm`.", + "properties": { + "hm": { + "$ref": "#/$defs/Hmac256" + }, + "i": { + "$ref": "#/$defs/Identifier" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "hm" + ], + "title": "TimestampEqQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_timestamp_ord.json b/crates/eql-bindings/schema/v3/query_timestamp_ord.json new file mode 100644 index 000000000..5a6af8ac4 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_timestamp_ord.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_timestamp_ord.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_timestamp_ord` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "TimestampOrdQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_timestamp_ord_ope.json b/crates/eql-bindings/schema/v3/query_timestamp_ord_ope.json new file mode 100644 index 000000000..82db09152 --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_timestamp_ord_ope.json @@ -0,0 +1,54 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OpeCllw": { + "description": "CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope`\ndomains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec\ndocument (exactly one of `hm` (equality) XOR `op` (ordering) per entry —\nenforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext,\nsortable via native bytea comparison after hex-decode — unlike `ob`\n(block-ORE) it needs no custom comparator. SQL-side constructor:\n`eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`.", + "type": "string" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_timestamp_ord_ope.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_timestamp_ord_ope` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "op": { + "$ref": "#/$defs/OpeCllw" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "op" + ], + "title": "TimestampOrdOpeQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/schema/v3/query_timestamp_ord_ore.json b/crates/eql-bindings/schema/v3/query_timestamp_ord_ore.json new file mode 100644 index 000000000..4322bd7fc --- /dev/null +++ b/crates/eql-bindings/schema/v3/query_timestamp_ord_ore.json @@ -0,0 +1,57 @@ +{ + "$defs": { + "Identifier": { + "additionalProperties": false, + "description": "Table + column identifier — wire shape `{\"t\": \"...\", \"c\": \"...\"}`.\n\nShared by every payload.", + "properties": { + "c": { + "description": "Column name.", + "type": "string" + }, + "t": { + "description": "Table name.", + "type": "string" + } + }, + "required": [ + "t", + "c" + ], + "type": "object" + }, + "OreBlock256": { + "description": "Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore`\ndomains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's\ndomain, so it serves equality too. The block count is width-agnostic on the\nwire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the\narray just carries more block strings. SQL-side constructor:\n`eql_v3_internal.ore_block_256`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "SchemaVersion": { + "const": 3, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + "type": "integer" + } + }, + "$id": "https://schemas.cipherstash.com/eql/v3/query_timestamp_ord_ore.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": false, + "description": "`eql_v3.query_timestamp_ord_ore` — ordering domain query operand.\n\nOperators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`.", + "properties": { + "i": { + "$ref": "#/$defs/Identifier" + }, + "ob": { + "$ref": "#/$defs/OreBlock256" + }, + "v": { + "$ref": "#/$defs/SchemaVersion" + } + }, + "required": [ + "v", + "i", + "ob" + ], + "title": "TimestampOrdOreQuery", + "type": "object" +} \ No newline at end of file diff --git a/crates/eql-bindings/sql/cipherstash-encrypt-uninstall.sql b/crates/eql-bindings/sql/cipherstash-encrypt-uninstall.sql new file mode 100644 index 000000000..7c9dd57f1 --- /dev/null +++ b/crates/eql-bindings/sql/cipherstash-encrypt-uninstall.sql @@ -0,0 +1,8 @@ +-- Uninstall the standalone eql_v3 surface. CASCADE removes the domains, SEM +-- types, operators, opclass, and any columns typed with the eql_v3 domains. +DROP SCHEMA IF EXISTS eql_v3 CASCADE; + +-- Drop the internal implementation schema after eql_v3 (eql_v3's extractors and +-- operators depend on eql_v3_internal types; dropping eql_v3 first with CASCADE +-- removes those dependents, then eql_v3_internal drops cleanly). +DROP SCHEMA IF EXISTS eql_v3_internal CASCADE; diff --git a/crates/eql-bindings/sql/cipherstash-encrypt.sql b/crates/eql-bindings/sql/cipherstash-encrypt.sql new file mode 100644 index 000000000..6d48b5007 --- /dev/null +++ b/crates/eql-bindings/sql/cipherstash-encrypt.sql @@ -0,0 +1,43141 @@ +--! @file v3/schema.sql +--! @brief EQL v3 schema creation +--! +--! Creates the eql_v3 and eql_v3_internal schemas. User-column encrypted +--! domains (public.integer, public.bigint, and future scalar domains) live in +--! public so application tables survive EQL schema uninstall. eql_v3 is the +--! public API for index-term extractors, aggregates, AND the operator-backing +--! comparison wrappers +--! (eq/neq/lt/lte/gt/gte/contains/contained_by, plus the jsonb containment +--! helpers). The wrappers are public because they are the function-form +--! equivalent of every supported operator: platforms without operator support +--! (Supabase/PostgREST calls functions, not operators) invoke them by name. +--! eql_v3_internal houses INTERNAL implementation objects only: the +--! searchable-encrypted-metadata (SEM) index-term types +--! (eql_v3_internal.hmac_256, eql_v3_internal.ore_block_256) and their support +--! functions, the unsupported-operator blockers (which only raise), and the +--! aggregate state functions. Together the two schemas are self-contained — +--! they own every type they need and have no runtime dependency on another EQL +--! schema. +--! +--! Drops existing schema if present to support clean reinstallation. +--! +--! @warning DROP SCHEMA CASCADE will remove all objects in the schema +--! @note eql_v3 is a new, additional schema for the encrypted-domain families. +--! +--! @note DESIGN DECISION — EQL never grants permissions automatically. This +--! installer issues no GRANT (or REVOKE) on eql_v3 or eql_v3_internal: +--! access is strictly opt-in. A deployment that exposes EQL to +--! non-owner roles (e.g. Supabase `authenticated`/`anon` via PostgREST) +--! must explicitly `GRANT USAGE ON SCHEMA eql_v3` and `GRANT EXECUTE` on +--! the functions it needs. This is intentional least-privilege, not an +--! oversight — see docs/reference/permissions.md. eql_v3_internal is not +--! part of the public API and normally needs no grant; where a caller +--! reaches an internal object indirectly (a public operator/aggregate +--! whose backing state-fn/blocker lives there), grant it deliberately. + +--! @brief Drop existing EQL v3 schema +--! @warning CASCADE will drop all dependent objects +DROP SCHEMA IF EXISTS eql_v3 CASCADE; + +--! @brief Create EQL v3 schema +--! @note Houses the encrypted-domain type families +CREATE SCHEMA eql_v3; + +--! @brief Drop existing EQL v3 internal schema +--! @warning CASCADE will drop all dependent objects +DROP SCHEMA IF EXISTS eql_v3_internal CASCADE; + +--! @brief Create EQL v3 internal implementation schema +--! @note Houses INTERNAL eql_v3 objects only: SEM index-term TYPES + their +--! support/constructor/comparator functions, the unsupported-operator +--! blockers (which only raise), the aggregate state functions, and the +--! SteVec CHECK validators. Kept out of the public `eql_v3` surface so +--! internal index-term TYPES do not clutter the Supabase Table Builder +--! type picker. NOTE: the operator-backing comparison *wrappers* are NOT +--! here — they are public in `eql_v3` so every operator has a callable +--! function equivalent for platforms without operator support. +CREATE SCHEMA eql_v3_internal; +COMMENT ON SCHEMA eql_v3_internal IS + 'EQL internal implementation detail; not a public API surface.'; + +--! @brief Schemas owned by the eql_v3 surface +--! +--! Single source of truth for tooling that must enumerate every schema this +--! installer owns (`eql_v3.lints()`, `tasks/pin_search_path_v3.sql`), so a +--! future third eql_v3-family schema is one array literal to edit instead of +--! a hardcoded schema-name predicate repeated at every call site. Keep in +--! sync with the `SCHEMA` / `INTERNAL_SCHEMA` constants in +--! `crates/eql-codegen/src/consts.rs` — those drive what codegen emits into +--! each schema; this drives what tooling scans across both. +--! +--! @return name[] The schema names eql_v3 owns (public + internal). +CREATE FUNCTION eql_v3_internal.owned_schemas() + RETURNS name[] + LANGUAGE sql IMMUTABLE PARALLEL SAFE +AS $$ + SELECT ARRAY['eql_v3', 'eql_v3_internal']::name[] +$$; + +--! @file v3/sem/ore_block_256/types.sql +--! @brief ORE block index-term types (eql_v3 SEM). +--! +--! Self-contained eql_v3 copies of the Order-Revealing Encryption block types +--! (design D1/D3). The eql_v2 originals are unchanged. + +--! @brief ORE block term type for Order-Revealing Encryption +--! +--! Composite type representing a single ORE block term. Stores encrypted data +--! as bytea that enables range comparisons without decryption. +CREATE TYPE eql_v3_internal.ore_block_256_term AS ( + bytes bytea +); + + +--! @brief ORE block index term type for range queries +--! +--! Composite type containing an array of ORE block terms. The array is stored +--! in the 'ob' field of encrypted data payloads. +--! +--! @note Transient type used only during query execution. +CREATE TYPE eql_v3_internal.ore_block_256 AS ( + terms eql_v3_internal.ore_block_256_term[] +); + +--! @file v3/crypto.sql +--! @brief PostgreSQL pgcrypto extension enablement (eql_v3 fork) +--! +--! Forked from src/crypto.sql (design D8) so the entire eql_v3 dependency +--! closure lives under src/v3/. Enables the pgcrypto extension which provides +--! cryptographic functions used by the eql_v3 ORE comparison path. +--! +--! Installs pgcrypto into the `extensions` schema (Supabase convention) to +--! avoid the `extension_in_public` lint. Every EQL function that uses pgcrypto +--! has `pg_catalog, extensions, public` on its `search_path`, so a pre-existing +--! install in `public` keeps working — and a pre-existing install anywhere else +--! will be rejected at install time. The body is idempotent +--! (`CREATE SCHEMA IF NOT EXISTS`, `pg_extension` guard), so running it +--! alongside the eql_v2 copy in a combined install is safe. +--! +--! @note pgcrypto provides functions like digest(), hmac(), gen_random_bytes() + +--! @brief Create extensions schema (Supabase convention) +CREATE SCHEMA IF NOT EXISTS extensions; + +--! @brief Enable pgcrypto extension and validate its schema +DO $$ +DECLARE + pgcrypto_schema name; +BEGIN + IF NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = 'pgcrypto') THEN + CREATE EXTENSION pgcrypto WITH SCHEMA extensions; + END IF; + + SELECT n.nspname INTO pgcrypto_schema + FROM pg_extension e + JOIN pg_namespace n ON n.oid = e.extnamespace + WHERE e.extname = 'pgcrypto'; + + IF pgcrypto_schema = 'extensions' THEN + -- expected location, nothing to say + NULL; + ELSIF pgcrypto_schema = 'public' THEN + RAISE NOTICE + 'pgcrypto is installed in the `public` schema. EQL works against this layout, ' + 'but Supabase splinter will flag it as `extension_in_public`. Move it with: ' + 'ALTER EXTENSION pgcrypto SET SCHEMA extensions'; + ELSE + RAISE EXCEPTION + 'pgcrypto is installed in schema `%`, which is not on the EQL function search_path ' + '(pg_catalog, extensions, public). EQL cryptographic operations would fail at ' + 'runtime. Relocate the extension before installing EQL: ' + 'ALTER EXTENSION pgcrypto SET SCHEMA extensions', + pgcrypto_schema; + END IF; +END $$; + +--! @file v3/common.sql +--! @brief Common utility functions for the self-contained eql_v3 surface. +--! +--! Forked from src/common.sql (design D7) so the eql_v3 ORE constructor owns the +--! one transitive helper it needs without reaching into another schema. The +--! eql_v2 original is unchanged. + +--! @brief Convert JSONB hex array to bytea array +--! @internal +--! +--! Converts a JSONB array of hex-encoded strings into a PostgreSQL bytea array. +--! Used for deserializing binary data (like ORE terms) from JSONB storage. +--! +--! @param val jsonb JSONB array of hex-encoded strings +--! @return bytea[] Array of decoded binary values +--! +--! @note Returns NULL if input is JSON null +--! @note Each array element is hex-decoded to bytea +--! @note plpgsql, not `LANGUAGE sql` (issue #353). This helper's ONLY caller +--! chain is `ore_block_256(val)` -> `jsonb_array_to_ore_block_256(val)` — +--! both reached exclusively from plpgsql and btree operator-class support +--! contexts, where SQL functions can NEVER be inlined and instead pay the +--! per-call SQL-function executor (measured 3.5x the per-call cost of the +--! plpgsql equivalent; +43% on ORE ordered scans end-to-end). plpgsql +--! caches its plan across calls. The non-array guard preserves the v3 +--! behaviour (returns NULL for a non-array scalar; the v2 plpgsql original +--! raised) — both callers only ever pass an array or JSON null (`val->'ob'`), +--! so the divergence stays unreachable in practice; JSON null and empty +--! array still return NULL exactly as before. +CREATE FUNCTION eql_v3_internal.jsonb_array_to_bytea_array(val jsonb) +RETURNS bytea[] + IMMUTABLE +AS $$ +DECLARE + result bytea[]; +BEGIN + IF val IS NULL OR jsonb_typeof(val) != 'array' THEN + RETURN NULL; + END IF; + SELECT array_agg(decode(value::text, 'hex')::bytea) + INTO result + FROM jsonb_array_elements_text(val) AS value; + RETURN result; +END; +$$ LANGUAGE plpgsql; + +--! @internal Keep the inline-critical marker so the post-install +--! pin_search_path pass leaves this unpinned: a `SET search_path` clause on a +--! plpgsql function forces per-call configuration switching — measurable on a +--! helper invoked per compared value in the ore_block_256 opclass hot path. +--! It takes a bare `jsonb` arg (not a jsonb-backed encrypted DOMAIN), so the +--! structural skip in tasks/pin_search_path_v3.sql does not recognise it; +--! this marker is the documented manual opt-in. +COMMENT ON FUNCTION eql_v3_internal.jsonb_array_to_bytea_array(jsonb) IS + 'eql-inline-critical: per-encrypted-value ORE opclass-path helper; must stay unpinned (SET search_path adds per-call overhead)'; + +--! @file v3/sem/hmac_256/types.sql +--! @brief HMAC-SHA256 index term type (eql_v3 SEM) +--! +--! Domain type representing HMAC-SHA256 hash values. Used for exact-match +--! encrypted searches. The hash is stored in the 'hm' field of encrypted data +--! payloads. Self-contained eql_v3 copy (design D1/D3); the eql_v2 original is +--! unchanged. +--! +--! @note Transient type used only during query execution. +CREATE DOMAIN eql_v3_internal.hmac_256 AS text; + +--! @file v3/sem/bloom_filter/types.sql +--! @brief Self-contained eql_v3 Bloom-filter SEM index-term type. + +--! @brief Bloom-filter index term: a bit array stored as smallint[]. +--! +--! Backs the `match` capability (`@>` / `<@`) on `eql_v3_internal.text_match`. The +--! filter is read from the `bf` field of an encrypted jsonb payload. Native +--! `smallint[]` array-containment (`@>`/`<@`) is inherited through the domain, +--! so this type needs no custom operators. +--! +--! @note Self-contained: references no eql_v2 symbol. +CREATE DOMAIN eql_v3_internal.bloom_filter AS smallint[]; + +--! @file v3/scalars/functions.sql +--! @brief Shared blocker helper for the eql_v3 encrypted-domain families. +--! +--! Per-domain wrapper functions live in src/v3/scalars//. +--! Blockers in those files delegate to encrypted_domain_unsupported_bool +--! so every domain raises a uniform domain-specific error rather than +--! letting an unsupported operator fall through to native jsonb +--! behaviour. + +--! @brief Shared blocker helper. Raises 'operator X is not supported +--! for TYPE' so unsupported domain operators surface a clear +--! error rather than fall through to native jsonb behaviour. +--! @param type_name Domain type name (eql_v3.*) +--! @param operator_name Operator symbol (=, <, @>, ->, etc.) +--! @return boolean (never returns; always raises) +CREATE FUNCTION eql_v3_internal.encrypted_domain_unsupported_bool(type_name text, operator_name text) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RAISE EXCEPTION 'operator % is not supported for %', operator_name, type_name; +END; +$$ LANGUAGE plpgsql; + +--! @brief Shared blocker helper returning jsonb. Identical to +--! encrypted_domain_unsupported_bool but typed for blockers shadowing +--! native operators whose result is jsonb (#>, -, #-, ||), so composed +--! expressions resolve and the body raises rather than failing earlier +--! with a misleading 'operator does not exist' on a boolean result. +--! @param type_name Domain type name (eql_v3.*) +--! @param operator_name Operator symbol (#>, -, #-, ||, etc.) +--! @return jsonb (never returns; always raises) +CREATE FUNCTION eql_v3_internal.encrypted_domain_unsupported_jsonb(type_name text, operator_name text) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RAISE EXCEPTION 'operator % is not supported for %', operator_name, type_name; +END; +$$ LANGUAGE plpgsql; + +--! @brief Shared blocker helper returning text. Identical to +--! encrypted_domain_unsupported_bool but typed for blockers shadowing +--! the native #>> operator whose result is text. +--! @param type_name Domain type name (eql_v3.*) +--! @param operator_name Operator symbol (#>>) +--! @return text (never returns; always raises) +CREATE FUNCTION eql_v3_internal.encrypted_domain_unsupported_text(type_name text, operator_name text) +RETURNS text +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RAISE EXCEPTION 'operator % is not supported for %', operator_name, type_name; +END; +$$ LANGUAGE plpgsql; + +--! @file v3/sem/hmac_256/functions.sql +--! @brief HMAC-SHA256 index-term extraction from a jsonb payload (eql_v3 SEM). +--! +--! jsonb-only subset of src/hmac_256/functions.sql. The encrypted-column and +--! ste_vec-entry overloads are intentionally omitted — the eql_v3 scalar +--! domains extract from the jsonb payload directly via a cast to the domain. +--! (Doc comments deliberately avoid naming eql_v2 symbols so the +--! self-containment grep stays clean.) + +--! @brief Extract HMAC-SHA256 index term from JSONB payload +--! +--! Inlinable single-statement SQL — the planner can fold this into the calling +--! query so functional hash/btree indexes built on `eql_v3_internal.eq_term(col)` +--! (which calls this) engage structurally. +--! +--! @param val jsonb containing encrypted EQL payload +--! @return eql_v3_internal.hmac_256 HMAC-SHA256 hash value, or NULL when `hm` is absent +CREATE FUNCTION eql_v3_internal.hmac_256(val jsonb) + RETURNS eql_v3_internal.hmac_256 + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT (val ->> 'hm')::eql_v3_internal.hmac_256 +$$; + + +--! @brief Check if JSONB payload contains HMAC-SHA256 index term +--! +--! @param val jsonb containing encrypted EQL payload +--! @return boolean True if 'hm' field is present and non-null +CREATE FUNCTION eql_v3_internal.has_hmac_256(val jsonb) + RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT (val ->> 'hm') IS NOT NULL +$$; + +--! @file v3/sem/ore_block_256/functions.sql +--! @brief ORE block construction, extraction, and comparison (eql_v3 SEM). +--! +--! jsonb-only subset of src/ore_block_u64_8_256/functions.sql. The +--! encrypted-column overloads are omitted; the helper jsonb_array_to_bytea_array +--! and pgcrypto encrypt() are reached via the forked src/v3/common.sql and +--! src/v3/crypto.sql so the whole closure stays under src/v3. (Doc comments +--! deliberately avoid naming eql_v2 symbols so the self-containment grep stays +--! clean.) + +--! @brief Convert JSONB array to ORE block composite type +--! @internal +--! @param val jsonb Array of hex-encoded ORE block terms +--! @return eql_v3_internal.ore_block_256 ORE block composite, or NULL if input is null +--! @note plpgsql, not `LANGUAGE sql` (issue #353). The sole caller +--! (`ore_block_256`) is itself plpgsql, so this function is NEVER reached +--! from an inlinable context — as `LANGUAGE sql` it paid the per-call +--! SQL-function executor on every compared value in the opclass hot path +--! (measured: +43% on ORE ordered scans vs the plpgsql form). The +--! non-array guard preserves the v3 behaviour (returns NULL for a +--! non-array scalar; the v2 plpgsql original raised); the caller only +--! reaches this when `has_ore_block_256(val)` is true, which requires +--! `val->'ob'` to be a JSON array, so that branch stays unreachable. +--! An empty array (`ob: []`, what encrypting the empty string `""` produces) +--! yields a non-NULL composite with an EMPTY `terms` array — NOT NULL terms. +--! The `COALESCE` is load-bearing: `array_agg` over zero rows returns NULL, and +--! NULL terms make the comparator return NULL (so an empty-text row silently +--! drops out of ordered queries). An empty array instead engages the +--! comparator's `cardinality = 0` guard, which sorts empty BEFORE every +--! non-empty term. See issue #262 (pinned by T7). +CREATE FUNCTION eql_v3_internal.jsonb_array_to_ore_block_256(val jsonb) +RETURNS eql_v3_internal.ore_block_256 + IMMUTABLE +AS $$ +DECLARE + terms eql_v3_internal.ore_block_256_term[]; +BEGIN + IF val IS NULL OR jsonb_typeof(val) != 'array' THEN + RETURN NULL; + END IF; + SELECT array_agg(ROW(b)::eql_v3_internal.ore_block_256_term) + INTO terms + FROM unnest(eql_v3_internal.jsonb_array_to_bytea_array(val)) AS b; + -- plpgsql pitfall: `SELECT INTO ` assigns the + -- select-list columns FIELD-WISE into the variable — return the row + -- constructor directly instead. The COALESCE stays load-bearing for the + -- empty-`ob` case (issue #262): array_agg over zero rows yields NULL, and + -- the comparator needs an EMPTY terms array, not NULL terms. + RETURN ROW(COALESCE(terms, ARRAY[]::eql_v3_internal.ore_block_256_term[]))::eql_v3_internal.ore_block_256; +END; +$$ LANGUAGE plpgsql; + +--! @internal Keep the inline-critical marker so the post-install +--! pin_search_path pass leaves this unpinned: a `SET search_path` clause on a +--! plpgsql function forces per-call configuration switching — measurable on a +--! helper invoked per compared value in the ore_block_256 opclass hot path. +--! It takes a bare `jsonb` arg (not a jsonb-backed encrypted DOMAIN), so the +--! structural skip in tasks/pin_search_path_v3.sql does not recognise it; +--! this marker is the documented manual opt-in. +COMMENT ON FUNCTION eql_v3_internal.jsonb_array_to_ore_block_256(jsonb) IS + 'eql-inline-critical: per-encrypted-value ORE opclass-path helper; must stay unpinned (SET search_path adds per-call overhead)'; + + +--! @brief Extract ORE block index term from JSONB payload +--! @param val jsonb containing encrypted EQL payload +--! @return eql_v3_internal.ore_block_256 ORE block index term +--! @throws Exception if 'ob' field is missing +CREATE FUNCTION eql_v3_internal.ore_block_256(val jsonb) + RETURNS eql_v3_internal.ore_block_256 + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + -- Declared STRICT: PostgreSQL returns NULL for a NULL argument without + -- entering the body, so no explicit `val IS NULL` guard is needed. + IF eql_v3_internal.has_ore_block_256(val) THEN + RETURN eql_v3_internal.jsonb_array_to_ore_block_256(val->'ob'); + END IF; + RAISE 'Expected an ore index (ob) value in json: %', val; + END; +$$ LANGUAGE plpgsql; + + +--! @brief Check if JSONB payload contains an ORE block index term +--! @param val jsonb containing encrypted EQL payload +--! @return boolean True only if the 'ob' field is present and is a JSON array +--! @note A well-formed ORE index term is always a JSON array of block terms, so +--! this guard treats a present-but-non-array `ob` (a scalar or object) as +--! absent. That makes the extractor `ore_block_256(val)` RAISE on a +--! structurally invalid `ob` payload at the boundary instead of silently +--! degrading it to a NULL index term in `jsonb_array_to_ore_block_256`. The +--! previous `val ->> 'ob' IS NOT NULL` form stringified scalars/objects and so +--! reported them as present. `{}` (absent `ob`) and `{"ob": null}` (JSON null) +--! both remain `false`. +CREATE FUNCTION eql_v3_internal.has_ore_block_256(val jsonb) + RETURNS boolean + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + RETURN COALESCE(jsonb_typeof(val -> 'ob') = 'array', false); + END; +$$ LANGUAGE plpgsql; + + +--! @brief Compare two ORE block terms using cryptographic comparison +--! @internal +--! @param a eql_v3_internal.ore_block_256_term First ORE term +--! @param b eql_v3_internal.ore_block_256_term Second ORE term +--! @return integer -1 if a < b, 0 if a = b, 1 if a > b +--! @throws Exception if ciphertexts are different lengths +--! @note Marked `IMMUTABLE` (the three `compare_ore_block_256_term(s)` +--! overloads all are). This deliberately diverges from the v2 originals, +--! which carry no volatility marker and so default to `VOLATILE`. The +--! comparison is deterministic — its only crypto call, pgcrypto `encrypt()`, +--! is itself `IMMUTABLE STRICT PARALLEL SAFE` — so `IMMUTABLE` lets the +--! planner fold/cache these in ordering and index contexts. NOT `STRICT`: +--! the NULL-handling branches below are load-bearing for the array overload. +CREATE FUNCTION eql_v3_internal.compare_ore_block_256_term(a eql_v3_internal.ore_block_256_term, b eql_v3_internal.ore_block_256_term) + RETURNS integer + IMMUTABLE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + eq boolean := true; + unequal_block smallint := 0; + hash_key bytea; + data_block bytea; + encrypt_block bytea; + target_block bytea; + + left_block_size CONSTANT smallint := 16; + right_block_size CONSTANT smallint := 32; + + -- Block count N is DERIVED from the ciphertext length, not hardcoded to 8. + -- Wire format per term: + -- [ N PRP bytes ][ N*16B left blocks ][ 16B hash key ][ N*32B right blocks ] + -- octet_length = 17*N + 16 + 32*N = 49*N + 16 => N = (octet_length - 16) / 49 + -- This serves integer (N=8, 408B), timestamp (N=12, 604B), and numeric + -- (N=14, 702B) with one comparator. + n integer; + left_offset integer; -- ordinal offset of the first left block (1 + N PRP bytes) + right_offset integer; -- ordinal start of the right CT (= total left CT length = 17*N) + + indicator smallint := 0; + BEGIN + IF a IS NULL AND b IS NULL THEN + RETURN 0; + END IF; + + IF a IS NULL THEN + RETURN -1; + END IF; + + IF b IS NULL THEN + RETURN 1; + END IF; + + IF bit_length(a.bytes) != bit_length(b.bytes) THEN + RAISE EXCEPTION 'Ciphertexts are different lengths'; + END IF; + + -- Well-formedness: length must be exactly 49*N + 16 for some N >= 1. The + -- modulo alone is insufficient -- a 16-byte term passes (16 - 16) % 49 = 0 + -- and derives N = 0, which would fall through to the all-blocks-equal path + -- and return 0 instead of raising. The `<= 16` clause is load-bearing. + IF octet_length(a.bytes) <= 16 OR (octet_length(a.bytes) - 16) % 49 != 0 THEN + RAISE EXCEPTION 'Malformed ORE term: % bytes', octet_length(a.bytes); + END IF; + + n := (octet_length(a.bytes) - 16) / 49; + left_offset := 1 + n; -- left blocks begin right after the N PRP bytes + right_offset := 17 * n; -- right CT begins right after the 17*N-byte left CT + + FOR block IN 0..n-1 LOOP + -- Compare each PRP byte (the first N bytes) and its 16-byte left block. + IF + substr(a.bytes, 1 + block, 1) != substr(b.bytes, 1 + block, 1) + OR substr(a.bytes, left_offset + left_block_size * block, left_block_size) != substr(b.bytes, left_offset + left_block_size * block, left_block_size) + THEN + IF eq THEN + unequal_block := block; + END IF; + eq = false; + END IF; + END LOOP; + + IF eq THEN + RETURN 0::integer; + END IF; + + -- Hash key is the IV from the right CT of b. + hash_key := substr(b.bytes, right_offset + 1, 16); + + -- First right block is at right_offset + nonce_size (ordinally indexed). + target_block := substr(b.bytes, right_offset + 17 + (unequal_block * right_block_size), right_block_size); + + data_block := substr(a.bytes, left_offset + (left_block_size * unequal_block), left_block_size); + + encrypt_block := encrypt(data_block::bytea, hash_key::bytea, 'aes-ecb'); + + indicator := ( + get_bit( + encrypt_block, + 0 + ) + get_bit(target_block, get_byte(a.bytes, unequal_block))) % 2; + + IF indicator = 1 THEN + RETURN 1::integer; + ELSE + RETURN -1::integer; + END IF; + END; +$$ LANGUAGE plpgsql; + + +--! @brief Compare arrays of ORE block terms recursively +--! @internal +--! @param a eql_v3_internal.ore_block_256_term[] First array +--! @param b eql_v3_internal.ore_block_256_term[] Second array +--! @return integer -1/0/1, or NULL if either array is NULL +CREATE FUNCTION eql_v3_internal.compare_ore_block_256_terms(a eql_v3_internal.ore_block_256_term[], b eql_v3_internal.ore_block_256_term[]) +RETURNS integer + IMMUTABLE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + cmp_result integer; + BEGIN + IF a IS NULL OR b IS NULL THEN + RETURN NULL; + END IF; + + IF cardinality(a) = 0 AND cardinality(b) = 0 THEN + RETURN 0; + END IF; + + IF (cardinality(a) = 0) AND cardinality(b) > 0 THEN + RETURN -1; + END IF; + + IF cardinality(a) > 0 AND (cardinality(b) = 0) THEN + RETURN 1; + END IF; + + cmp_result := eql_v3_internal.compare_ore_block_256_term(a[1], b[1]); + + IF cmp_result = 0 THEN + RETURN eql_v3_internal.compare_ore_block_256_terms(a[2:array_length(a,1)], b[2:array_length(b,1)]); + END IF; + + RETURN cmp_result; + END +$$ LANGUAGE plpgsql; + + +--! @brief Compare ORE block composite types +--! @internal +--! @param a eql_v3_internal.ore_block_256 First ORE block +--! @param b eql_v3_internal.ore_block_256 Second ORE block +--! @return integer -1/0/1 +CREATE FUNCTION eql_v3_internal.compare_ore_block_256_terms(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS integer + IMMUTABLE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + RETURN eql_v3_internal.compare_ore_block_256_terms(a.terms, b.terms); + END +$$ LANGUAGE plpgsql; + +--! @file v3/sem/ore_block_256/operators.sql +--! @brief Comparison operators on eql_v3_internal.ore_block_256. +--! +--! The six backing functions are inlinable single-statement SQL so the planner +--! can fold the eql_v3 comparison wrappers through to functional-index matching. + +--! @brief Equality backing function for ORE block types +--! @internal +--! +--! @param a eql_v3_internal.ore_block_256 Left operand +--! @param b eql_v3_internal.ore_block_256 Right operand +--! @return boolean True if the ORE blocks are equal +--! +--! @see eql_v3_internal.compare_ore_block_256_terms +CREATE FUNCTION eql_v3_internal.ore_block_256_eq(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.compare_ore_block_256_terms(a, b) = 0 +$$; + +--! @brief Not-equal backing function for ORE block types +--! @internal +--! +--! @param a eql_v3_internal.ore_block_256 Left operand +--! @param b eql_v3_internal.ore_block_256 Right operand +--! @return boolean True if the ORE blocks are not equal +--! +--! @see eql_v3_internal.compare_ore_block_256_terms +CREATE FUNCTION eql_v3_internal.ore_block_256_neq(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.compare_ore_block_256_terms(a, b) <> 0 +$$; + +--! @brief Less-than backing function for ORE block types +--! @internal +--! +--! @param a eql_v3_internal.ore_block_256 Left operand +--! @param b eql_v3_internal.ore_block_256 Right operand +--! @return boolean True if the left operand is less than the right operand +--! +--! @see eql_v3_internal.compare_ore_block_256_terms +CREATE FUNCTION eql_v3_internal.ore_block_256_lt(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.compare_ore_block_256_terms(a, b) = -1 +$$; + +--! @brief Less-than-or-equal backing function for ORE block types +--! @internal +--! +--! @param a eql_v3_internal.ore_block_256 Left operand +--! @param b eql_v3_internal.ore_block_256 Right operand +--! @return boolean True if the left operand is less than or equal to the right operand +--! +--! @see eql_v3_internal.compare_ore_block_256_terms +CREATE FUNCTION eql_v3_internal.ore_block_256_lte(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.compare_ore_block_256_terms(a, b) != 1 +$$; + +--! @brief Greater-than backing function for ORE block types +--! @internal +--! +--! @param a eql_v3_internal.ore_block_256 Left operand +--! @param b eql_v3_internal.ore_block_256 Right operand +--! @return boolean True if the left operand is greater than the right operand +--! +--! @see eql_v3_internal.compare_ore_block_256_terms +CREATE FUNCTION eql_v3_internal.ore_block_256_gt(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.compare_ore_block_256_terms(a, b) = 1 +$$; + +--! @brief Greater-than-or-equal backing function for ORE block types +--! @internal +--! +--! @param a eql_v3_internal.ore_block_256 Left operand +--! @param b eql_v3_internal.ore_block_256 Right operand +--! @return boolean True if the left operand is greater than or equal to the right operand +--! +--! @see eql_v3_internal.compare_ore_block_256_terms +CREATE FUNCTION eql_v3_internal.ore_block_256_gte(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) +RETURNS boolean + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.compare_ore_block_256_terms(a, b) != -1 +$$; + + +--! @brief = operator for ORE block types +--! +--! COMMUTATOR is the operator itself: equality is symmetric. Required for the +--! MERGES flag — without it the planner raises "could not find commutator" the +--! first time an ore_block equality is used as a join qual (e.g. via the inlined +--! eql_v3_internal._ord_ore equality wrappers). +CREATE OPERATOR public.= ( + FUNCTION=eql_v3_internal.ore_block_256_eq, + LEFTARG=eql_v3_internal.ore_block_256, + RIGHTARG=eql_v3_internal.ore_block_256, + COMMUTATOR = OPERATOR(public.=), + NEGATOR = OPERATOR(public.<>), + RESTRICT = eqsel, + JOIN = eqjoinsel, + HASHES, + MERGES +); + +--! @brief <> operator for ORE block types +CREATE OPERATOR public.<> ( + FUNCTION=eql_v3_internal.ore_block_256_neq, + LEFTARG=eql_v3_internal.ore_block_256, + RIGHTARG=eql_v3_internal.ore_block_256, + COMMUTATOR = OPERATOR(public.<>), + NEGATOR = OPERATOR(public.=), + RESTRICT = neqsel, + JOIN = neqjoinsel, + MERGES +); + +--! @brief > operator for ORE block types +CREATE OPERATOR public.> ( + FUNCTION=eql_v3_internal.ore_block_256_gt, + LEFTARG=eql_v3_internal.ore_block_256, + RIGHTARG=eql_v3_internal.ore_block_256, + COMMUTATOR = OPERATOR(public.<), + NEGATOR = OPERATOR(public.<=), + RESTRICT = scalargtsel, + JOIN = scalargtjoinsel +); + +--! @brief < operator for ORE block types +CREATE OPERATOR public.< ( + FUNCTION=eql_v3_internal.ore_block_256_lt, + LEFTARG=eql_v3_internal.ore_block_256, + RIGHTARG=eql_v3_internal.ore_block_256, + COMMUTATOR = OPERATOR(public.>), + NEGATOR = OPERATOR(public.>=), + RESTRICT = scalarltsel, + JOIN = scalarltjoinsel +); + +--! @brief <= operator for ORE block types +CREATE OPERATOR public.<= ( + FUNCTION=eql_v3_internal.ore_block_256_lte, + LEFTARG=eql_v3_internal.ore_block_256, + RIGHTARG=eql_v3_internal.ore_block_256, + COMMUTATOR = OPERATOR(public.>=), + NEGATOR = OPERATOR(public.>), + RESTRICT = scalarlesel, + JOIN = scalarlejoinsel +); + +--! @brief >= operator for ORE block types +CREATE OPERATOR public.>= ( + FUNCTION=eql_v3_internal.ore_block_256_gte, + LEFTARG=eql_v3_internal.ore_block_256, + RIGHTARG=eql_v3_internal.ore_block_256, + COMMUTATOR = OPERATOR(public.<=), + NEGATOR = OPERATOR(public.<), + RESTRICT = scalargesel, + JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/real/real_types.sql +--! @brief Encrypted-domain types for real. + +DO $$ +BEGIN + --! @brief Encrypted domain public.real. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'real' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.real AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.real IS 'EQL encrypted real (storage only)'; + + --! @brief Encrypted domain public.real_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'real_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.real_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.real_eq IS 'EQL encrypted real (equality)'; + + --! @brief Encrypted domain public.real_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'real_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.real_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.real_ord_ore IS 'EQL encrypted real (equality, ordering)'; + + --! @brief Encrypted domain public.real_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'real_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.real_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.real_ord IS 'EQL encrypted real (equality, ordering)'; + + --! @brief Encrypted domain public.real_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'real_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.real_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.real_ord_ope IS 'EQL encrypted real (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_ore_functions.sql +--! @brief Functions for public.real_ord_ore. + +--! @brief Index extractor for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.real_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.real_ord_ore) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.real_ord_ore) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.real_ord_ore) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.real_ord_ore) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.real_ord_ore) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.real_ord_ore) $$; + +--! @brief Operator wrapper for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.real_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_ord_ore, b public.real_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.real_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param selector text +--! @return public.real_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.real_ord_ore, selector text) +RETURNS public.real_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param selector integer +--! @return public.real_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.real_ord_ore, selector integer) +RETURNS public.real_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a jsonb +--! @param selector public.real_ord_ore +--! @return public.real_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.real_ord_ore) +RETURNS public.real_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a jsonb +--! @param selector public.real_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.real_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.real_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.real_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.real_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.real_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.real_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.real_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.real_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.real_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b public.real_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_ord_ore, b public.real_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a public.real_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ore. +--! @param a jsonb +--! @param b public.real_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.real_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/smallint/smallint_types.sql +--! @brief Encrypted-domain types for smallint. + +DO $$ +BEGIN + --! @brief Encrypted domain public.smallint. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'smallint' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.smallint AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.smallint IS 'EQL encrypted smallint (storage only)'; + + --! @brief Encrypted domain public.smallint_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'smallint_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.smallint_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.smallint_eq IS 'EQL encrypted smallint (equality)'; + + --! @brief Encrypted domain public.smallint_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'smallint_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.smallint_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.smallint_ord_ore IS 'EQL encrypted smallint (equality, ordering)'; + + --! @brief Encrypted domain public.smallint_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'smallint_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.smallint_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.smallint_ord IS 'EQL encrypted smallint (equality, ordering)'; + + --! @brief Encrypted domain public.smallint_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'smallint_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.smallint_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.smallint_ord_ope IS 'EQL encrypted smallint (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_eq_functions.sql +--! @brief Functions for public.smallint_eq. + +--! @brief Index extractor for public.smallint_eq. +--! @param a public.smallint_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.smallint_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.smallint_eq) $$; + +--! @brief Operator wrapper for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.smallint_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.smallint_eq) $$; + +--! @brief Operator wrapper for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.smallint_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.smallint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.smallint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.smallint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.smallint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_eq, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.smallint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param selector text +--! @return public.smallint_eq +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_eq, selector text) +RETURNS public.smallint_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param selector integer +--! @return public.smallint_eq +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_eq, selector integer) +RETURNS public.smallint_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param selector public.smallint_eq +--! @return public.smallint_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.smallint_eq) +RETURNS public.smallint_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param selector public.smallint_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.smallint_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.smallint_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.smallint_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.smallint_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.smallint_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.smallint_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.smallint_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.smallint_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.smallint_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b public.smallint_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_eq, b public.smallint_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a public.smallint_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_eq. +--! @param a jsonb +--! @param b public.smallint_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.smallint_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/date/date_types.sql +--! @brief Encrypted-domain types for date. + +DO $$ +BEGIN + --! @brief Encrypted domain public.date. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'date' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.date AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.date IS 'EQL encrypted date (storage only)'; + + --! @brief Encrypted domain public.date_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'date_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.date_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.date_eq IS 'EQL encrypted date (equality)'; + + --! @brief Encrypted domain public.date_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'date_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.date_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.date_ord_ore IS 'EQL encrypted date (equality, ordering)'; + + --! @brief Encrypted domain public.date_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'date_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.date_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.date_ord IS 'EQL encrypted date (equality, ordering)'; + + --! @brief Encrypted domain public.date_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'date_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.date_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.date_ord_ope IS 'EQL encrypted date (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/numeric/numeric_types.sql +--! @brief Encrypted-domain types for numeric. + +DO $$ +BEGIN + --! @brief Encrypted domain public.numeric. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'numeric' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.numeric AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.numeric IS 'EQL encrypted numeric (storage only)'; + + --! @brief Encrypted domain public.numeric_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'numeric_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.numeric_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.numeric_eq IS 'EQL encrypted numeric (equality)'; + + --! @brief Encrypted domain public.numeric_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'numeric_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.numeric_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.numeric_ord_ore IS 'EQL encrypted numeric (equality, ordering)'; + + --! @brief Encrypted domain public.numeric_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'numeric_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.numeric_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.numeric_ord IS 'EQL encrypted numeric (equality, ordering)'; + + --! @brief Encrypted domain public.numeric_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'numeric_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.numeric_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.numeric_ord_ope IS 'EQL encrypted numeric (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/double/double_types.sql +--! @brief Encrypted-domain types for double. + +DO $$ +BEGIN + --! @brief Encrypted domain public.double. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'double' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.double AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.double IS 'EQL encrypted double (storage only)'; + + --! @brief Encrypted domain public.double_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'double_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.double_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.double_eq IS 'EQL encrypted double (equality)'; + + --! @brief Encrypted domain public.double_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'double_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.double_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.double_ord_ore IS 'EQL encrypted double (equality, ordering)'; + + --! @brief Encrypted domain public.double_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'double_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.double_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.double_ord IS 'EQL encrypted double (equality, ordering)'; + + --! @brief Encrypted domain public.double_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'double_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.double_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.double_ord_ope IS 'EQL encrypted double (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_eq_functions.sql +--! @brief Functions for public.double_eq. + +--! @brief Index extractor for public.double_eq. +--! @param a public.double_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.double_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_eq, b public.double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.double_eq) $$; + +--! @brief Operator wrapper for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.double_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_eq, b public.double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.double_eq) $$; + +--! @brief Operator wrapper for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.double_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.double_eq, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.double_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.double_eq, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.double_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.double_eq, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.double_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.double_eq, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.double_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_eq, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_eq, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.double_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param selector text +--! @return public.double_eq +CREATE FUNCTION eql_v3_internal."->"(a public.double_eq, selector text) +RETURNS public.double_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param selector integer +--! @return public.double_eq +CREATE FUNCTION eql_v3_internal."->"(a public.double_eq, selector integer) +RETURNS public.double_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param selector public.double_eq +--! @return public.double_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.double_eq) +RETURNS public.double_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param selector public.double_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.double_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.double_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.double_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.double_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.double_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.double_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.double_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.double_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.double_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b public.double_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_eq, b public.double_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a public.double_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_eq. +--! @param a jsonb +--! @param b public.double_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.double_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/integer/integer_types.sql +--! @brief Encrypted-domain types for integer. + +DO $$ +BEGIN + --! @brief Encrypted domain public.integer. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'integer' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.integer AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.integer IS 'EQL encrypted integer (storage only)'; + + --! @brief Encrypted domain public.integer_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'integer_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.integer_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.integer_eq IS 'EQL encrypted integer (equality)'; + + --! @brief Encrypted domain public.integer_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'integer_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.integer_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.integer_ord_ore IS 'EQL encrypted integer (equality, ordering)'; + + --! @brief Encrypted domain public.integer_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'integer_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.integer_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.integer_ord IS 'EQL encrypted integer (equality, ordering)'; + + --! @brief Encrypted domain public.integer_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'integer_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.integer_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.integer_ord_ope IS 'EQL encrypted integer (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/timestamp/timestamp_types.sql +--! @brief Encrypted-domain types for timestamp. + +DO $$ +BEGIN + --! @brief Encrypted domain public.timestamp. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'timestamp' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.timestamp AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.timestamp IS 'EQL encrypted timestamp (storage only)'; + + --! @brief Encrypted domain public.timestamp_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'timestamp_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.timestamp_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.timestamp_eq IS 'EQL encrypted timestamp (equality)'; + + --! @brief Encrypted domain public.timestamp_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'timestamp_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.timestamp_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.timestamp_ord_ore IS 'EQL encrypted timestamp (equality, ordering)'; + + --! @brief Encrypted domain public.timestamp_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'timestamp_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.timestamp_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.timestamp_ord IS 'EQL encrypted timestamp (equality, ordering)'; + + --! @brief Encrypted domain public.timestamp_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'timestamp_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.timestamp_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.timestamp_ord_ope IS 'EQL encrypted timestamp (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/text/text_types.sql +--! @brief Encrypted-domain types for text. + +DO $$ +BEGIN + --! @brief Encrypted domain public.text. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text IS 'EQL encrypted text (storage only)'; + + --! @brief Encrypted domain public.text_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text_eq IS 'EQL encrypted text (equality)'; + + --! @brief Encrypted domain public.text_match. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text_match' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text_match AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'bf' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text_match IS 'EQL encrypted text (containment)'; + + --! @brief Encrypted domain public.text_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text_ord_ore IS 'EQL encrypted text (equality, ordering)'; + + --! @brief Encrypted domain public.text_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text_ord IS 'EQL encrypted text (equality, ordering)'; + + --! @brief Encrypted domain public.text_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text_ord_ope IS 'EQL encrypted text (equality, ordering)'; + + --! @brief Encrypted domain public.text_search. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'text_search' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.text_search AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE ? 'ob' + AND VALUE ? 'bf' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.text_search IS 'EQL encrypted text (equality, ordering, containment)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_functions.sql +--! @brief Functions for public.text_ord. + +--! @brief Index extractor for public.text_ord. +--! @param a public.text_ord +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.text_ord) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for public.text_ord. +--! @param a public.text_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.text_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.text_ord) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_ord) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.text_ord) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_ord) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.text_ord) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.text_ord) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.text_ord) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.text_ord) $$; + +--! @brief Operator wrapper for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_ord, b public.text_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.text_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_ord, b public.text_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.text_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param selector text +--! @return public.text_ord +CREATE FUNCTION eql_v3_internal."->"(a public.text_ord, selector text) +RETURNS public.text_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param selector integer +--! @return public.text_ord +CREATE FUNCTION eql_v3_internal."->"(a public.text_ord, selector integer) +RETURNS public.text_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a jsonb +--! @param selector public.text_ord +--! @return public.text_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text_ord) +RETURNS public.text_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a jsonb +--! @param selector public.text_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b public.text_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_ord, b public.text_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a public.text_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord. +--! @param a jsonb +--! @param b public.text_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord'; END; $$ +LANGUAGE plpgsql; + +--! @file v3/sem/bloom_filter/functions.sql +--! @brief Extractor for the eql_v3 Bloom-filter SEM index term. +--! +--! jsonb-only subset of src/bloom_filter/functions.sql. The encrypted-column +--! overloads are intentionally omitted — the eql_v3 scalar domains extract from +--! the jsonb payload directly via a cast to the domain. (Doc comments +--! deliberately avoid naming eql_v2 symbols so the self-containment grep stays +--! clean.) + +--! @brief Test whether a jsonb payload carries a Bloom-filter (`bf`) term. +--! +--! @param val jsonb The encrypted payload. +--! @return boolean True when the `bf` key is present and non-null. +--! +--! @internal Defined for parity with the eql_v3 SEM index-term predicates +--! (`has_hmac_256` / `has_ore_block_256`); it is not currently called by +--! the extractor below, which gates on value-shape inline, nor by the generated +--! domain CHECK, which tests `bf` presence via the envelope-key skeleton. Kept +--! as the canonical presence test for callers that need one. +CREATE FUNCTION eql_v3_internal.has_bloom_filter(val jsonb) + RETURNS boolean + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + RETURN val ? 'bf' AND val ->> 'bf' IS NOT NULL; + END; +$$ LANGUAGE plpgsql; + +--! @brief Extract the Bloom-filter index term from a jsonb payload. +--! +--! Inlinable single-statement SQL — the planner can fold this into the calling +--! query so the functional GIN index built on `eql_v3_internal.match_term(col)` (which +--! calls this) engages structurally. Mirrors `eql_v3_internal.hmac_256(jsonb)`: no RAISE +--! and no pinned `search_path`. Returns NULL when `bf` is absent or present but +--! not a json array, rather than raising. The `text_match` domain CHECK +--! guarantees the `bf` *key* is present but not that it is an array, so a +--! non-array `bf` (e.g. `{"bf": null}`) can reach here even on a typed value; +--! gating on `jsonb_typeof(...) = 'array'` returns NULL for that case — and for +--! raw jsonb outside the domain — instead of erroring inside +--! `jsonb_array_elements`. NULL, like the HMAC extractor, is the right answer. An +--! empty `bf` array yields an empty filter (contains nothing, contained by +--! everything), matching set-containment semantics. +--! +--! @param val jsonb The encrypted payload. +--! @return eql_v3_internal.bloom_filter The `bf` array as a smallint[] domain value, or +--! NULL when `bf` is absent or not a json array. +CREATE FUNCTION eql_v3_internal.bloom_filter(val jsonb) + RETURNS eql_v3_internal.bloom_filter + LANGUAGE sql + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT CASE WHEN jsonb_typeof(val -> 'bf') = 'array' + THEN ARRAY(SELECT jsonb_array_elements(val -> 'bf'))::eql_v3_internal.bloom_filter + END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_eq_functions.sql +--! @brief Functions for public.timestamp_eq. + +--! @brief Index extractor for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.timestamp_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.timestamp_eq) $$; + +--! @brief Operator wrapper for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.timestamp_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.timestamp_eq) $$; + +--! @brief Operator wrapper for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.timestamp_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.timestamp_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.timestamp_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.timestamp_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.timestamp_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_eq, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.timestamp_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param selector text +--! @return public.timestamp_eq +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_eq, selector text) +RETURNS public.timestamp_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param selector integer +--! @return public.timestamp_eq +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_eq, selector integer) +RETURNS public.timestamp_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param selector public.timestamp_eq +--! @return public.timestamp_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.timestamp_eq) +RETURNS public.timestamp_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param selector public.timestamp_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.timestamp_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.timestamp_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.timestamp_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.timestamp_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.timestamp_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.timestamp_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.timestamp_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.timestamp_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.timestamp_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b public.timestamp_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_eq, b public.timestamp_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a public.timestamp_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_eq. +--! @param a jsonb +--! @param b public.timestamp_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.timestamp_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_eq'; END; $$ +LANGUAGE plpgsql; + +--! @file v3/sem/ope_cllw/types.sql +--! @brief CLLW OPE index term type for ordered range queries (eql_v3 SEM) +--! +--! Domain type representing a CLLW (Copyless Logarithmic Width) +--! Order-Preserving Encryption term. The ciphertext is stored hex-encoded in +--! the `op` field of encrypted payloads — the scalar `_ord_ope` domains and +--! the ordered entries of a SteVec document (`public.jsonb_entry`); the +--! domain carries the hex-decoded bytes. +--! +--! A DOMAIN over bytea, not a composite: the OPE ciphertext is +--! order-preserving under plain byte comparison, so the domain inherits +--! bytea's native comparison operators and DEFAULT btree operator class +--! outright — no hand-written operators, comparator, or operator class (the +--! same pattern as eql_v3_internal.hmac_256 over text). That keeps the whole +--! comparison chain inlinable, so a functional btree index on +--! `eql_v3.ord_ope_term(col)` engages structurally for the `_ord_ope` +--! domains' comparison operators — and likewise on +--! `eql_v3.ord_ope_term(col -> 'selector')` for SteVec entry ordering. +--! +--! @note Transient type used only during query execution. +--! @see eql_v3_internal.ope_cllw +CREATE DOMAIN eql_v3_internal.ope_cllw AS bytea; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/bigint/bigint_types.sql +--! @brief Encrypted-domain types for bigint. + +DO $$ +BEGIN + --! @brief Encrypted domain public.bigint. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'bigint' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.bigint AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.bigint IS 'EQL encrypted bigint (storage only)'; + + --! @brief Encrypted domain public.bigint_eq. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'bigint_eq' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.bigint_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'hm' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.bigint_eq IS 'EQL encrypted bigint (equality)'; + + --! @brief Encrypted domain public.bigint_ord_ore. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'bigint_ord_ore' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.bigint_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.bigint_ord_ore IS 'EQL encrypted bigint (equality, ordering)'; + + --! @brief Encrypted domain public.bigint_ord. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'bigint_ord' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.bigint_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'ob' + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.bigint_ord IS 'EQL encrypted bigint (equality, ordering)'; + + --! @brief Encrypted domain public.bigint_ord_ope. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'bigint_ord_ope' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.bigint_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE ? 'op' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.bigint_ord_ope IS 'EQL encrypted bigint (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_functions.sql +--! @brief Functions for public.bigint. + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.bigint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param selector text +--! @return public.bigint +CREATE FUNCTION eql_v3_internal."->"(a public.bigint, selector text) +RETURNS public.bigint IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param selector integer +--! @return public.bigint +CREATE FUNCTION eql_v3_internal."->"(a public.bigint, selector integer) +RETURNS public.bigint IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param selector public.bigint +--! @return public.bigint +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.bigint) +RETURNS public.bigint IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param selector public.bigint +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.bigint) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.bigint, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.bigint, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.bigint, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.bigint, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.bigint, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.bigint, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.bigint, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.bigint, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b public.bigint +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint, b public.bigint) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a public.bigint +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint. +--! @param a jsonb +--! @param b public.bigint +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.bigint) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_functions.sql +--! @brief Functions for public.bigint_ord. + +--! @brief Index extractor for public.bigint_ord. +--! @param a public.bigint_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.bigint_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.bigint_ord) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.bigint_ord) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.bigint_ord) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.bigint_ord) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.bigint_ord) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.bigint_ord) $$; + +--! @brief Operator wrapper for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.bigint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_ord, b public.bigint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.bigint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param selector text +--! @return public.bigint_ord +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_ord, selector text) +RETURNS public.bigint_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param selector integer +--! @return public.bigint_ord +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_ord, selector integer) +RETURNS public.bigint_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a jsonb +--! @param selector public.bigint_ord +--! @return public.bigint_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.bigint_ord) +RETURNS public.bigint_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a jsonb +--! @param selector public.bigint_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.bigint_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.bigint_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.bigint_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.bigint_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.bigint_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.bigint_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.bigint_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.bigint_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.bigint_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b public.bigint_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_ord, b public.bigint_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a public.bigint_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord. +--! @param a jsonb +--! @param b public.bigint_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.bigint_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/bigint/query_bigint_types.sql +--! @brief Query-operand domains for bigint (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_bigint_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_bigint_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_bigint_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_bigint_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_bigint_eq IS 'EQL bigint query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_bigint_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_bigint_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_bigint_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_bigint_ord_ore IS 'EQL bigint query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_bigint_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_bigint_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_bigint_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_bigint_ord IS 'EQL bigint query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_bigint_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_bigint_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_bigint_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_bigint_ord_ope IS 'EQL bigint query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_ore_functions.sql +--! @brief Functions for public.bigint_ord_ore. + +--! @brief Index extractor for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.bigint_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.bigint_ord_ore) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.bigint_ord_ore) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.bigint_ord_ore) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.bigint_ord_ore) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.bigint_ord_ore) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.bigint_ord_ore) $$; + +--! @brief Operator wrapper for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.bigint_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.bigint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.bigint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param selector text +--! @return public.bigint_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_ord_ore, selector text) +RETURNS public.bigint_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param selector integer +--! @return public.bigint_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_ord_ore, selector integer) +RETURNS public.bigint_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a jsonb +--! @param selector public.bigint_ord_ore +--! @return public.bigint_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.bigint_ord_ore) +RETURNS public.bigint_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a jsonb +--! @param selector public.bigint_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.bigint_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.bigint_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.bigint_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.bigint_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.bigint_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.bigint_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.bigint_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.bigint_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.bigint_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_ord_ore, b public.bigint_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ore. +--! @param a jsonb +--! @param b public.bigint_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.bigint_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @file v3/sem/ope_cllw/functions.sql +--! @brief CLLW OPE index-term extraction from a jsonb payload (eql_v3 SEM). + +--! @brief Extract CLLW OPE index term from JSONB payload +--! +--! Returns the CLLW OPE ciphertext from the `op` field of an encrypted scalar +--! payload, hex-decoded to the bytea-backed eql_v3_internal.ope_cllw domain. +--! +--! Inlinable single-statement SQL — the body is a strict expression of the +--! argument (`->>` and `decode` are both STRICT), so the planner folds this +--! into the calling query and functional btree indexes built on +--! `eql_v3.ord_ope_term(col)` (which calls this) engage structurally, the +--! same way the hmac_256 equality chain does. +--! +--! **Missing-`op` semantics**: `val ->> 'op'` is NULL when `op` is absent and +--! the strict chain propagates it, so the extractor returns SQL NULL and +--! btree's NULL handling filters those rows from range queries. +--! +--! @param val jsonb containing encrypted EQL payload +--! @return eql_v3_internal.ope_cllw Hex-decoded CLLW OPE term, or NULL when `op` is +--! absent +CREATE FUNCTION eql_v3_internal.ope_cllw(val jsonb) + RETURNS eql_v3_internal.ope_cllw + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT decode(val ->> 'op', 'hex')::eql_v3_internal.ope_cllw +$$; + +COMMENT ON FUNCTION eql_v3_internal.ope_cllw(jsonb) IS + 'eql-inline-critical: raw-jsonb CLLW OPE extractor; must stay inlinable (unpinned search_path)'; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_ore_operators.sql +--! @brief Operators for public.bigint_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.bigint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_ord_ore, RIGHTARG = public.bigint_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_operators.sql +--! @brief Operators for public.bigint_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.bigint_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.bigint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.bigint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.bigint_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.bigint_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.bigint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.bigint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.bigint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_ord, RIGHTARG = public.bigint_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_ord_functions.sql +--! @brief Functions for eql_v3.query_bigint_ord. + +--! @brief Index extractor for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_bigint_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a public.bigint_ord +--! @param b eql_v3.query_bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord, b eql_v3.query_bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a public.bigint_ord +--! @param b eql_v3.query_bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord, b eql_v3.query_bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a public.bigint_ord +--! @param b eql_v3.query_bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord, b eql_v3.query_bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a public.bigint_ord +--! @param b eql_v3.query_bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord, b eql_v3.query_bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a public.bigint_ord +--! @param b eql_v3.query_bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord, b eql_v3.query_bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a public.bigint_ord +--! @param b eql_v3.query_bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord, b eql_v3.query_bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord. +--! @param a eql_v3.query_bigint_ord +--! @param b public.bigint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_bigint_ord, b public.bigint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/real/query_real_types.sql +--! @brief Query-operand domains for real (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_real_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_real_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_real_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_real_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_real_eq IS 'EQL real query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_real_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_real_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_real_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_real_ord_ore IS 'EQL real query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_real_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_real_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_real_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_real_ord IS 'EQL real query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_real_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_real_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_real_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_real_ord_ope IS 'EQL real query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_real_ord_ore. + +--! @brief Index extractor for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_real_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a public.real_ord_ore +--! @param b eql_v3.query_real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord_ore, b eql_v3.query_real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a public.real_ord_ore +--! @param b eql_v3.query_real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord_ore, b eql_v3.query_real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a public.real_ord_ore +--! @param b eql_v3.query_real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord_ore, b eql_v3.query_real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a public.real_ord_ore +--! @param b eql_v3.query_real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord_ore, b eql_v3.query_real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a public.real_ord_ore +--! @param b eql_v3.query_real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord_ore, b eql_v3.query_real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a public.real_ord_ore +--! @param b eql_v3.query_real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord_ore, b eql_v3.query_real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ore. +--! @param a eql_v3.query_real_ord_ore +--! @param b public.real_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_real_ord_ore, b public.real_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_functions.sql +--! @brief Functions for public.real_ord. + +--! @brief Index extractor for public.real_ord. +--! @param a public.real_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.real_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.real_ord) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.real_ord) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.real_ord) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.real_ord) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.real_ord) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.real_ord) $$; + +--! @brief Operator wrapper for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.real_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_ord, b public.real_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.real_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_ord, b public.real_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.real_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param selector text +--! @return public.real_ord +CREATE FUNCTION eql_v3_internal."->"(a public.real_ord, selector text) +RETURNS public.real_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param selector integer +--! @return public.real_ord +CREATE FUNCTION eql_v3_internal."->"(a public.real_ord, selector integer) +RETURNS public.real_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a jsonb +--! @param selector public.real_ord +--! @return public.real_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.real_ord) +RETURNS public.real_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a jsonb +--! @param selector public.real_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.real_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.real_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.real_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.real_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.real_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.real_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.real_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.real_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.real_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b public.real_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_ord, b public.real_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a public.real_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord. +--! @param a jsonb +--! @param b public.real_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.real_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_eq_functions.sql +--! @brief Functions for public.real_eq. + +--! @brief Index extractor for public.real_eq. +--! @param a public.real_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.real_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_eq, b public.real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.real_eq) $$; + +--! @brief Operator wrapper for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.real_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_eq, b public.real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.real_eq) $$; + +--! @brief Operator wrapper for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.real_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.real_eq, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.real_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.real_eq, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.real_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.real_eq, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.real_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.real_eq, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.real_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_eq, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_eq, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.real_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param selector text +--! @return public.real_eq +CREATE FUNCTION eql_v3_internal."->"(a public.real_eq, selector text) +RETURNS public.real_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param selector integer +--! @return public.real_eq +CREATE FUNCTION eql_v3_internal."->"(a public.real_eq, selector integer) +RETURNS public.real_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param selector public.real_eq +--! @return public.real_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.real_eq) +RETURNS public.real_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param selector public.real_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.real_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.real_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.real_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.real_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.real_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.real_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.real_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.real_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.real_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b public.real_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_eq, b public.real_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a public.real_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_eq. +--! @param a jsonb +--! @param b public.real_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.real_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_ope_functions.sql +--! @brief Functions for public.real_ord_ope. + +--! @brief Index extractor for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.real_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.real_ord_ope) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.real_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.real_ord_ope) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.real_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.real_ord_ope) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.real_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.real_ord_ope) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.real_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.real_ord_ope) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.real_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.real_ord_ope) $$; + +--! @brief Operator wrapper for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.real_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.real_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_ord_ope, b public.real_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.real_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param selector text +--! @return public.real_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.real_ord_ope, selector text) +RETURNS public.real_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param selector integer +--! @return public.real_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.real_ord_ope, selector integer) +RETURNS public.real_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a jsonb +--! @param selector public.real_ord_ope +--! @return public.real_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.real_ord_ope) +RETURNS public.real_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a jsonb +--! @param selector public.real_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.real_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.real_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.real_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.real_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.real_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.real_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.real_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.real_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.real_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b public.real_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_ord_ope, b public.real_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a public.real_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real_ord_ope. +--! @param a jsonb +--! @param b public.real_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.real_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_eq_functions.sql +--! @brief Functions for eql_v3.query_real_eq. + +--! @brief Index extractor for eql_v3.query_real_eq. +--! @param a eql_v3.query_real_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_real_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_real_eq. +--! @param a public.real_eq +--! @param b eql_v3.query_real_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_eq, b eql_v3.query_real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_eq. +--! @param a eql_v3.query_real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_real_eq, b public.real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_eq. +--! @param a public.real_eq +--! @param b eql_v3.query_real_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_eq, b eql_v3.query_real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_eq. +--! @param a eql_v3.query_real_eq +--! @param b public.real_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_real_eq, b public.real_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_real_ord_ope. + +--! @brief Index extractor for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_real_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a public.real_ord_ope +--! @param b eql_v3.query_real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord_ope, b eql_v3.query_real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a public.real_ord_ope +--! @param b eql_v3.query_real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord_ope, b eql_v3.query_real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a public.real_ord_ope +--! @param b eql_v3.query_real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord_ope, b eql_v3.query_real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a public.real_ord_ope +--! @param b eql_v3.query_real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord_ope, b eql_v3.query_real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a public.real_ord_ope +--! @param b eql_v3.query_real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord_ope, b eql_v3.query_real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a public.real_ord_ope +--! @param b eql_v3.query_real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord_ope, b eql_v3.query_real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord_ope. +--! @param a eql_v3.query_real_ord_ope +--! @param b public.real_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_real_ord_ope, b public.real_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_ore_functions.sql +--! @brief Functions for public.smallint_ord_ore. + +--! @brief Index extractor for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.smallint_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.smallint_ord_ore) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.smallint_ord_ore) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.smallint_ord_ore) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.smallint_ord_ore) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.smallint_ord_ore) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.smallint_ord_ore) $$; + +--! @brief Operator wrapper for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.smallint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.smallint_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param selector text +--! @return public.smallint_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_ord_ore, selector text) +RETURNS public.smallint_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param selector integer +--! @return public.smallint_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_ord_ore, selector integer) +RETURNS public.smallint_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a jsonb +--! @param selector public.smallint_ord_ore +--! @return public.smallint_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.smallint_ord_ore) +RETURNS public.smallint_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a jsonb +--! @param selector public.smallint_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.smallint_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.smallint_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.smallint_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.smallint_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.smallint_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.smallint_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.smallint_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.smallint_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.smallint_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_ord_ore, b public.smallint_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ore. +--! @param a jsonb +--! @param b public.smallint_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.smallint_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_ore_operators.sql +--! @brief Operators for public.smallint_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.smallint_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_ord_ore, RIGHTARG = public.smallint_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/smallint/query_smallint_types.sql +--! @brief Query-operand domains for smallint (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_smallint_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_smallint_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_smallint_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_smallint_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_smallint_eq IS 'EQL smallint query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_smallint_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_smallint_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_smallint_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_smallint_ord_ore IS 'EQL smallint query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_smallint_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_smallint_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_smallint_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_smallint_ord IS 'EQL smallint query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_smallint_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_smallint_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_smallint_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_smallint_ord_ope IS 'EQL smallint query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_ope_functions.sql +--! @brief Functions for public.smallint_ord_ope. + +--! @brief Index extractor for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.smallint_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.smallint_ord_ope) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.smallint_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.smallint_ord_ope) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.smallint_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.smallint_ord_ope) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.smallint_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.smallint_ord_ope) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.smallint_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.smallint_ord_ope) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.smallint_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.smallint_ord_ope) $$; + +--! @brief Operator wrapper for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.smallint_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.smallint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.smallint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param selector text +--! @return public.smallint_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_ord_ope, selector text) +RETURNS public.smallint_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param selector integer +--! @return public.smallint_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_ord_ope, selector integer) +RETURNS public.smallint_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a jsonb +--! @param selector public.smallint_ord_ope +--! @return public.smallint_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.smallint_ord_ope) +RETURNS public.smallint_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a jsonb +--! @param selector public.smallint_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.smallint_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.smallint_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.smallint_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.smallint_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.smallint_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.smallint_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.smallint_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.smallint_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.smallint_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_ord_ope, b public.smallint_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord_ope. +--! @param a jsonb +--! @param b public.smallint_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.smallint_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_functions.sql +--! @brief Functions for public.smallint_ord. + +--! @brief Index extractor for public.smallint_ord. +--! @param a public.smallint_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.smallint_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.smallint_ord) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.smallint_ord) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.smallint_ord) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.smallint_ord) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.smallint_ord) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.smallint_ord) $$; + +--! @brief Operator wrapper for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.smallint_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.smallint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_ord, b public.smallint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.smallint_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param selector text +--! @return public.smallint_ord +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_ord, selector text) +RETURNS public.smallint_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param selector integer +--! @return public.smallint_ord +CREATE FUNCTION eql_v3_internal."->"(a public.smallint_ord, selector integer) +RETURNS public.smallint_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a jsonb +--! @param selector public.smallint_ord +--! @return public.smallint_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.smallint_ord) +RETURNS public.smallint_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a jsonb +--! @param selector public.smallint_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.smallint_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.smallint_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.smallint_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.smallint_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.smallint_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.smallint_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.smallint_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.smallint_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.smallint_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b public.smallint_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_ord, b public.smallint_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a public.smallint_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint_ord. +--! @param a jsonb +--! @param b public.smallint_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.smallint_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_eq_functions.sql +--! @brief Functions for eql_v3.query_smallint_eq. + +--! @brief Index extractor for eql_v3.query_smallint_eq. +--! @param a eql_v3.query_smallint_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_smallint_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_eq. +--! @param a public.smallint_eq +--! @param b eql_v3.query_smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_eq, b eql_v3.query_smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_eq. +--! @param a eql_v3.query_smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_smallint_eq, b public.smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_eq. +--! @param a public.smallint_eq +--! @param b eql_v3.query_smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_eq, b eql_v3.query_smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_eq. +--! @param a eql_v3.query_smallint_eq +--! @param b public.smallint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_smallint_eq, b public.smallint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_ord_functions.sql +--! @brief Functions for eql_v3.query_smallint_ord. + +--! @brief Index extractor for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_smallint_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a public.smallint_ord +--! @param b eql_v3.query_smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord, b eql_v3.query_smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a public.smallint_ord +--! @param b eql_v3.query_smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord, b eql_v3.query_smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a public.smallint_ord +--! @param b eql_v3.query_smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord, b eql_v3.query_smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a public.smallint_ord +--! @param b eql_v3.query_smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord, b eql_v3.query_smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a public.smallint_ord +--! @param b eql_v3.query_smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord, b eql_v3.query_smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a public.smallint_ord +--! @param b eql_v3.query_smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord, b eql_v3.query_smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord. +--! @param a eql_v3.query_smallint_ord +--! @param b public.smallint_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_smallint_ord, b public.smallint_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_functions.sql +--! @brief Functions for public.smallint. + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.smallint, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.smallint) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param selector text +--! @return public.smallint +CREATE FUNCTION eql_v3_internal."->"(a public.smallint, selector text) +RETURNS public.smallint IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param selector integer +--! @return public.smallint +CREATE FUNCTION eql_v3_internal."->"(a public.smallint, selector integer) +RETURNS public.smallint IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param selector public.smallint +--! @return public.smallint +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.smallint) +RETURNS public.smallint IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.smallint, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param selector public.smallint +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.smallint) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.smallint, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.smallint, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.smallint, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.smallint, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.smallint, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.smallint, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.smallint, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.smallint, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.smallint, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b public.smallint +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint, b public.smallint) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a public.smallint +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.smallint, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.smallint. +--! @param a jsonb +--! @param b public.smallint +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.smallint) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.smallint'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_ope_operators.sql +--! @brief Operators for public.smallint_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.smallint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_ord_ope, RIGHTARG = public.smallint_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_functions.sql +--! @brief Functions for public.date_ord. + +--! @brief Index extractor for public.date_ord. +--! @param a public.date_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.date_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.date_ord) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.date_ord) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.date_ord) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.date_ord) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.date_ord) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.date_ord) $$; + +--! @brief Operator wrapper for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_ord, b public.date_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.date_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_ord, b public.date_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.date_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param selector text +--! @return public.date_ord +CREATE FUNCTION eql_v3_internal."->"(a public.date_ord, selector text) +RETURNS public.date_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param selector integer +--! @return public.date_ord +CREATE FUNCTION eql_v3_internal."->"(a public.date_ord, selector integer) +RETURNS public.date_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a jsonb +--! @param selector public.date_ord +--! @return public.date_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.date_ord) +RETURNS public.date_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a jsonb +--! @param selector public.date_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.date_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.date_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.date_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.date_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.date_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.date_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.date_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.date_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.date_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b public.date_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_ord, b public.date_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a public.date_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord. +--! @param a jsonb +--! @param b public.date_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.date_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/date/query_date_types.sql +--! @brief Query-operand domains for date (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_date_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_date_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_date_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_date_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_date_eq IS 'EQL date query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_date_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_date_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_date_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_date_ord_ore IS 'EQL date query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_date_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_date_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_date_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_date_ord IS 'EQL date query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_date_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_date_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_date_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_date_ord_ope IS 'EQL date query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_ord_functions.sql +--! @brief Functions for eql_v3.query_date_ord. + +--! @brief Index extractor for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_date_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a public.date_ord +--! @param b eql_v3.query_date_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord, b eql_v3.query_date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a public.date_ord +--! @param b eql_v3.query_date_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord, b eql_v3.query_date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a public.date_ord +--! @param b eql_v3.query_date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord, b eql_v3.query_date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a public.date_ord +--! @param b eql_v3.query_date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord, b eql_v3.query_date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a public.date_ord +--! @param b eql_v3.query_date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord, b eql_v3.query_date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a public.date_ord +--! @param b eql_v3.query_date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord, b eql_v3.query_date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord. +--! @param a eql_v3.query_date_ord +--! @param b public.date_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_date_ord, b public.date_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_ore_functions.sql +--! @brief Functions for public.date_ord_ore. + +--! @brief Index extractor for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.date_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.date_ord_ore) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.date_ord_ore) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.date_ord_ore) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.date_ord_ore) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.date_ord_ore) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.date_ord_ore) $$; + +--! @brief Operator wrapper for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.date_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.date_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_ord_ore, b public.date_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.date_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param selector text +--! @return public.date_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.date_ord_ore, selector text) +RETURNS public.date_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param selector integer +--! @return public.date_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.date_ord_ore, selector integer) +RETURNS public.date_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a jsonb +--! @param selector public.date_ord_ore +--! @return public.date_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.date_ord_ore) +RETURNS public.date_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a jsonb +--! @param selector public.date_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.date_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.date_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.date_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.date_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.date_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.date_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.date_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.date_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.date_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b public.date_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_ord_ore, b public.date_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a public.date_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ore. +--! @param a jsonb +--! @param b public.date_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.date_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_ope_functions.sql +--! @brief Functions for public.date_ord_ope. + +--! @brief Index extractor for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.date_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.date_ord_ope) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.date_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.date_ord_ope) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.date_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.date_ord_ope) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.date_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.date_ord_ope) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.date_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.date_ord_ope) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.date_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.date_ord_ope) $$; + +--! @brief Operator wrapper for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.date_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.date_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_ord_ope, b public.date_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.date_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param selector text +--! @return public.date_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.date_ord_ope, selector text) +RETURNS public.date_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param selector integer +--! @return public.date_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.date_ord_ope, selector integer) +RETURNS public.date_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a jsonb +--! @param selector public.date_ord_ope +--! @return public.date_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.date_ord_ope) +RETURNS public.date_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a jsonb +--! @param selector public.date_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.date_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.date_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.date_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.date_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.date_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.date_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.date_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.date_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.date_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b public.date_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_ord_ope, b public.date_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a public.date_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_ord_ope. +--! @param a jsonb +--! @param b public.date_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.date_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_eq_functions.sql +--! @brief Functions for public.date_eq. + +--! @brief Index extractor for public.date_eq. +--! @param a public.date_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.date_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_eq, b public.date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.date_eq) $$; + +--! @brief Operator wrapper for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.date_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_eq, b public.date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.date_eq) $$; + +--! @brief Operator wrapper for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.date_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.date_eq, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.date_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.date_eq, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.date_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.date_eq, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.date_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.date_eq, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.date_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_eq, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_eq, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.date_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param selector text +--! @return public.date_eq +CREATE FUNCTION eql_v3_internal."->"(a public.date_eq, selector text) +RETURNS public.date_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param selector integer +--! @return public.date_eq +CREATE FUNCTION eql_v3_internal."->"(a public.date_eq, selector integer) +RETURNS public.date_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param selector public.date_eq +--! @return public.date_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.date_eq) +RETURNS public.date_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param selector public.date_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.date_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.date_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.date_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.date_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.date_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.date_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.date_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.date_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.date_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b public.date_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_eq, b public.date_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a public.date_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date_eq. +--! @param a jsonb +--! @param b public.date_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.date_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_functions.sql +--! @brief Functions for public.date. + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.date, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.date) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param selector text +--! @return public.date +CREATE FUNCTION eql_v3_internal."->"(a public.date, selector text) +RETURNS public.date IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param selector integer +--! @return public.date +CREATE FUNCTION eql_v3_internal."->"(a public.date, selector integer) +RETURNS public.date IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param selector public.date +--! @return public.date +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.date) +RETURNS public.date IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.date, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param selector public.date +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.date) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.date, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.date, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.date, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.date, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.date, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.date, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.date, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.date, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.date, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b public.date +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date, b public.date) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a public.date +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.date, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.date. +--! @param a jsonb +--! @param b public.date +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.date) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.date'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_ore_operators.sql +--! @brief Operators for public.date_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.date_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.date_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.date_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.date_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.date_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.date_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.date_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.date_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_ord_ore, RIGHTARG = public.date_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.date_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_ope_operators.sql +--! @brief Operators for public.date_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.date_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.date_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.date_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.date_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.date_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.date_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.date_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.date_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_ord_ope, RIGHTARG = public.date_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.date_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/numeric/query_numeric_types.sql +--! @brief Query-operand domains for numeric (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_numeric_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_numeric_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_numeric_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_numeric_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_numeric_eq IS 'EQL numeric query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_numeric_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_numeric_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_numeric_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_numeric_ord_ore IS 'EQL numeric query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_numeric_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_numeric_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_numeric_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_numeric_ord IS 'EQL numeric query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_numeric_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_numeric_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_numeric_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_numeric_ord_ope IS 'EQL numeric query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_eq_functions.sql +--! @brief Functions for public.numeric_eq. + +--! @brief Index extractor for public.numeric_eq. +--! @param a public.numeric_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.numeric_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.numeric_eq) $$; + +--! @brief Operator wrapper for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.numeric_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.numeric_eq) $$; + +--! @brief Operator wrapper for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.numeric_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.numeric_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.numeric_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.numeric_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.numeric_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_eq, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.numeric_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param selector text +--! @return public.numeric_eq +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_eq, selector text) +RETURNS public.numeric_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param selector integer +--! @return public.numeric_eq +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_eq, selector integer) +RETURNS public.numeric_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param selector public.numeric_eq +--! @return public.numeric_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.numeric_eq) +RETURNS public.numeric_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param selector public.numeric_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.numeric_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.numeric_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.numeric_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.numeric_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.numeric_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.numeric_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.numeric_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.numeric_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.numeric_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b public.numeric_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_eq, b public.numeric_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a public.numeric_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_eq. +--! @param a jsonb +--! @param b public.numeric_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.numeric_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_functions.sql +--! @brief Functions for public.numeric_ord. + +--! @brief Index extractor for public.numeric_ord. +--! @param a public.numeric_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.numeric_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.numeric_ord) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.numeric_ord) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.numeric_ord) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.numeric_ord) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.numeric_ord) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.numeric_ord) $$; + +--! @brief Operator wrapper for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.numeric_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_ord, b public.numeric_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.numeric_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param selector text +--! @return public.numeric_ord +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_ord, selector text) +RETURNS public.numeric_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param selector integer +--! @return public.numeric_ord +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_ord, selector integer) +RETURNS public.numeric_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a jsonb +--! @param selector public.numeric_ord +--! @return public.numeric_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.numeric_ord) +RETURNS public.numeric_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a jsonb +--! @param selector public.numeric_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.numeric_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.numeric_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.numeric_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.numeric_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.numeric_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.numeric_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.numeric_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.numeric_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.numeric_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b public.numeric_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_ord, b public.numeric_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a public.numeric_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord. +--! @param a jsonb +--! @param b public.numeric_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.numeric_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_ord_functions.sql +--! @brief Functions for eql_v3.query_numeric_ord. + +--! @brief Index extractor for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_numeric_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a public.numeric_ord +--! @param b eql_v3.query_numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord, b eql_v3.query_numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a public.numeric_ord +--! @param b eql_v3.query_numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord, b eql_v3.query_numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a public.numeric_ord +--! @param b eql_v3.query_numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord, b eql_v3.query_numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a public.numeric_ord +--! @param b eql_v3.query_numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord, b eql_v3.query_numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a public.numeric_ord +--! @param b eql_v3.query_numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord, b eql_v3.query_numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a public.numeric_ord +--! @param b eql_v3.query_numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord, b eql_v3.query_numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord. +--! @param a eql_v3.query_numeric_ord +--! @param b public.numeric_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_numeric_ord, b public.numeric_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_ore_functions.sql +--! @brief Functions for public.numeric_ord_ore. + +--! @brief Index extractor for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.numeric_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.numeric_ord_ore) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.numeric_ord_ore) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.numeric_ord_ore) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.numeric_ord_ore) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.numeric_ord_ore) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.numeric_ord_ore) $$; + +--! @brief Operator wrapper for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.numeric_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.numeric_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.numeric_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param selector text +--! @return public.numeric_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_ord_ore, selector text) +RETURNS public.numeric_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param selector integer +--! @return public.numeric_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_ord_ore, selector integer) +RETURNS public.numeric_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a jsonb +--! @param selector public.numeric_ord_ore +--! @return public.numeric_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.numeric_ord_ore) +RETURNS public.numeric_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a jsonb +--! @param selector public.numeric_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.numeric_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.numeric_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.numeric_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.numeric_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.numeric_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.numeric_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.numeric_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.numeric_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.numeric_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_ord_ore, b public.numeric_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ore. +--! @param a jsonb +--! @param b public.numeric_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.numeric_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_numeric_ord_ore. + +--! @brief Index extractor for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_numeric_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b eql_v3.query_numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord_ore, b eql_v3.query_numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b eql_v3.query_numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord_ore, b eql_v3.query_numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b eql_v3.query_numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord_ore, b eql_v3.query_numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b eql_v3.query_numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord_ore, b eql_v3.query_numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b eql_v3.query_numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord_ore, b eql_v3.query_numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a public.numeric_ord_ore +--! @param b eql_v3.query_numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord_ore, b eql_v3.query_numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ore. +--! @param a eql_v3.query_numeric_ord_ore +--! @param b public.numeric_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_numeric_ord_ore, b public.numeric_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_ope_functions.sql +--! @brief Functions for public.numeric_ord_ope. + +--! @brief Index extractor for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.numeric_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.numeric_ord_ope) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.numeric_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.numeric_ord_ope) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.numeric_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.numeric_ord_ope) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.numeric_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.numeric_ord_ope) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.numeric_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.numeric_ord_ope) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.numeric_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.numeric_ord_ope) $$; + +--! @brief Operator wrapper for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.numeric_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.numeric_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.numeric_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param selector text +--! @return public.numeric_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_ord_ope, selector text) +RETURNS public.numeric_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param selector integer +--! @return public.numeric_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.numeric_ord_ope, selector integer) +RETURNS public.numeric_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a jsonb +--! @param selector public.numeric_ord_ope +--! @return public.numeric_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.numeric_ord_ope) +RETURNS public.numeric_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a jsonb +--! @param selector public.numeric_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.numeric_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.numeric_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.numeric_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.numeric_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.numeric_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.numeric_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.numeric_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.numeric_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.numeric_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_ord_ope, b public.numeric_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric_ord_ope. +--! @param a jsonb +--! @param b public.numeric_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.numeric_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_numeric_ord_ope. + +--! @brief Index extractor for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_numeric_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b eql_v3.query_numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_ord_ope, b eql_v3.query_numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b eql_v3.query_numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_ord_ope, b eql_v3.query_numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b eql_v3.query_numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.numeric_ord_ope, b eql_v3.query_numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b eql_v3.query_numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.numeric_ord_ope, b eql_v3.query_numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b eql_v3.query_numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.numeric_ord_ope, b eql_v3.query_numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a public.numeric_ord_ope +--! @param b eql_v3.query_numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.numeric_ord_ope, b eql_v3.query_numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_ord_ope. +--! @param a eql_v3.query_numeric_ord_ope +--! @param b public.numeric_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_numeric_ord_ope, b public.numeric_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_ore_operators.sql +--! @brief Operators for public.numeric_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.numeric_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_ord_ore, RIGHTARG = public.numeric_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_ope_operators.sql +--! @brief Operators for public.numeric_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.numeric_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_ord_ope, RIGHTARG = public.numeric_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/double/query_double_types.sql +--! @brief Query-operand domains for double (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_double_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_double_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_double_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_double_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_double_eq IS 'EQL double query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_double_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_double_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_double_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_double_ord_ore IS 'EQL double query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_double_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_double_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_double_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_double_ord IS 'EQL double query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_double_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_double_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_double_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_double_ord_ope IS 'EQL double query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_functions.sql +--! @brief Functions for public.double_ord. + +--! @brief Index extractor for public.double_ord. +--! @param a public.double_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.double_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.double_ord) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.double_ord) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.double_ord) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.double_ord) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.double_ord) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.double_ord) $$; + +--! @brief Operator wrapper for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_ord, b public.double_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.double_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_ord, b public.double_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.double_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param selector text +--! @return public.double_ord +CREATE FUNCTION eql_v3_internal."->"(a public.double_ord, selector text) +RETURNS public.double_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param selector integer +--! @return public.double_ord +CREATE FUNCTION eql_v3_internal."->"(a public.double_ord, selector integer) +RETURNS public.double_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a jsonb +--! @param selector public.double_ord +--! @return public.double_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.double_ord) +RETURNS public.double_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a jsonb +--! @param selector public.double_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.double_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.double_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.double_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.double_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.double_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.double_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.double_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.double_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.double_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b public.double_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_ord, b public.double_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a public.double_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord. +--! @param a jsonb +--! @param b public.double_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.double_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_ore_functions.sql +--! @brief Functions for public.double_ord_ore. + +--! @brief Index extractor for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.double_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.double_ord_ore) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.double_ord_ore) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.double_ord_ore) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.double_ord_ore) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.double_ord_ore) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.double_ord_ore) $$; + +--! @brief Operator wrapper for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.double_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.double_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_ord_ore, b public.double_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.double_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param selector text +--! @return public.double_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.double_ord_ore, selector text) +RETURNS public.double_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param selector integer +--! @return public.double_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.double_ord_ore, selector integer) +RETURNS public.double_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a jsonb +--! @param selector public.double_ord_ore +--! @return public.double_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.double_ord_ore) +RETURNS public.double_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a jsonb +--! @param selector public.double_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.double_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.double_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.double_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.double_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.double_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.double_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.double_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.double_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.double_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b public.double_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_ord_ore, b public.double_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a public.double_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ore. +--! @param a jsonb +--! @param b public.double_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.double_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_ope_functions.sql +--! @brief Functions for public.double_ord_ope. + +--! @brief Index extractor for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.double_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.double_ord_ope) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.double_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.double_ord_ope) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.double_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.double_ord_ope) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.double_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.double_ord_ope) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.double_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.double_ord_ope) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.double_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.double_ord_ope) $$; + +--! @brief Operator wrapper for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.double_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.double_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_ord_ope, b public.double_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.double_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param selector text +--! @return public.double_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.double_ord_ope, selector text) +RETURNS public.double_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param selector integer +--! @return public.double_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.double_ord_ope, selector integer) +RETURNS public.double_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a jsonb +--! @param selector public.double_ord_ope +--! @return public.double_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.double_ord_ope) +RETURNS public.double_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a jsonb +--! @param selector public.double_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.double_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.double_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.double_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.double_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.double_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.double_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.double_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.double_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.double_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b public.double_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_ord_ope, b public.double_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a public.double_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double_ord_ope. +--! @param a jsonb +--! @param b public.double_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.double_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_operators.sql +--! @brief Operators for public.double_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.double_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.double_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.double_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.double_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.double_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.double_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.double_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_ord, RIGHTARG = public.double_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.double_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.double_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.double_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.double_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.double_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.double_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.double_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.double_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.double_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.double_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.double_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_ord, RIGHTARG = public.double_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.double_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_ope_operators.sql +--! @brief Operators for public.double_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.double_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.double_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.double_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.double_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.double_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.double_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.double_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.double_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_ord_ope, RIGHTARG = public.double_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.double_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_functions.sql +--! @brief Functions for public.double. + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.double, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.double) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param selector text +--! @return public.double +CREATE FUNCTION eql_v3_internal."->"(a public.double, selector text) +RETURNS public.double IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param selector integer +--! @return public.double +CREATE FUNCTION eql_v3_internal."->"(a public.double, selector integer) +RETURNS public.double IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param selector public.double +--! @return public.double +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.double) +RETURNS public.double IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.double, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param selector public.double +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.double) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.double, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.double, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.double, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.double, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.double, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.double, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.double, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.double, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.double, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b public.double +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double, b public.double) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a public.double +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.double, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.double. +--! @param a jsonb +--! @param b public.double +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.double) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.double'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_eq_functions.sql +--! @brief Functions for eql_v3.query_double_eq. + +--! @brief Index extractor for eql_v3.query_double_eq. +--! @param a eql_v3.query_double_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_double_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_double_eq. +--! @param a public.double_eq +--! @param b eql_v3.query_double_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_eq, b eql_v3.query_double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_eq. +--! @param a eql_v3.query_double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_double_eq, b public.double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_eq. +--! @param a public.double_eq +--! @param b eql_v3.query_double_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_eq, b eql_v3.query_double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_eq. +--! @param a eql_v3.query_double_eq +--! @param b public.double_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_double_eq, b public.double_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_ore_operators.sql +--! @brief Operators for public.double_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.double_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.double_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.double_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.double_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.double_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.double_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.double_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.double_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_ord_ore, RIGHTARG = public.double_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.double_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_eq_functions.sql +--! @brief Functions for public.integer_eq. + +--! @brief Index extractor for public.integer_eq. +--! @param a public.integer_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.integer_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_eq, b public.integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.integer_eq) $$; + +--! @brief Operator wrapper for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.integer_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_eq, b public.integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.integer_eq) $$; + +--! @brief Operator wrapper for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.integer_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.integer_eq, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.integer_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.integer_eq, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.integer_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.integer_eq, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.integer_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.integer_eq, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.integer_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_eq, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_eq, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.integer_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param selector text +--! @return public.integer_eq +CREATE FUNCTION eql_v3_internal."->"(a public.integer_eq, selector text) +RETURNS public.integer_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param selector integer +--! @return public.integer_eq +CREATE FUNCTION eql_v3_internal."->"(a public.integer_eq, selector integer) +RETURNS public.integer_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param selector public.integer_eq +--! @return public.integer_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.integer_eq) +RETURNS public.integer_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param selector public.integer_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.integer_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.integer_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.integer_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.integer_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.integer_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.integer_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.integer_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.integer_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.integer_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b public.integer_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_eq, b public.integer_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a public.integer_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_eq. +--! @param a jsonb +--! @param b public.integer_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.integer_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_functions.sql +--! @brief Functions for public.integer_ord. + +--! @brief Index extractor for public.integer_ord. +--! @param a public.integer_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.integer_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.integer_ord) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.integer_ord) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.integer_ord) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.integer_ord) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.integer_ord) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.integer_ord) $$; + +--! @brief Operator wrapper for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_ord, b public.integer_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.integer_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_ord, b public.integer_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.integer_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param selector text +--! @return public.integer_ord +CREATE FUNCTION eql_v3_internal."->"(a public.integer_ord, selector text) +RETURNS public.integer_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param selector integer +--! @return public.integer_ord +CREATE FUNCTION eql_v3_internal."->"(a public.integer_ord, selector integer) +RETURNS public.integer_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a jsonb +--! @param selector public.integer_ord +--! @return public.integer_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.integer_ord) +RETURNS public.integer_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a jsonb +--! @param selector public.integer_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.integer_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.integer_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.integer_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.integer_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.integer_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.integer_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.integer_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.integer_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.integer_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b public.integer_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_ord, b public.integer_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a public.integer_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord. +--! @param a jsonb +--! @param b public.integer_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.integer_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_operators.sql +--! @brief Operators for public.integer_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.integer_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.integer_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.integer_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.integer_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.integer_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.integer_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.integer_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.integer_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.integer_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.integer_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.integer_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.integer_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.integer_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.integer_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_ord, RIGHTARG = public.integer_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.integer_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_ore_functions.sql +--! @brief Functions for public.integer_ord_ore. + +--! @brief Index extractor for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.integer_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.integer_ord_ore) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.integer_ord_ore) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.integer_ord_ore) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.integer_ord_ore) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.integer_ord_ore) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.integer_ord_ore) $$; + +--! @brief Operator wrapper for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.integer_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.integer_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.integer_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param selector text +--! @return public.integer_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.integer_ord_ore, selector text) +RETURNS public.integer_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param selector integer +--! @return public.integer_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.integer_ord_ore, selector integer) +RETURNS public.integer_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a jsonb +--! @param selector public.integer_ord_ore +--! @return public.integer_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.integer_ord_ore) +RETURNS public.integer_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a jsonb +--! @param selector public.integer_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.integer_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.integer_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.integer_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.integer_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.integer_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.integer_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.integer_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.integer_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.integer_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b public.integer_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_ord_ore, b public.integer_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ore. +--! @param a jsonb +--! @param b public.integer_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.integer_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_ore_operators.sql +--! @brief Operators for public.integer_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.integer_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.integer_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.integer_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.integer_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.integer_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.integer_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_ord_ore, RIGHTARG = public.integer_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/integer/query_integer_types.sql +--! @brief Query-operand domains for integer (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_integer_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_integer_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_integer_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_integer_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_integer_eq IS 'EQL integer query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_integer_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_integer_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_integer_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_integer_ord_ore IS 'EQL integer query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_integer_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_integer_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_integer_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_integer_ord IS 'EQL integer query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_integer_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_integer_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_integer_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_integer_ord_ope IS 'EQL integer query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_ope_functions.sql +--! @brief Functions for public.integer_ord_ope. + +--! @brief Index extractor for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.integer_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.integer_ord_ope) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.integer_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.integer_ord_ope) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.integer_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.integer_ord_ope) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.integer_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.integer_ord_ope) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.integer_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.integer_ord_ope) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.integer_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.integer_ord_ope) $$; + +--! @brief Operator wrapper for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.integer_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.integer_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.integer_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param selector text +--! @return public.integer_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.integer_ord_ope, selector text) +RETURNS public.integer_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param selector integer +--! @return public.integer_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.integer_ord_ope, selector integer) +RETURNS public.integer_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a jsonb +--! @param selector public.integer_ord_ope +--! @return public.integer_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.integer_ord_ope) +RETURNS public.integer_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a jsonb +--! @param selector public.integer_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.integer_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.integer_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.integer_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.integer_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.integer_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.integer_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.integer_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.integer_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.integer_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b public.integer_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_ord_ope, b public.integer_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer_ord_ope. +--! @param a jsonb +--! @param b public.integer_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.integer_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_functions.sql +--! @brief Functions for public.integer. + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.integer, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.integer) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param selector text +--! @return public.integer +CREATE FUNCTION eql_v3_internal."->"(a public.integer, selector text) +RETURNS public.integer IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param selector integer +--! @return public.integer +CREATE FUNCTION eql_v3_internal."->"(a public.integer, selector integer) +RETURNS public.integer IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param selector public.integer +--! @return public.integer +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.integer) +RETURNS public.integer IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.integer, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param selector public.integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.integer, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.integer, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.integer, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.integer, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.integer, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.integer, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.integer, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.integer, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.integer, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b public.integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer, b public.integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a public.integer +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.integer, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.integer. +--! @param a jsonb +--! @param b public.integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.integer'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_eq_functions.sql +--! @brief Functions for eql_v3.query_integer_eq. + +--! @brief Index extractor for eql_v3.query_integer_eq. +--! @param a eql_v3.query_integer_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_integer_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_eq. +--! @param a public.integer_eq +--! @param b eql_v3.query_integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_eq, b eql_v3.query_integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_eq. +--! @param a eql_v3.query_integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_integer_eq, b public.integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_eq. +--! @param a public.integer_eq +--! @param b eql_v3.query_integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_eq, b eql_v3.query_integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_eq. +--! @param a eql_v3.query_integer_eq +--! @param b public.integer_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_integer_eq, b public.integer_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @file v3/sem/ore_block_256/operator_class.sql +--! @brief B-tree operator family + default class on eql_v3_internal.ore_block_256. +--! +--! Gives the composite type its DEFAULT btree opclass so the recommended +--! functional index `CREATE INDEX ON t (eql_v3_internal.ord_term(col))` engages without +--! an explicit opclass annotation (design D4). +--! +--! @note Creating an operator family/class requires superuser: Postgres forbids +--! CREATE OPERATOR FAMILY / CLASS to non-superusers to protect index +--! integrity. Managed platforms (Supabase, and most hosted Postgres) run +--! the installer as a non-superuser role, so the DO block below ATTEMPTS +--! the creation and skips it on insufficient_privilege (SQLSTATE 42501), +--! letting the single installer run everywhere. When the class is absent, +--! ORE ordered scans over eql_v3_internal.ore_block_256 are unavailable, +--! but the order-preserving (OPE) ordering domains — whose extractor +--! return types carry a native btree opclass — still index without it. On +--! superuser installs (self-managed Postgres, the SQLx test matrix) the +--! class is created normally. Any non-privilege error still propagates. +--! @see eql_v3_internal.compare_ore_block_256_terms + +DO $do$ +BEGIN + EXECUTE 'CREATE OPERATOR FAMILY eql_v3_internal.ore_block_256_operator_family USING btree'; + + EXECUTE $ddl$ + CREATE OPERATOR CLASS eql_v3_internal.ore_block_256_operator_class + DEFAULT FOR TYPE eql_v3_internal.ore_block_256 + USING btree FAMILY eql_v3_internal.ore_block_256_operator_family AS + OPERATOR 1 public.<, + OPERATOR 2 public.<=, + OPERATOR 3 public.=, + OPERATOR 4 public.>=, + OPERATOR 5 public.>, + FUNCTION 1 eql_v3_internal.compare_ore_block_256_terms(a eql_v3_internal.ore_block_256, b eql_v3_internal.ore_block_256) + $ddl$; + + RAISE NOTICE 'EQL: created btree operator class eql_v3_internal.ore_block_256_operator_class'; +EXCEPTION + WHEN insufficient_privilege THEN + RAISE NOTICE 'EQL: skipped operator class eql_v3_internal.ore_block_256_operator_class (requires superuser); ORE ordered indexes on ore_block_256 unavailable, OPE ordering domains unaffected'; +END; +$do$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/timestamp/query_timestamp_types.sql +--! @brief Query-operand domains for timestamp (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_timestamp_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_timestamp_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_timestamp_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_timestamp_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_timestamp_eq IS 'EQL timestamp query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_timestamp_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_timestamp_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_timestamp_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_timestamp_ord_ore IS 'EQL timestamp query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_timestamp_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_timestamp_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_timestamp_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_timestamp_ord IS 'EQL timestamp query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_timestamp_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_timestamp_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_timestamp_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_timestamp_ord_ope IS 'EQL timestamp query operand (equality, ordering)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/text/query_text_types.sql +--! @brief Query-operand domains for text (index-terms-only, no ciphertext). +--! @note Query-operand domains live in `eql_v3` (not `public`): they are +--! never valid column types, so they don't belong in the column-type +--! namespace, and dropping the EQL-owned schema can never drop an +--! application column. +--! @note Cast a query operand explicitly to its `query_` domain in a predicate +--! (e.g. `WHERE col = $1::eql_v3.query_text_eq`). A bare, +--! uncast literal RHS is ambiguous between the `query_` and `jsonb` +--! operator overloads and will not resolve. + +DO $$ +BEGIN + --! @brief Query-operand domain eql_v3.query_text_eq (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_text_eq' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_text_eq AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_text_eq IS 'EQL text query operand (equality)'; + + --! @brief Query-operand domain eql_v3.query_text_match (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_text_match' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_text_match AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'bf' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_text_match IS 'EQL text query operand (containment)'; + + --! @brief Query-operand domain eql_v3.query_text_ord_ore (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_text_ord_ore' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_text_ord_ore AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_text_ord_ore IS 'EQL text query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_text_ord (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_text_ord' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_text_ord AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND VALUE ? 'ob' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_text_ord IS 'EQL text query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_text_ord_ope (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_text_ord_ope' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_text_ord_ope AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND VALUE ? 'op' + AND NOT (VALUE ? 'c') + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_text_ord_ope IS 'EQL text query operand (equality, ordering)'; + + --! @brief Query-operand domain eql_v3.query_text_search (term-only; no `c`). + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_text_search' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_text_search AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'hm' + AND VALUE ? 'ob' + AND VALUE ? 'bf' + AND NOT (VALUE ? 'c') + AND jsonb_typeof(VALUE -> 'ob') = 'array' + AND jsonb_array_length(VALUE -> 'ob') > 0 + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_text_search IS 'EQL text query operand (equality, ordering, containment)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_match_functions.sql +--! @brief Functions for public.text_match. + +--! @brief Index extractor for public.text_match. +--! @param a public.text_match +--! @return eql_v3_internal.bloom_filter +CREATE FUNCTION eql_v3.match_term(a public.text_match) +RETURNS eql_v3_internal.bloom_filter +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.bloom_filter(a::jsonb) $$; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.text_match, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.text_match, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.text_match, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.text_match, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.text_match, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.text_match, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.text_match, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.text_match, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.text_match, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.text_match, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.text_match, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.text_match, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.text_match) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Operator wrapper for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3.contains(a public.text_match, b public.text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.contains(a public.text_match, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b::public.text_match) $$; + +--! @brief Operator wrapper for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3.contains(a jsonb, b public.text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a::public.text_match) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a public.text_match, b public.text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a public.text_match, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b::public.text_match) $$; + +--! @brief Operator wrapper for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a jsonb, b public.text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a::public.text_match) <@ eql_v3.match_term(b) $$; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param selector text +--! @return public.text_match +CREATE FUNCTION eql_v3_internal."->"(a public.text_match, selector text) +RETURNS public.text_match IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param selector integer +--! @return public.text_match +CREATE FUNCTION eql_v3_internal."->"(a public.text_match, selector integer) +RETURNS public.text_match IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param selector public.text_match +--! @return public.text_match +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text_match) +RETURNS public.text_match IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_match, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_match, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param selector public.text_match +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text_match) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text_match, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text_match, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text_match, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text_match, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text_match, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text_match, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text_match, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_match, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_match, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_match, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text_match, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b public.text_match +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_match, b public.text_match) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a public.text_match +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_match, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_match'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_match. +--! @param a jsonb +--! @param b public.text_match +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text_match) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_match'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_ope_functions.sql +--! @brief Functions for public.text_ord_ope. + +--! @brief Index extractor for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.text_ord_ope) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.text_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.text_ord_ope) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_ord_ope) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.text_ord_ope) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_ord_ope) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.text_ord_ope) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.text_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.text_ord_ope) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.text_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.text_ord_ope) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.text_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.text_ord_ope) $$; + +--! @brief Operator wrapper for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.text_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.text_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_ord_ope, b public.text_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.text_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param selector text +--! @return public.text_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.text_ord_ope, selector text) +RETURNS public.text_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param selector integer +--! @return public.text_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.text_ord_ope, selector integer) +RETURNS public.text_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a jsonb +--! @param selector public.text_ord_ope +--! @return public.text_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text_ord_ope) +RETURNS public.text_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a jsonb +--! @param selector public.text_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b public.text_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_ord_ope, b public.text_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a public.text_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ope. +--! @param a jsonb +--! @param b public.text_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_ord_functions.sql +--! @brief Functions for eql_v3.query_text_ord. + +--! @brief Index extractor for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_text_ord) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_text_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a public.text_ord +--! @param b eql_v3.query_text_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord, b eql_v3.query_text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a public.text_ord +--! @param b eql_v3.query_text_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord, b eql_v3.query_text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a public.text_ord +--! @param b eql_v3.query_text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord, b eql_v3.query_text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a public.text_ord +--! @param b eql_v3.query_text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord, b eql_v3.query_text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a public.text_ord +--! @param b eql_v3.query_text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord, b eql_v3.query_text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a public.text_ord +--! @param b eql_v3.query_text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord, b eql_v3.query_text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord. +--! @param a eql_v3.query_text_ord +--! @param b public.text_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_text_ord, b public.text_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_ore_functions.sql +--! @brief Functions for public.text_ord_ore. + +--! @brief Index extractor for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.text_ord_ore) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.text_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.text_ord_ore) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_ord_ore) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.text_ord_ore) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_ord_ore) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.text_ord_ore) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.text_ord_ore) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.text_ord_ore) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.text_ord_ore) $$; + +--! @brief Operator wrapper for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.text_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_ord_ore, b public.text_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.text_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param selector text +--! @return public.text_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.text_ord_ore, selector text) +RETURNS public.text_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param selector integer +--! @return public.text_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.text_ord_ore, selector integer) +RETURNS public.text_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a jsonb +--! @param selector public.text_ord_ore +--! @return public.text_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text_ord_ore) +RETURNS public.text_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a jsonb +--! @param selector public.text_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b public.text_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_ord_ore, b public.text_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a public.text_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_ord_ore. +--! @param a jsonb +--! @param b public.text_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_eq_functions.sql +--! @brief Functions for public.text_eq. + +--! @brief Index extractor for public.text_eq. +--! @param a public.text_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.text_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_eq, b public.text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.text_eq) $$; + +--! @brief Operator wrapper for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_eq, b public.text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.text_eq) $$; + +--! @brief Operator wrapper for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.text_eq, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.text_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.text_eq, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.text_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.text_eq, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.text_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.text_eq, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.text_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_eq, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_eq, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.text_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param selector text +--! @return public.text_eq +CREATE FUNCTION eql_v3_internal."->"(a public.text_eq, selector text) +RETURNS public.text_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param selector integer +--! @return public.text_eq +CREATE FUNCTION eql_v3_internal."->"(a public.text_eq, selector integer) +RETURNS public.text_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param selector public.text_eq +--! @return public.text_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text_eq) +RETURNS public.text_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param selector public.text_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b public.text_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_eq, b public.text_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a public.text_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_eq. +--! @param a jsonb +--! @param b public.text_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_search_functions.sql +--! @brief Functions for public.text_search. + +--! @brief Index extractor for public.text_search. +--! @param a public.text_search +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.text_search) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for public.text_search. +--! @param a public.text_search +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.text_search) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Index extractor for public.text_search. +--! @param a public.text_search +--! @return eql_v3_internal.bloom_filter +CREATE FUNCTION eql_v3.match_term(a public.text_search) +RETURNS eql_v3_internal.bloom_filter +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.bloom_filter(a::jsonb) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_search) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.text_search) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_search) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_search) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_search) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.text_search) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.contains(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.contains(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.contains(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a::public.text_search) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a public.text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a public.text_search, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b::public.text_search) $$; + +--! @brief Operator wrapper for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a jsonb, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a::public.text_search) <@ eql_v3.match_term(b) $$; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param selector text +--! @return public.text_search +CREATE FUNCTION eql_v3_internal."->"(a public.text_search, selector text) +RETURNS public.text_search IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param selector integer +--! @return public.text_search +CREATE FUNCTION eql_v3_internal."->"(a public.text_search, selector integer) +RETURNS public.text_search IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a jsonb +--! @param selector public.text_search +--! @return public.text_search +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text_search) +RETURNS public.text_search IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_search, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text_search, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a jsonb +--! @param selector public.text_search +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text_search) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text_search, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text_search, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text_search, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text_search, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text_search, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text_search, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text_search, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_search, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_search, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text_search, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text_search, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b public.text_search +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_search, b public.text_search) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a public.text_search +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text_search, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_search'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text_search. +--! @param a jsonb +--! @param b public.text_search +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text_search) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text_search'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_ore_operators.sql +--! @brief Operators for public.text_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_ord_ore, RIGHTARG = public.text_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_operators.sql +--! @brief Operators for public.text_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.text_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.text_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.text_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.text_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.text_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.text_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.text_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_ord, RIGHTARG = public.text_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_ord, RIGHTARG = public.text_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_ore_functions.sql +--! @brief Functions for public.timestamp_ord_ore. + +--! @brief Index extractor for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.timestamp_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.timestamp_ord_ore) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord_ore) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.timestamp_ord_ore) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord_ore) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.timestamp_ord_ore) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord_ore) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.timestamp_ord_ore) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord_ore) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.timestamp_ord_ore) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord_ore) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.timestamp_ord_ore) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord_ore) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_ord_ore, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.timestamp_ord_ore) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param selector text +--! @return public.timestamp_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_ord_ore, selector text) +RETURNS public.timestamp_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param selector integer +--! @return public.timestamp_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_ord_ore, selector integer) +RETURNS public.timestamp_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a jsonb +--! @param selector public.timestamp_ord_ore +--! @return public.timestamp_ord_ore +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.timestamp_ord_ore) +RETURNS public.timestamp_ord_ore IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_ord_ore, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_ord_ore, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a jsonb +--! @param selector public.timestamp_ord_ore +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.timestamp_ord_ore) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.timestamp_ord_ore, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.timestamp_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.timestamp_ord_ore, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.timestamp_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.timestamp_ord_ore, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.timestamp_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.timestamp_ord_ore, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord_ore, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord_ore, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.timestamp_ord_ore, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_ord_ore, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ore. +--! @param a jsonb +--! @param b public.timestamp_ord_ore +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.timestamp_ord_ore) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord_ore'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_functions.sql +--! @brief Functions for public.timestamp_ord. + +--! @brief Index extractor for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a public.timestamp_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b::public.timestamp_ord) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b::public.timestamp_ord) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b::public.timestamp_ord) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b::public.timestamp_ord) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b::public.timestamp_ord) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b::public.timestamp_ord) $$; + +--! @brief Operator wrapper for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a::public.timestamp_ord) >= eql_v3.ord_term(b) $$; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.timestamp_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_ord, b public.timestamp_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_ord, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.timestamp_ord) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param selector text +--! @return public.timestamp_ord +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_ord, selector text) +RETURNS public.timestamp_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param selector integer +--! @return public.timestamp_ord +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_ord, selector integer) +RETURNS public.timestamp_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a jsonb +--! @param selector public.timestamp_ord +--! @return public.timestamp_ord +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.timestamp_ord) +RETURNS public.timestamp_ord IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_ord, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_ord, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a jsonb +--! @param selector public.timestamp_ord +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.timestamp_ord) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.timestamp_ord, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.timestamp_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.timestamp_ord, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.timestamp_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.timestamp_ord, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.timestamp_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.timestamp_ord, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.timestamp_ord, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b public.timestamp_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_ord, b public.timestamp_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a public.timestamp_ord +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_ord, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord. +--! @param a jsonb +--! @param b public.timestamp_ord +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.timestamp_ord) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_operators.sql +--! @brief Operators for public.timestamp_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.timestamp_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.timestamp_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.timestamp_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.timestamp_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.timestamp_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.timestamp_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.timestamp_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.timestamp_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_ord, RIGHTARG = public.timestamp_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_eq_functions.sql +--! @brief Functions for eql_v3.query_timestamp_eq. + +--! @brief Index extractor for eql_v3.query_timestamp_eq. +--! @param a eql_v3.query_timestamp_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_timestamp_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_eq. +--! @param a public.timestamp_eq +--! @param b eql_v3.query_timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_eq, b eql_v3.query_timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_eq. +--! @param a eql_v3.query_timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_timestamp_eq, b public.timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_eq. +--! @param a public.timestamp_eq +--! @param b eql_v3.query_timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_eq, b eql_v3.query_timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_eq. +--! @param a eql_v3.query_timestamp_eq +--! @param b public.timestamp_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_timestamp_eq, b public.timestamp_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_ope_functions.sql +--! @brief Functions for public.timestamp_ord_ope. + +--! @brief Index extractor for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.timestamp_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.timestamp_ord_ope) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.timestamp_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.timestamp_ord_ope) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.timestamp_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.timestamp_ord_ope) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.timestamp_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.timestamp_ord_ope) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.timestamp_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.timestamp_ord_ope) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.timestamp_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.timestamp_ord_ope) $$; + +--! @brief Operator wrapper for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.timestamp_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.timestamp_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param selector text +--! @return public.timestamp_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_ord_ope, selector text) +RETURNS public.timestamp_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param selector integer +--! @return public.timestamp_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp_ord_ope, selector integer) +RETURNS public.timestamp_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a jsonb +--! @param selector public.timestamp_ord_ope +--! @return public.timestamp_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.timestamp_ord_ope) +RETURNS public.timestamp_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a jsonb +--! @param selector public.timestamp_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.timestamp_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.timestamp_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.timestamp_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.timestamp_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.timestamp_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.timestamp_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.timestamp_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.timestamp_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.timestamp_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp_ord_ope. +--! @param a jsonb +--! @param b public.timestamp_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.timestamp_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_ope_operators.sql +--! @brief Operators for public.timestamp_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_ore_operators.sql +--! @brief Operators for public.timestamp_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.timestamp_ord_ore +); + +--! @file v3/jsonb/types.sql +--! @brief Domain types for the eql_v3 encrypted-JSONB (SteVec) surface. +--! +--! Three jsonb-backed domains (none over another domain — operators resolve +--! against the ultimate base type jsonb, so the native-jsonb firewall in +--! blockers.sql can attach): +--! - public.json — storage/root: an EQL envelope object ({i, v, ...}). +--! - public.jsonb_entry — a single sv element (returned by `->`). +--! - eql_v3.query_jsonb — a containment needle (sv elements, no ciphertext). + +--! @brief Validate a single SteVec entry payload. +--! @internal +--! @param val jsonb Candidate entry payload. +--! @return boolean True when `val` is an sv entry with string `s`, string `c`, +--! and exactly one string deterministic term (`hm` XOR `op`). +CREATE OR REPLACE FUNCTION public.eql_v3_is_valid_ste_vec_entry_payload(val jsonb) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT COALESCE( + jsonb_typeof(val) = 'object' + AND jsonb_typeof(val -> 's') = 'string' + AND jsonb_typeof(val -> 'c') = 'string' + AND ( + (jsonb_typeof(val -> 'hm') = 'string' AND NOT (val ? 'op')) + OR + (jsonb_typeof(val -> 'op') = 'string' AND NOT (val ? 'hm')) + ), + false + ) +$$; + +--! @brief Validate a SteVec containment query payload. +--! @internal +--! @param val jsonb Candidate query payload. +--! @return boolean True when `val` is `{"sv":[...]}` and every element carries +--! string `s`, no ciphertext, and exactly one string term (`hm` XOR +--! `op`). +--! @note plpgsql, not LANGUAGE sql (issues #353/#354): the only caller is the +--! eql_v3.query_jsonb domain CHECK, where a SQL function can never be +--! inlined (and the CHECK itself cannot absorb this body — it needs a +--! subquery over the sv elements, which CHECK constraints forbid). plpgsql +--! caches its plan across calls instead of paying the per-call SQL-function +--! executor on every needle cast. +CREATE OR REPLACE FUNCTION public.eql_v3_is_valid_ste_vec_query_payload(val jsonb) + RETURNS boolean + LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +AS $$ +BEGIN + RETURN COALESCE( + jsonb_typeof(val) = 'object' + AND jsonb_typeof(val -> 'sv') = 'array' + AND NOT EXISTS ( + SELECT 1 + FROM jsonb_array_elements( + CASE WHEN jsonb_typeof(val -> 'sv') = 'array' THEN val -> 'sv' ELSE '[]'::jsonb END + ) AS elem + WHERE NOT COALESCE(( + jsonb_typeof(elem) = 'object' + AND jsonb_typeof(elem -> 's') = 'string' + AND NOT (elem ? 'c') + AND ( + (jsonb_typeof(elem -> 'hm') = 'string' AND NOT (elem ? 'op')) + OR + (jsonb_typeof(elem -> 'op') = 'string' AND NOT (elem ? 'hm')) + ) + ), false) + ), + false + ); +END; +$$; + +--! @brief Validate a root SteVec document payload. +--! @internal +--! @param val jsonb Candidate document payload. +--! @return boolean True when `val` is an encrypted document envelope with +--! `v = 3`, `i`, an `sv` array, and valid sv entry elements. +CREATE OR REPLACE FUNCTION public.eql_v3_is_valid_ste_vec_document_payload(val jsonb) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT COALESCE( + jsonb_typeof(val) = 'object' + AND val ? 'v' + AND val ->> 'v' = '3' + AND val ? 'i' + AND jsonb_typeof(val -> 'sv') = 'array' + AND NOT EXISTS ( + SELECT 1 + FROM jsonb_array_elements( + CASE WHEN jsonb_typeof(val -> 'sv') = 'array' THEN val -> 'sv' ELSE '[]'::jsonb END + ) AS elem + WHERE NOT public.eql_v3_is_valid_ste_vec_entry_payload(elem) + ), + false + ) +$$; + +--! @brief Storage/root domain for an encrypted JSONB column. +--! +--! CHECK: a JSON object carrying the EQL envelope (`v = 3` version and `i` index +--! metadata). Root `c` is intentionally NOT required — an sv-array root payload +--! is `{i, v, sv}` with no root ciphertext. The CHECK now also requires an `sv` +--! array, so the domain accepts only SteVec **document** payloads and rejects +--! encrypted *scalar* payloads (which carry `c`/`hm`/`ob` but no `sv`) — this is +--! what keeps `public.json` a typed document domain rather than a generic +--! encrypted envelope. The firewall in blockers.sql attaches to this domain to +--! stop native jsonb operators from reaching a column value. +--! +--! @note Constructing from inline JSON uses the standard DOMAIN cast: +--! `'{"i":{},"v":3,"sv":[...]}'::public.json`. +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'json' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.json AS jsonb + CHECK ( + public.eql_v3_is_valid_ste_vec_document_payload(VALUE) + ); + END IF; + + COMMENT ON DOMAIN public.json IS 'EQL encrypted JSONB document (containment, equality, ordering)'; +END +$$; + +--! @brief Domain type for an individual sv element. +--! +--! A single element inside an `sv` array: a JSON object that carries a selector +--! (`s`), a ciphertext (`c`), and **exactly one** of `hm` (HMAC-256, for +--! hash-equality) or `op` (CLLW OPE, for ordered queries) — they are mutually +--! exclusive. This is the type returned by `->` and accepted by the per-entry +--! extractors `eql_v3.eq_term` / `eql_v3.ord_ope_term`. Extra fields (`a`, root +--! `i`/`v` merged in by `->`) are allowed. +--! +--! @see src/v3/jsonb/operators.sql +--! +--! @internal +--! Implementation note (issue #354): the CHECK is an INLINE expression, not a +--! call to `public.eql_v3_is_valid_ste_vec_entry_payload` — domain +--! constraints cannot inline SQL functions, so the function-call form paid +--! the per-call SQL-function executor (~18 µs) on EVERY cast: the needle +--! cast in every field_eq query (+19% end-to-end vs v2, the entire measured +--! regression on that scenario; see cipherstash/benches#23). The expression +--! mirrors the validator body; the leading `VALUE IS NULL OR` preserves the +--! validator's STRICT NULL-passes semantics (a bare COALESCE(..., false) +--! would reject NULL, which `->` returns for a missing selector). Keep the +--! two in sync — `jsonb_entry_check_matches_validator` in tests/sqlx pins +--! the equivalence. +--! @endinternal +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'jsonb_entry' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.jsonb_entry AS jsonb + CHECK ( + VALUE IS NULL + OR COALESCE( + jsonb_typeof(VALUE) = 'object' + AND jsonb_typeof(VALUE -> 's') = 'string' + AND jsonb_typeof(VALUE -> 'c') = 'string' + AND ( + (jsonb_typeof(VALUE -> 'hm') = 'string' AND NOT (VALUE ? 'op')) + OR + (jsonb_typeof(VALUE -> 'op') = 'string' AND NOT (VALUE ? 'hm')) + ), + false + ) + ); + END IF; + + COMMENT ON DOMAIN public.jsonb_entry IS 'EQL encrypted JSONB leaf entry (equality, ordering)'; +END +$$; + +--! @brief Domain type for an STE-vec containment needle. +--! +--! A query-shaped payload `{"sv":[...]}` whose elements carry selector + index +--! term but **never** a ciphertext (`c`). Each element must carry `s` and +--! exactly one deterministic term (`hm` XOR `op`). Typing the needle this way +--! stops selector-only needles from casting and matching every row via bare +--! `jsonb @>`. +--! +--! @note Construct from inline JSON via the DOMAIN cast: +--! `'{"sv":[{"s":"","hm":""}]}'::eql_v3.query_jsonb`. +--! @see eql_v3.to_ste_vec_query +--! +--! @internal +--! Implementation note (issue #354): this CHECK CANNOT be inlined like +--! public.jsonb_entry's — validating the sv elements requires a subquery +--! (`NOT EXISTS (SELECT ... FROM jsonb_array_elements(...))`), and CHECK +--! constraints forbid subqueries. The validator is plpgsql instead (cached +--! plan; substantially cheaper per call than a non-inlined LANGUAGE sql +--! function — the same finding as issue #353), since this cast sits on the +--! per-query hot path of every containment scenario +--! (`$1::jsonb::eql_v3.query_jsonb`). +--! @endinternal +DO $$ +BEGIN + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'query_jsonb' AND typnamespace = 'eql_v3'::regnamespace + ) THEN + CREATE DOMAIN eql_v3.query_jsonb AS jsonb + CHECK ( + public.eql_v3_is_valid_ste_vec_query_payload(VALUE) + ); + END IF; + + COMMENT ON DOMAIN eql_v3.query_jsonb IS 'EQL JSONB query operand (containment)'; +END +$$; + +--! @brief Convert a public.json to a query_jsonb needle. +--! +--! Normalises each sv element down to the matching-relevant fields: `s` plus +--! exactly one of `hm` / `op`. Other fields (`c`, `a`, `i`/`v`, anything else) +--! are stripped. This is the canonical needle shape for `@>` containment. +--! Designed for use as a functional GIN index expression: +--! `GIN (eql_v3.to_ste_vec_query(col)::jsonb jsonb_path_ops)`. +--! +--! @param e public.json Source encrypted payload +--! @return eql_v3.query_jsonb Query-shaped needle, sv elements normalised. +--! @see eql_v3.query_jsonb +CREATE FUNCTION eql_v3.to_ste_vec_query(e public.json) + RETURNS eql_v3.query_jsonb + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT jsonb_build_object( + 'sv', + coalesce( + (SELECT jsonb_agg( + jsonb_strip_nulls( + jsonb_build_object( + 's', elem -> 's', + 'hm', elem -> 'hm', + 'op', elem -> 'op' + ) + ) + ) + FROM jsonb_array_elements(e::jsonb -> 'sv') AS elem), + '[]'::jsonb + ) + )::eql_v3.query_jsonb +$$; + +CREATE CAST (public.json AS eql_v3.query_jsonb) + WITH FUNCTION eql_v3.to_ste_vec_query + AS ASSIGNMENT; + +--! @file v3/jsonb/functions.sql +--! @brief Extractors, containment engine, and path/array functions for the +--! eql_v3 encrypted-JSONB (SteVec) surface. +--! +--! `selector` parameters here are *encrypted-side* selector hashes — the +--! deterministic hash the crypto layer emits in the `s` field of each sv +--! element. Plaintext JSONPaths are never accepted at runtime. + +------------------------------------------------------------------------------ +-- Envelope helpers (eql_v3 owns these; jsonb-only) +------------------------------------------------------------------------------ + +--! @brief Extract metadata (i, v) from a raw jsonb encrypted value. +--! @param val jsonb encrypted EQL payload +--! @return jsonb Metadata object with `i` and `v` fields. +CREATE FUNCTION eql_v3.meta_data(val jsonb) + RETURNS jsonb + IMMUTABLE STRICT PARALLEL SAFE + LANGUAGE SQL +AS $$ + SELECT jsonb_build_object('i', val->'i', 'v', val->'v'); +$$; + +COMMENT ON FUNCTION eql_v3.meta_data(jsonb) IS + 'eql-inline-critical: raw-jsonb envelope helper used by v3 jsonb wrappers; must stay inlinable (unpinned search_path)'; + +--! @brief Extract ciphertext (c) from a raw jsonb encrypted value. +--! @param val jsonb encrypted EQL payload +--! @return text Base64-encoded ciphertext. +--! @throws Exception if `c` is absent. +CREATE FUNCTION eql_v3.ciphertext(val jsonb) + RETURNS text + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + IF val ? 'c' THEN + RETURN val->>'c'; + END IF; + RAISE 'Expected a ciphertext (c) value in json: %', val; + END; +$$ LANGUAGE plpgsql; + +------------------------------------------------------------------------------ +-- Selector extractors +------------------------------------------------------------------------------ + +--! @brief Extract selector (s) from a raw jsonb encrypted value. +--! @param val jsonb encrypted EQL payload +--! @return text The selector value. +--! @throws Exception if `s` is absent. +CREATE FUNCTION eql_v3.selector(val jsonb) + RETURNS text + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + IF val ? 's' THEN + RETURN val->>'s'; + END IF; + RAISE 'Expected a selector index (s) value in json: %', val; + END; +$$ LANGUAGE plpgsql; + +--! @brief Extract selector (s) from a ste_vec entry. The DOMAIN CHECK +--! guarantees `s` is present, so this is a simple field access. +--! @param entry public.jsonb_entry +--! @return text The selector value. +CREATE FUNCTION eql_v3.selector(entry public.jsonb_entry) + RETURNS text + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT entry ->> 's' +$$; + +------------------------------------------------------------------------------ +-- Equality-term extractor (XOR-aware: coalesce(hm, op)) +------------------------------------------------------------------------------ + +--! @brief XOR-aware equality term extractor for public.jsonb_entry. +--! +--! Returns the bytea of whichever deterministic term the sv entry carries — +--! `hm` (HMAC-256) or `op` (CLLW OPE). The two byte distributions are disjoint +--! by construction, so byte equality on the coalesce is unambiguous. Canonical +--! equality extractor used by `=` / `<>` on jsonb_entry. +--! +--! @param entry public.jsonb_entry +--! @return bytea Decoded `hm` or `op` bytes (NULL if entry is NULL). +CREATE FUNCTION eql_v3.eq_term(entry public.jsonb_entry) + RETURNS bytea + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT decode(coalesce(entry ->> 'hm', entry ->> 'op'), 'hex') +$$; + +------------------------------------------------------------------------------ +-- CLLW OPE per-entry overload (converged with the scalar ord_ope_term) +------------------------------------------------------------------------------ + +--! @brief Extract the CLLW OPE index term from a ste_vec entry. +--! +--! An sv-element `op` term is only ever present on an sv element, never at a +--! root encrypted value, so the typed overload accepts public.jsonb_entry — +--! the jsonb_entry twin of the generated scalar `eql_v3.ord_ope_term` +--! extractors. Returns SQL NULL when `op` is absent (the strict `->>` / +--! `decode` chain propagates it), so btree NULL-filters such rows from range +--! queries. The returned eql_v3_internal.ope_cllw is a bytea domain: it orders +--! under native byte comparison with the DEFAULT btree opclass, so a +--! functional index on `eql_v3.ord_ope_term(col -> 'selector')` engages +--! structurally with no custom operator class (Supabase/managed-Postgres +--! safe). +--! +--! @param entry public.jsonb_entry +--! @return eql_v3_internal.ope_cllw Hex-decoded CLLW OPE term, or NULL when +--! `op` is absent. +CREATE FUNCTION eql_v3.ord_ope_term(entry public.jsonb_entry) + RETURNS eql_v3_internal.ope_cllw + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3_internal.ope_cllw(entry::jsonb) +$$; + +------------------------------------------------------------------------------ +-- sv-array helpers +------------------------------------------------------------------------------ + +--! @brief Extract the sv element array as raw jsonb[]. +--! +--! Returns the elements of `sv` (or a single-element array wrapping the value +--! when there is no `sv`). No envelope re-wrapping — raw jsonb elements. +--! +--! @param val jsonb encrypted EQL payload +--! @return jsonb[] Array of sv elements. +CREATE FUNCTION eql_v3.ste_vec(val jsonb) + RETURNS jsonb[] + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + sv jsonb; + ary jsonb[]; + BEGIN + IF val ? 'sv' THEN + sv := val->'sv'; + ELSE + sv := jsonb_build_array(val); + END IF; + + SELECT array_agg(elem) + INTO ary + FROM jsonb_array_elements(sv) AS elem; + + RETURN ary; + END; +$$ LANGUAGE plpgsql; + +--! @brief Check if a jsonb payload is marked as an sv array (`a` flag true). +--! @param val jsonb encrypted EQL payload +--! @return boolean True if `a` is present and true. +CREATE FUNCTION eql_v3_internal.is_ste_vec_array(val jsonb) + RETURNS boolean + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + BEGIN + IF val ? 'a' THEN + RETURN (val->>'a')::boolean; + END IF; + RETURN false; + END; +$$ LANGUAGE plpgsql; + +------------------------------------------------------------------------------ +-- Deterministic-fields array for GIN containment +------------------------------------------------------------------------------ + +--! @brief Extract deterministic search fields (s, hm, op) per sv element. +--! +--! Excludes non-deterministic ciphertext so PostgreSQL's native jsonb `@>` can +--! compare for containment. Use for GIN indexes and containment queries. +--! +--! @param val jsonb encrypted EQL payload +--! @return jsonb[] Array of objects with only deterministic fields. +CREATE FUNCTION eql_v3.jsonb_array(val jsonb) +RETURNS jsonb[] +IMMUTABLE STRICT PARALLEL SAFE +LANGUAGE SQL +AS $$ + SELECT ARRAY( + SELECT jsonb_object_agg(kv.key, kv.value) + FROM jsonb_array_elements( + CASE WHEN val ? 'sv' THEN val->'sv' ELSE jsonb_build_array(val) END + ) AS elem, + LATERAL jsonb_each(elem) AS kv(key, value) + WHERE kv.key IN ('s', 'hm', 'op') + GROUP BY elem + ); +$$; + +COMMENT ON FUNCTION eql_v3.jsonb_array(jsonb) IS + 'eql-inline-critical: raw-jsonb deterministic-field array helper; must stay inlinable (unpinned search_path)'; + +------------------------------------------------------------------------------ +-- Containment +------------------------------------------------------------------------------ + +--! @brief GIN-indexable containment check: does `a` contain all of `b`? +--! @param a jsonb Container payload. +--! @param b jsonb Search payload. +--! @return boolean True if a contains all deterministic elements of b. +--! @note Public raw-`jsonb[]` containment helper over the extracted +--! deterministic fields — the function-form entrypoint for containment on +--! platforms without operator support (Supabase/PostgREST). The typed +--! `public.json` `@>` operator does NOT call this function — it binds to +--! `eql_v3.ste_vec_contains` instead — but both agree on the result (a +--! parity test pins this). Also the documented GIN index expression +--! (`eql_v3.jsonb_array(col)`); see docs/reference/database-indexes.md. +CREATE FUNCTION eql_v3.jsonb_contains(a jsonb, b jsonb) +RETURNS boolean +IMMUTABLE STRICT PARALLEL SAFE +LANGUAGE SQL +AS $$ + SELECT eql_v3.jsonb_array(a) @> eql_v3.jsonb_array(b); +$$; + +COMMENT ON FUNCTION eql_v3.jsonb_contains(jsonb, jsonb) IS + 'eql-inline-critical: raw-jsonb containment helper; must stay inlinable (unpinned search_path)'; + +--! @brief GIN-indexable "is contained by" check. +--! @param a jsonb Payload to check. +--! @param b jsonb Container payload. +--! @return boolean True if all elements of a are contained in b. +--! @note Public raw-`jsonb[]` reverse-containment helper — the function-form +--! entrypoint for `<@` on platforms without operator support. The typed +--! `public.json` `<@` operator binds to `eql_v3.ste_vec_contains` instead, +--! but both agree on the result. +CREATE FUNCTION eql_v3.jsonb_contained_by(a jsonb, b jsonb) +RETURNS boolean +IMMUTABLE STRICT PARALLEL SAFE +LANGUAGE SQL +AS $$ + SELECT eql_v3.jsonb_array(a) <@ eql_v3.jsonb_array(b); +$$; + +COMMENT ON FUNCTION eql_v3.jsonb_contained_by(jsonb, jsonb) IS + 'eql-inline-critical: raw-jsonb contained-by helper; must stay inlinable (unpinned search_path)'; + +--! @brief Check if an sv array contains a specific sv element. +--! +--! Match = selector equal AND eq_term equal (byte-equality over coalesce(hm, +--! op)). This collapses the v2 hm/oc CASE: under the XOR contract both terms +--! are deterministic and byte-disjoint, so either one is a valid equality +--! discriminator and a single byte comparison is correct. +--! +--! ASSUMPTION (locked by a negative test in v3_jsonb_tests.rs): hm and op byte +--! distributions never collide at a given selector. The crypto layer configures +--! a selector for eq XOR ordered, so both sides of a real comparison carry the +--! same term type — an hm needle never meets an op leaf at the same selector. +--! This collapse would wrongly match an hm needle against an op leaf if their +--! hex bytes were ever identical — which the contract prevents (an hm is a +--! fixed 32-byte HMAC; an op is a CLLW OPE ciphertext whose length is a +--! function of the plaintext bit width, never 32 bytes for the supported +--! domains). The negative-containment test guards against regression. +--! +--! @param a jsonb[] sv array to search within. +--! @param b jsonb sv element to search for. +--! @return boolean True if b is found in any element of a. +CREATE FUNCTION eql_v3.ste_vec_contains(a jsonb[], b jsonb) + RETURNS boolean + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + result boolean; + _a jsonb; + BEGIN + result := false; + + FOR idx IN 1..array_length(a, 1) LOOP + _a := a[idx]; + result := result OR ( + eql_v3.selector(_a) = eql_v3.selector(b) + AND eql_v3.eq_term(_a::public.jsonb_entry) = eql_v3.eq_term(b::public.jsonb_entry) + ); + EXIT WHEN result; + END LOOP; + + RETURN result; + END; +$$ LANGUAGE plpgsql; + +--! @brief Does encrypted value `a` contain all sv elements of `b`? +--! +--! Empty b is always contained. Each element of b must match selector + eq_term +--! in some element of a. +--! +--! @param a public.json Container. +--! @param b public.json Elements to find. +--! @return boolean True if all elements of b are contained in a. +--! @see eql_v3.ste_vec_contains(jsonb[], jsonb) +CREATE FUNCTION eql_v3.ste_vec_contains(a public.json, b public.json) + RETURNS boolean + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + result boolean; + sv_a jsonb[]; + sv_b jsonb[]; + _b jsonb; + BEGIN + sv_a := eql_v3.ste_vec(a); + sv_b := eql_v3.ste_vec(b); + + IF array_length(sv_b, 1) IS NULL THEN + RETURN true; + END IF; + + IF array_length(sv_a, 1) IS NULL THEN + RETURN false; + END IF; + + result := true; + + FOR idx IN 1..array_length(sv_b, 1) LOOP + _b := sv_b[idx]; + result := result AND eql_v3.ste_vec_contains(sv_a, _b); + END LOOP; + + RETURN result; + END; +$$ LANGUAGE plpgsql; + +------------------------------------------------------------------------------ +-- Path queries (text selector only) +------------------------------------------------------------------------------ + +--! @brief Query encrypted JSONB for sv elements matching `selector`. +--! +--! Returns one jsonb_entry row per matching encrypted element. Returns empty +--! set on no match. It deliberately does not wrap multiple matches as an +--! public.json document, because the root document domain requires an `sv` +--! array and single leaves belong to public.jsonb_entry. +--! +--! @param val jsonb encrypted EQL payload with `sv`. +--! @param selector text Selector hash (`s` value). +--! @return SETOF public.jsonb_entry Matching encrypted entries. +--! @see eql_v3.jsonb_path_query_first +CREATE FUNCTION eql_v3.jsonb_path_query(val jsonb, selector text) + RETURNS SETOF public.jsonb_entry + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT (eql_v3.meta_data(val) || elem)::public.jsonb_entry + FROM jsonb_array_elements(val -> 'sv') elem + WHERE elem ->> 's' = selector +$$; + +COMMENT ON FUNCTION eql_v3.jsonb_path_query(jsonb, text) IS + 'eql-inline-critical: raw-jsonb path query helper; must stay inlinable (unpinned search_path)'; + +--! @brief Check if a selector path exists in encrypted JSONB. +--! @param val jsonb encrypted EQL payload. +--! @param selector text Selector hash to test. +--! @return boolean True if a matching element exists. +CREATE FUNCTION eql_v3.jsonb_path_exists(val jsonb, selector text) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT EXISTS ( + SELECT 1 FROM jsonb_array_elements(val -> 'sv') elem + WHERE elem ->> 's' = selector + ); +$$; + +COMMENT ON FUNCTION eql_v3.jsonb_path_exists(jsonb, text) IS + 'eql-inline-critical: raw-jsonb path exists helper; must stay inlinable (unpinned search_path)'; + +--! @brief Get the first sv element matching `selector`, or NULL. +--! @param val jsonb encrypted EQL payload. +--! @param selector text Selector hash to match. +--! @return public.jsonb_entry First matching element or NULL. +CREATE FUNCTION eql_v3.jsonb_path_query_first(val jsonb, selector text) + RETURNS public.jsonb_entry + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT (eql_v3.meta_data(val) || elem)::public.jsonb_entry + FROM jsonb_array_elements(val -> 'sv') elem + WHERE elem ->> 's' = selector + LIMIT 1 +$$; + +COMMENT ON FUNCTION eql_v3.jsonb_path_query_first(jsonb, text) IS + 'eql-inline-critical: raw-jsonb path first helper; must stay inlinable (unpinned search_path)'; + +------------------------------------------------------------------------------ +-- Array functions +------------------------------------------------------------------------------ + +--! @brief Get the length of an encrypted JSONB array. +--! @param val jsonb encrypted EQL payload (must have `a` flag true). +--! @return integer Number of elements. +--! @throws Exception 'cannot get array length of a non-array' if not an array. +CREATE FUNCTION eql_v3.jsonb_array_length(val jsonb) + RETURNS integer + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + sv jsonb[]; + BEGIN + IF eql_v3_internal.is_ste_vec_array(val) THEN + sv := eql_v3.ste_vec(val); + RETURN array_length(sv, 1); + END IF; + + RAISE 'cannot get array length of a non-array'; + END; +$$ LANGUAGE plpgsql; + +--! @brief Extract elements of an encrypted JSONB array as rows. +--! @param val jsonb encrypted EQL payload (must have `a` flag true). +--! @return SETOF public.jsonb_entry One row per element (metadata preserved). +--! @throws Exception 'cannot extract elements from non-array' if not an array. +CREATE FUNCTION eql_v3.jsonb_array_elements(val jsonb) + RETURNS SETOF public.jsonb_entry + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + sv jsonb[]; + meta jsonb; + item jsonb; + BEGIN + IF NOT eql_v3_internal.is_ste_vec_array(val) THEN + RAISE 'cannot extract elements from non-array'; + END IF; + + meta := eql_v3.meta_data(val); + sv := eql_v3.ste_vec(val); + + FOR idx IN 1..array_length(sv, 1) LOOP + item = sv[idx]; + RETURN NEXT (meta || item)::public.jsonb_entry; + END LOOP; + + RETURN; + END; +$$ LANGUAGE plpgsql; + +--! @brief Extract elements of an encrypted JSONB array as ciphertext text. +--! @param val jsonb encrypted EQL payload (must have `a` flag true). +--! @return SETOF text One ciphertext per element. +--! @throws Exception 'cannot extract elements from non-array' if not an array. +CREATE FUNCTION eql_v3.jsonb_array_elements_text(val jsonb) + RETURNS SETOF text + IMMUTABLE STRICT PARALLEL SAFE + SET search_path = pg_catalog, extensions, public +AS $$ + DECLARE + sv jsonb[]; + BEGIN + IF NOT eql_v3_internal.is_ste_vec_array(val) THEN + RAISE 'cannot extract elements from non-array'; + END IF; + + sv := eql_v3.ste_vec(val); + + FOR idx IN 1..array_length(sv, 1) LOOP + RETURN NEXT eql_v3.ciphertext(sv[idx]); + END LOOP; + + RETURN; + END; +$$ LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE +-- Source is src/v3/version.template + +DROP FUNCTION IF EXISTS eql_v3.version(); + +--! @file v3/version.sql +--! @brief EQL version reporting (self-contained eql_v3 surface) +--! +--! This file is auto-generated from src/v3/version.template during build. +--! The 3.0.0-alpha.4 placeholder is replaced with the actual release +--! version (bare semver, e.g. "3.0.0") supplied via `mise run build --version`, +--! or "DEV" for development builds. + +--! @brief Get the installed EQL version string +--! +--! Returns the version string for the installed EQL library. This value is +--! baked in at build time from the release tag. +--! +--! @return text Version string (e.g. "3.0.0" or "DEV" for development builds) +--! +--! @note Auto-generated during build from src/v3/version.template +--! +--! Example: `SELECT eql_v3.version()` returns the installed version string, +--! e.g. `'3.0.0'` (or `'DEV'` for development builds). +CREATE FUNCTION eql_v3.version() + RETURNS text + IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT '3.0.0-alpha.4'; +$$ LANGUAGE SQL; + +--! @brief Schema-level version marker for obj_description() discoverability +--! +--! Mirrors eql_v3.version() as a comment on the schema so the installed +--! version can also be read via obj_description('eql_v3'::regnamespace). +COMMENT ON SCHEMA eql_v3 IS '3.0.0-alpha.4'; + +--! @brief EQL lint: detect non-inlinable operator implementation functions +--! +--! Returns one row per violation found in the installed `eql_v3` surface. The +--! Postgres planner can only inline a function during index matching when: +--! +--! * `LANGUAGE sql` (plpgsql / C / etc. cannot be inlined) +--! * `IMMUTABLE` or `STABLE` volatility (VOLATILE cannot be inlined into +--! index expressions) +--! * No `SET` clauses (e.g. `SET search_path = ...`) +--! * Not `SECURITY DEFINER` +--! * Single-statement SELECT body +--! +--! @note The single-statement SELECT body condition is **not yet checked** by +--! this lint. A `LANGUAGE sql` function with a multi-statement body, a CTE, +--! or any pre-SELECT statement will pass all four implemented checks while +--! remaining non-inlinable. Implementing the check requires walking `prosrc` +--! (or `pg_get_functiondef`); tracked as a follow-up. +--! +--! Operators on `eql_v3` types (the jsonb-backed encrypted-domain families and +--! the SEM index-term type `eql_v3_internal.ore_block_256`) whose +--! implementation functions fail any of these rules silently fall back to seq +--! scan when the documented functional indexes (`eql_v3.eq_term(col)`, +--! `eql_v3.ord_term(col)`) are in place. This lint surfaces every such case. +--! +--! Severity: +--! `error` — fixable, blocks index matching, ship-blocking. +--! `warning` — likely-fixable, may not block matching but signals intent. +--! `info` — observational; useful for review, not a defect on its own. +--! +--! Categories: +--! `inlinability_language` — implementation function isn't `LANGUAGE sql`. +--! `inlinability_volatility` — implementation function is VOLATILE. +--! `inlinability_set_clause` — implementation function has a `SET` clause. +--! `inlinability_secdef` — implementation function is `SECURITY DEFINER`. +--! `inlinability_transitive` — implementation function is itself inlinable +--! but its body invokes a non-inlinable function +--! (depth 1; the planner can't peek through +--! that boundary). +--! `blocker_language` — encrypted-domain blocker is not LANGUAGE +--! plpgsql. The planner can inline / elide a +--! LANGUAGE sql body when the result is +--! provably unused, silently bypassing the +--! RAISE that the blocker exists to perform. +--! `blocker_strict` — encrypted-domain blocker is STRICT. +--! PostgreSQL skips the body and returns NULL +--! on NULL arguments, silently bypassing the +--! RAISE. +--! `domain_over_domain` — an `eql_v3` encrypted domain is derived from +--! another encrypted domain rather than jsonb. +--! Operators resolve against the ultimate base +--! type, so the derived domain does not +--! inherit the base domain's blocker surface. +--! `domain_opclass` — an operator class is declared FOR TYPE on an +--! `eql_v3` encrypted domain. Opclasses on +--! domains bypass operator resolution; use a +--! functional index on the extractor instead. +--! `schema_placement` — a naked composite or enum TYPE lives in the +--! public `eql_v3` schema. Internal index-term +--! types (e.g. `ore_block_256_term`) belong in +--! `eql_v3_internal`; a composite/enum in +--! `eql_v3` clutters the Supabase Table Builder +--! type picker, which the schema split exists to +--! prevent. Move it to `eql_v3_internal`. +--! +--! @example +--! ``` +--! SELECT severity, category, object_name, message +--! FROM eql_v3.lints() +--! WHERE severity = 'error' +--! ORDER BY category, object_name; +--! ``` +--! +--! @return SETOF record (severity text, category text, object_name text, message text) +CREATE OR REPLACE FUNCTION eql_v3.lints() +RETURNS TABLE ( + severity text, + category text, + object_name text, + message text +) +LANGUAGE sql STABLE +AS $$ + WITH + -- User-column encrypted domains now live in public so application tables + -- survive EQL uninstall. Keep this separate from owned_schemas(): public is + -- not installer-owned, but its EQL jsonb-backed domains are still the domain + -- types whose blockers/operator surfaces the lint must understand. + encrypted_domain_types AS ( + SELECT + dt.oid AS typid + FROM pg_catalog.pg_type dt + JOIN pg_catalog.pg_namespace dn ON dn.oid = dt.typnamespace + JOIN pg_catalog.pg_type bt ON bt.oid = dt.typbasetype + JOIN pg_catalog.pg_namespace bn ON bn.oid = bt.typnamespace + WHERE dt.typtype = 'd' + AND bt.typname = 'jsonb' + AND bn.nspname = 'pg_catalog' + AND ( + dn.nspname = 'public' + OR dn.nspname = ANY(eql_v3_internal.owned_schemas()) + ) + ), + + -- All operators where at least one operand is an EQL-owned type or a public + -- encrypted domain. Limits the scope of the lint to the operator surface + -- customers actually hit via SQL (`col = val`, `col @> '...'` and friends). + eql_operators AS ( + SELECT + op.oid AS oprid, + op.oprname AS opname, + op.oprcode AS implfunc, + op.oprleft::regtype AS lhs, + op.oprright::regtype AS rhs, + op.oprcode::regprocedure AS impl_signature + FROM pg_operator op + WHERE EXISTS ( + SELECT 1 FROM pg_type t + WHERE t.oid IN (op.oprleft, op.oprright) + AND ( + t.typnamespace IN (SELECT oid FROM pg_namespace WHERE nspname = ANY(eql_v3_internal.owned_schemas())) + OR t.oid IN (SELECT typid FROM encrypted_domain_types) + ) + ) + ), + + -- Cross-join with each operator's implementation function metadata. + -- One row per operator; columns describe the inlinability of the impl. + op_impl AS ( + SELECT + eo.opname, + eo.lhs, + eo.rhs, + eo.implfunc AS impl_oid, + eo.impl_signature::text AS impl_signature, + lang_l.lanname AS lang, + p.provolatile AS volatility, + p.proconfig AS config, + p.prosecdef AS secdef, + p.prosrc AS body + FROM eql_operators eo + JOIN pg_proc p ON p.oid = eo.implfunc + JOIN pg_language lang_l ON lang_l.oid = p.prolang + ), + + -- Encrypted-domain blockers: functions in `eql_v3` whose body contains + -- a blocker marker emitted by the codegen (any of the + -- `encrypted_domain_unsupported_*` helper calls — `_bool` for boolean + -- blockers, `_jsonb` for the native-jsonb-operator blockers; plus the + -- literal `is not supported for` for older path-operator blockers) AND + -- that take at least one encrypted domain over jsonb argument. The argument + -- filter excludes the shared `encrypted_domain_unsupported_*(text, text)` + -- helpers themselves, which contain the marker in their body but are not + -- blockers (they take text arguments, not a domain). + encrypted_domain_blockers AS ( + SELECT + p.oid AS oid, + p.oid::regprocedure::text AS signature, + lang_l.lanname AS lang, + p.proisstrict AS isstrict + FROM pg_catalog.pg_proc p + JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace + JOIN pg_catalog.pg_language lang_l ON lang_l.oid = p.prolang + WHERE n.nspname = ANY(eql_v3_internal.owned_schemas()) + AND (p.prosrc LIKE '%encrypted_domain_unsupported%' + OR p.prosrc LIKE '%is not supported for%') + AND EXISTS ( + SELECT 1 + FROM pg_catalog.unnest(p.proargtypes::oid[]) AS arg(typ) + JOIN encrypted_domain_types edt ON edt.typid = arg.typ + ) + ) + + -- ┌─────────────────────────────────────────────────────────────────┐ + -- │ Direct inlinability checks: each row examines one operator's │ + -- │ implementation function and emits a violation if any rule is │ + -- │ broken. Multiple violations on the same function become │ + -- │ multiple rows (developers see every reason it doesn't inline). │ + -- └─────────────────────────────────────────────────────────────────┘ + + SELECT + 'error' AS severity, + 'inlinability_language' AS category, + format('operator %s(%s, %s) -> %s', + opname, lhs, rhs, impl_signature) AS object_name, + format( + 'Operator implementation function is `LANGUAGE %s`; only `LANGUAGE sql` functions can be inlined by the planner. Bare `col %s val` queries fall back to seq scan even when a matching functional index exists.', + lang, opname) AS message + FROM op_impl + WHERE lang <> 'sql' + AND NOT EXISTS ( + SELECT 1 FROM encrypted_domain_blockers b + WHERE b.oid = op_impl.impl_oid + ) + + UNION ALL + + SELECT + 'error', + 'inlinability_volatility', + format('operator %s(%s, %s) -> %s', opname, lhs, rhs, impl_signature), + format( + 'Operator implementation function is `VOLATILE`. The Postgres planner refuses to inline volatile functions into index expressions, so functional indexes never engage. Mark the function `IMMUTABLE` (or `STABLE` if it depends on session state).', + opname) + FROM op_impl + WHERE volatility = 'v' + AND NOT EXISTS ( + SELECT 1 FROM encrypted_domain_blockers b + WHERE b.oid = op_impl.impl_oid + ) + + UNION ALL + + SELECT + 'error', + 'inlinability_set_clause', + format('operator %s(%s, %s) -> %s', opname, lhs, rhs, impl_signature), + format( + 'Operator implementation function has a `SET` clause (e.g. `SET search_path = ...`). Per Postgres function-inlining rules, any `SET` clause blocks inlining. Use schema-qualified identifiers in the body and remove the `SET` clause to allow the planner to inline.') + FROM op_impl + WHERE config IS NOT NULL + AND NOT EXISTS ( + SELECT 1 FROM encrypted_domain_blockers b + WHERE b.oid = op_impl.impl_oid + ) + + UNION ALL + + SELECT + 'error', + 'inlinability_secdef', + format('operator %s(%s, %s) -> %s', opname, lhs, rhs, impl_signature), + 'Operator implementation function is `SECURITY DEFINER`. Such functions cannot be inlined; remove `SECURITY DEFINER` or use a non-inlinable wrapper layer.' + FROM op_impl + WHERE secdef + AND NOT EXISTS ( + SELECT 1 FROM encrypted_domain_blockers b + WHERE b.oid = op_impl.impl_oid + ) + + -- ┌─────────────────────────────────────────────────────────────────┐ + -- │ Transitive inlinability: an operator implementation function │ + -- │ that's itself inlinable can still fail to inline if its body │ + -- │ calls a non-inlinable function. Walk one level via pg_depend. │ + -- │ │ + -- │ Postgres records function-to-function dependencies in │ + -- │ pg_depend with deptype 'n' (normal) when one function references│ + -- │ another in its body — but only at CREATE time and only for │ + -- │ direct calls. This is good enough for v1; deeper transitive │ + -- │ analysis is a follow-up. │ + -- └─────────────────────────────────────────────────────────────────┘ + + UNION ALL + + SELECT + 'error', + 'inlinability_transitive', + format('operator %s(%s, %s) -> %s', oi.opname, oi.lhs, oi.rhs, + oi.impl_signature), + format( + 'Operator implementation function is inlinable but invokes non-inlinable function `%s` (lang=%s, volatility=%s%s). The chain blocks at depth 1: the planner inlines the outer call but cannot reduce the inner call into an index expression.', + called.proname, + called_lang.lanname, + CASE called.provolatile + WHEN 'i' THEN 'IMMUTABLE' + WHEN 's' THEN 'STABLE' + WHEN 'v' THEN 'VOLATILE' + END, + CASE WHEN called.proconfig IS NOT NULL + THEN ', has SET clause' + ELSE '' END) + FROM op_impl oi + -- Only worth the transitive check if the outer function is otherwise + -- inlinable — otherwise the direct lints above already report it. + JOIN pg_proc outer_p ON outer_p.oid = oi.impl_signature::regprocedure + JOIN pg_depend d + ON d.classid = 'pg_proc'::regclass + AND d.objid = outer_p.oid + AND d.refclassid = 'pg_proc'::regclass + AND d.deptype = 'n' + JOIN pg_proc called ON called.oid = d.refobjid + JOIN pg_language called_lang ON called_lang.oid = called.prolang + WHERE oi.lang = 'sql' + AND oi.volatility IN ('i', 's') + AND oi.config IS NULL + AND NOT oi.secdef + AND called.oid <> outer_p.oid + AND ( + called_lang.lanname <> 'sql' + OR called.provolatile = 'v' + OR called.proconfig IS NOT NULL + OR called.prosecdef + ) + + -- ┌─────────────────────────────────────────────────────────────────┐ + -- │ Encrypted-domain footguns: blockers exist to RAISE, so they │ + -- │ have inverted inlinability requirements vs operator impls. │ + -- │ A LANGUAGE sql blocker can be elided by the planner; a STRICT │ + -- │ blocker returns NULL on NULL args. Both silently re-enable │ + -- │ operators the storage variant is supposed to block. │ + -- └─────────────────────────────────────────────────────────────────┘ + + UNION ALL + + SELECT + 'error', + 'blocker_language', + format('function %s', signature), + format( + 'Encrypted-domain blocker is `LANGUAGE %s`; must be `LANGUAGE plpgsql` so the RAISE is opaque to the planner. A `LANGUAGE sql` body is inlinable and may be elided when the result is provably unused, silently re-enabling the operator.', + lang) + FROM encrypted_domain_blockers + WHERE lang <> 'plpgsql' + + UNION ALL + + SELECT + 'error', + 'blocker_strict', + format('function %s', signature), + 'Encrypted-domain blocker is `STRICT`. PostgreSQL skips the body and returns NULL on a NULL argument, silently bypassing the RAISE. Remove `STRICT`.' + FROM encrypted_domain_blockers + WHERE isstrict + + -- ┌─────────────────────────────────────────────────────────────────┐ + -- │ Domain identity: an encrypted-domain must be defined directly │ + -- │ over jsonb. Operators resolve against the ultimate base type, │ + -- │ so domain-over-domain inherits jsonb's operator surface and not │ + -- │ the base domain's blockers. │ + -- └─────────────────────────────────────────────────────────────────┘ + + UNION ALL + + SELECT + 'error', + 'domain_over_domain', + format('domain %I.%I', dn.nspname, dt.typname), + format( + 'Domain `%s.%s` is derived from another encrypted-domain `%s.%s` rather than jsonb. Operators resolve against the ultimate base type, so the derived domain does not inherit the base domain''s operator surface and storage blockers do not engage. Define this domain directly over jsonb.', + dn.nspname, dt.typname, bn.nspname, bt.typname) + FROM pg_catalog.pg_type dt + JOIN pg_catalog.pg_namespace dn ON dn.oid = dt.typnamespace + JOIN pg_catalog.pg_type bt ON bt.oid = dt.typbasetype + JOIN pg_catalog.pg_namespace bn ON bn.oid = bt.typnamespace + WHERE dt.typtype = 'd' + AND dn.nspname = ANY(eql_v3_internal.owned_schemas()) + AND bt.typtype = 'd' + AND bt.oid IN (SELECT typid FROM encrypted_domain_types) + + -- ┌─────────────────────────────────────────────────────────────────┐ + -- │ Domain opclass: an operator class declared FOR TYPE on an │ + -- │ encrypted-domain bypasses operator resolution at index time. │ + -- │ Use a functional index on the extractor instead. │ + -- └─────────────────────────────────────────────────────────────────┘ + + UNION ALL + + SELECT + 'error', + 'domain_opclass', + format('opclass %I.%I FOR TYPE %s.%s', cn.nspname, oc.opcname, tn.nspname, t.typname), + format( + 'Operator class `%s.%s` is declared FOR TYPE `%s.%s`, which is an encrypted-domain type. Opclasses on domains bypass operator resolution. Use a functional index on the extractor (e.g. `%s.eq_term(col)`, `%s.ord_term(col)`) instead.', + cn.nspname, oc.opcname, tn.nspname, t.typname, tn.nspname, tn.nspname) + FROM pg_catalog.pg_opclass oc + JOIN pg_catalog.pg_type t ON t.oid = oc.opcintype + JOIN pg_catalog.pg_namespace tn ON tn.oid = t.typnamespace + JOIN pg_catalog.pg_namespace cn ON cn.oid = oc.opcnamespace + WHERE t.oid IN (SELECT typid FROM encrypted_domain_types) + + -- ┌─────────────────────────────────────────────────────────────────┐ + -- │ Schema placement: the public `eql_v3` schema must hold only the │ + -- │ jsonb-backed encrypted-domain types. A naked composite/enum type │ + -- │ there is an internal index-term type in the wrong schema — it │ + -- │ clutters the Supabase type picker the split exists to keep clean. │ + -- └─────────────────────────────────────────────────────────────────┘ + + UNION ALL + + SELECT + 'error', + 'schema_placement', + format('type %I.%I', n.nspname, t.typname), + format( + 'Type `%s.%s` is a %s in the public `eql_v3` schema. Only jsonb-backed encrypted-domain types belong in `eql_v3`; internal index-term types belong in `eql_v3_internal` so they stay out of the Supabase Table Builder type picker. Move it to `eql_v3_internal`.', + n.nspname, t.typname, + CASE t.typtype WHEN 'c' THEN 'composite type' WHEN 'e' THEN 'enum type' ELSE 'type' END) + FROM pg_catalog.pg_type t + JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace + WHERE n.nspname = 'eql_v3' + AND t.typtype IN ('c', 'e') + + ORDER BY 1, 2, 3; +$$; + +COMMENT ON FUNCTION eql_v3.lints() IS + 'EQL lint: returns one row per non-inlinable operator implementation. ' + 'Run `SELECT * FROM eql_v3.lints() WHERE severity = ''error''` for a ' + 'CI-gateable check that all operator implementations on eql_v3 types are ' + 'eligible for planner inlining.'; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_operators.sql +--! @brief Operators for public.bigint. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.bigint +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.bigint, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.bigint, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.bigint, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.bigint, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.bigint, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.bigint, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.bigint, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.bigint, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint, RIGHTARG = public.bigint +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.bigint +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_eq_functions.sql +--! @brief Functions for public.bigint_eq. + +--! @brief Index extractor for public.bigint_eq. +--! @param a public.bigint_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a public.bigint_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b::public.bigint_eq) $$; + +--! @brief Operator wrapper for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.bigint_eq) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_eq, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b::public.bigint_eq) $$; + +--! @brief Operator wrapper for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a::public.bigint_eq) <> eql_v3.eq_term(b) $$; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.bigint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.bigint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.bigint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.bigint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_eq, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_eq, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.bigint_eq) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param selector text +--! @return public.bigint_eq +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_eq, selector text) +RETURNS public.bigint_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param selector integer +--! @return public.bigint_eq +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_eq, selector integer) +RETURNS public.bigint_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param selector public.bigint_eq +--! @return public.bigint_eq +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.bigint_eq) +RETURNS public.bigint_eq IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_eq, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_eq, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param selector public.bigint_eq +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.bigint_eq) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.bigint_eq, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.bigint_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.bigint_eq, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.bigint_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.bigint_eq, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.bigint_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.bigint_eq, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_eq, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_eq, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.bigint_eq, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b public.bigint_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_eq, b public.bigint_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a public.bigint_eq +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_eq, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_eq. +--! @param a jsonb +--! @param b public.bigint_eq +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.bigint_eq) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_eq'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_bigint_ord_ore. + +--! @brief Index extractor for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_bigint_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b eql_v3.query_bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord_ore, b eql_v3.query_bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b eql_v3.query_bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord_ore, b eql_v3.query_bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b eql_v3.query_bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord_ore, b eql_v3.query_bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b eql_v3.query_bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord_ore, b eql_v3.query_bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b eql_v3.query_bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord_ore, b eql_v3.query_bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a public.bigint_ord_ore +--! @param b eql_v3.query_bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord_ore, b eql_v3.query_bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ore. +--! @param a eql_v3.query_bigint_ord_ore +--! @param b public.bigint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_bigint_ord_ore, b public.bigint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_eq_functions.sql +--! @brief Functions for eql_v3.query_bigint_eq. + +--! @brief Index extractor for eql_v3.query_bigint_eq. +--! @param a eql_v3.query_bigint_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_bigint_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_eq. +--! @param a public.bigint_eq +--! @param b eql_v3.query_bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_eq, b eql_v3.query_bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_eq. +--! @param a eql_v3.query_bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_bigint_eq, b public.bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_eq. +--! @param a public.bigint_eq +--! @param b eql_v3.query_bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_eq, b eql_v3.query_bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_eq. +--! @param a eql_v3.query_bigint_eq +--! @param b public.bigint_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_bigint_eq, b public.bigint_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_ope_functions.sql +--! @brief Functions for public.bigint_ord_ope. + +--! @brief Index extractor for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a public.bigint_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b::public.bigint_ord_ope) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a jsonb, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.bigint_ord_ope) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b::public.bigint_ord_ope) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a jsonb, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.bigint_ord_ope) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b::public.bigint_ord_ope) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a jsonb, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.bigint_ord_ope) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b::public.bigint_ord_ope) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a jsonb, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.bigint_ord_ope) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b::public.bigint_ord_ope) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a jsonb, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.bigint_ord_ope) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord_ope, b jsonb) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b::public.bigint_ord_ope) $$; + +--! @brief Operator wrapper for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a jsonb, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a::public.bigint_ord_ope) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.bigint_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.bigint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.bigint_ord_ope, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.bigint_ord_ope) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param selector text +--! @return public.bigint_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_ord_ope, selector text) +RETURNS public.bigint_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param selector integer +--! @return public.bigint_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a public.bigint_ord_ope, selector integer) +RETURNS public.bigint_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a jsonb +--! @param selector public.bigint_ord_ope +--! @return public.bigint_ord_ope +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.bigint_ord_ope) +RETURNS public.bigint_ord_ope IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_ord_ope, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.bigint_ord_ope, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a jsonb +--! @param selector public.bigint_ord_ope +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.bigint_ord_ope) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.bigint_ord_ope, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.bigint_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.bigint_ord_ope, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.bigint_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.bigint_ord_ope, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.bigint_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.bigint_ord_ope, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord_ope, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord_ope, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.bigint_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.bigint_ord_ope, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_ord_ope, b public.bigint_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.bigint_ord_ope, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.bigint_ord_ope. +--! @param a jsonb +--! @param b public.bigint_ord_ope +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.bigint_ord_ope) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.bigint_ord_ope'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_ore_aggregates.sql +--! @brief Aggregates for public.bigint_ord_ore. + +--! @brief State function for min on public.bigint_ord_ore. +--! @param state public.bigint_ord_ore +--! @param value public.bigint_ord_ore +--! @return public.bigint_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.bigint_ord_ore, value public.bigint_ord_ore) +RETURNS public.bigint_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.bigint_ord_ore. +--! @param input public.bigint_ord_ore +--! @return public.bigint_ord_ore +CREATE AGGREGATE eql_v3.min(public.bigint_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.bigint_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.bigint_ord_ore. +--! @param state public.bigint_ord_ore +--! @param value public.bigint_ord_ore +--! @return public.bigint_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.bigint_ord_ore, value public.bigint_ord_ore) +RETURNS public.bigint_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.bigint_ord_ore. +--! @param input public.bigint_ord_ore +--! @return public.bigint_ord_ore +CREATE AGGREGATE eql_v3.max(public.bigint_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.bigint_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_aggregates.sql +--! @brief Aggregates for public.bigint_ord. + +--! @brief State function for min on public.bigint_ord. +--! @param state public.bigint_ord +--! @param value public.bigint_ord +--! @return public.bigint_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.bigint_ord, value public.bigint_ord) +RETURNS public.bigint_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.bigint_ord. +--! @param input public.bigint_ord +--! @return public.bigint_ord +CREATE AGGREGATE eql_v3.min(public.bigint_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.bigint_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.bigint_ord. +--! @param state public.bigint_ord +--! @param value public.bigint_ord +--! @return public.bigint_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.bigint_ord, value public.bigint_ord) +RETURNS public.bigint_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.bigint_ord. +--! @param input public.bigint_ord +--! @return public.bigint_ord +CREATE AGGREGATE eql_v3.max(public.bigint_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.bigint_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_bigint_ord_ope. + +--! @brief Index extractor for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_bigint_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b eql_v3.query_bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.bigint_ord_ope, b eql_v3.query_bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b eql_v3.query_bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.bigint_ord_ope, b eql_v3.query_bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b eql_v3.query_bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.bigint_ord_ope, b eql_v3.query_bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b eql_v3.query_bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.bigint_ord_ope, b eql_v3.query_bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b eql_v3.query_bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.bigint_ord_ope, b eql_v3.query_bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a public.bigint_ord_ope +--! @param b eql_v3.query_bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.bigint_ord_ope, b eql_v3.query_bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_bigint_ord_ope. +--! @param a eql_v3.query_bigint_ord_ope +--! @param b public.bigint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_bigint_ord_ope, b public.bigint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_ord_operators.sql +--! @brief Operators for eql_v3.query_bigint_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord, RIGHTARG = eql_v3.query_bigint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord, RIGHTARG = eql_v3.query_bigint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord, RIGHTARG = eql_v3.query_bigint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord, RIGHTARG = eql_v3.query_bigint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord, RIGHTARG = eql_v3.query_bigint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord, RIGHTARG = eql_v3.query_bigint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_bigint_ord, RIGHTARG = public.bigint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_ope_operators.sql +--! @brief Operators for public.bigint_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.bigint_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_ord_ope, RIGHTARG = public.bigint_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.bigint_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_eq_operators.sql +--! @brief Operators for eql_v3.query_bigint_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_eq, RIGHTARG = eql_v3.query_bigint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_bigint_eq, RIGHTARG = public.bigint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_eq, RIGHTARG = eql_v3.query_bigint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_bigint_eq, RIGHTARG = public.bigint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_bigint_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord_ore, RIGHTARG = eql_v3.query_bigint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord_ore, RIGHTARG = eql_v3.query_bigint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord_ore, RIGHTARG = eql_v3.query_bigint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord_ore, RIGHTARG = eql_v3.query_bigint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord_ore, RIGHTARG = eql_v3.query_bigint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord_ore, RIGHTARG = eql_v3.query_bigint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_bigint_ord_ore, RIGHTARG = public.bigint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_eq_operators.sql +--! @brief Operators for public.bigint_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.bigint_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.bigint_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.bigint_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.bigint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.bigint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.bigint_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.bigint_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.bigint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.bigint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.bigint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.bigint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_eq, RIGHTARG = public.bigint_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.bigint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.bigint_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/bigint_ord_ope_aggregates.sql +--! @brief Aggregates for public.bigint_ord_ope. + +--! @brief State function for min on public.bigint_ord_ope. +--! @param state public.bigint_ord_ope +--! @param value public.bigint_ord_ope +--! @return public.bigint_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.bigint_ord_ope, value public.bigint_ord_ope) +RETURNS public.bigint_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.bigint_ord_ope. +--! @param input public.bigint_ord_ope +--! @return public.bigint_ord_ope +CREATE AGGREGATE eql_v3.min(public.bigint_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.bigint_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.bigint_ord_ope. +--! @param state public.bigint_ord_ope +--! @param value public.bigint_ord_ope +--! @return public.bigint_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.bigint_ord_ope, value public.bigint_ord_ope) +RETURNS public.bigint_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.bigint_ord_ope. +--! @param input public.bigint_ord_ope +--! @return public.bigint_ord_ope +CREATE AGGREGATE eql_v3.max(public.bigint_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.bigint_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/bigint/query_bigint_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_bigint_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.bigint_ord_ope, RIGHTARG = eql_v3.query_bigint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.bigint_ord_ope, RIGHTARG = eql_v3.query_bigint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.bigint_ord_ope, RIGHTARG = eql_v3.query_bigint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.bigint_ord_ope, RIGHTARG = eql_v3.query_bigint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.bigint_ord_ope, RIGHTARG = eql_v3.query_bigint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.bigint_ord_ope, RIGHTARG = eql_v3.query_bigint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_bigint_ord_ope, RIGHTARG = public.bigint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_real_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord_ore, RIGHTARG = eql_v3.query_real_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord_ore, RIGHTARG = eql_v3.query_real_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord_ore, RIGHTARG = eql_v3.query_real_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord_ore, RIGHTARG = eql_v3.query_real_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord_ore, RIGHTARG = eql_v3.query_real_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord_ore, RIGHTARG = eql_v3.query_real_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_ore_operators.sql +--! @brief Operators for public.real_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.real_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.real_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.real_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.real_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.real_ord_ore, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.real_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.real_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord_ore, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord_ore, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.real_ord_ore, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_ord_ore, RIGHTARG = public.real_ord_ore +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_ord_ore, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.real_ord_ore +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_operators.sql +--! @brief Operators for public.real_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.real_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.real_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.real_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.real_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.real_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.real_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.real_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_ord, RIGHTARG = public.real_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.real_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.real_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.real_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.real_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.real_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.real_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.real_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.real_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.real_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.real_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.real_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_ord, RIGHTARG = public.real_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.real_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_ord_functions.sql +--! @brief Functions for eql_v3.query_real_ord. + +--! @brief Index extractor for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_real_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a public.real_ord +--! @param b eql_v3.query_real_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.real_ord, b eql_v3.query_real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a public.real_ord +--! @param b eql_v3.query_real_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.real_ord, b eql_v3.query_real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a public.real_ord +--! @param b eql_v3.query_real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.real_ord, b eql_v3.query_real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a public.real_ord +--! @param b eql_v3.query_real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.real_ord, b eql_v3.query_real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a public.real_ord +--! @param b eql_v3.query_real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.real_ord, b eql_v3.query_real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a public.real_ord +--! @param b eql_v3.query_real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.real_ord, b eql_v3.query_real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_real_ord. +--! @param a eql_v3.query_real_ord +--! @param b public.real_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_real_ord, b public.real_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_ore_aggregates.sql +--! @brief Aggregates for public.real_ord_ore. + +--! @brief State function for min on public.real_ord_ore. +--! @param state public.real_ord_ore +--! @param value public.real_ord_ore +--! @return public.real_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.real_ord_ore, value public.real_ord_ore) +RETURNS public.real_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.real_ord_ore. +--! @param input public.real_ord_ore +--! @return public.real_ord_ore +CREATE AGGREGATE eql_v3.min(public.real_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.real_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.real_ord_ore. +--! @param state public.real_ord_ore +--! @param value public.real_ord_ore +--! @return public.real_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.real_ord_ore, value public.real_ord_ore) +RETURNS public.real_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.real_ord_ore. +--! @param input public.real_ord_ore +--! @return public.real_ord_ore +CREATE AGGREGATE eql_v3.max(public.real_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.real_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_ope_operators.sql +--! @brief Operators for public.real_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.real_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.real_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.real_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.real_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.real_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.real_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.real_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.real_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_ord_ope, RIGHTARG = public.real_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.real_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_eq_operators.sql +--! @brief Operators for eql_v3.query_real_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_eq, RIGHTARG = eql_v3.query_real_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_real_eq, RIGHTARG = public.real_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_eq, RIGHTARG = eql_v3.query_real_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_real_eq, RIGHTARG = public.real_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_real_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord_ope, RIGHTARG = eql_v3.query_real_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord_ope, RIGHTARG = eql_v3.query_real_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord_ope, RIGHTARG = eql_v3.query_real_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord_ope, RIGHTARG = eql_v3.query_real_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord_ope, RIGHTARG = eql_v3.query_real_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord_ope, RIGHTARG = eql_v3.query_real_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_real_ord_ope, RIGHTARG = public.real_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_functions.sql +--! @brief Functions for public.real. + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.real, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.real) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param selector text +--! @return public.real +CREATE FUNCTION eql_v3_internal."->"(a public.real, selector text) +RETURNS public.real IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param selector integer +--! @return public.real +CREATE FUNCTION eql_v3_internal."->"(a public.real, selector integer) +RETURNS public.real IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param selector public.real +--! @return public.real +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.real) +RETURNS public.real IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.real, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param selector public.real +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.real) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.real, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.real, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.real, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.real, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.real, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.real, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.real, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.real, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.real, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b public.real +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real, b public.real) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a public.real +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.real, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.real. +--! @param a jsonb +--! @param b public.real +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.real) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.real'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_aggregates.sql +--! @brief Aggregates for public.real_ord. + +--! @brief State function for min on public.real_ord. +--! @param state public.real_ord +--! @param value public.real_ord +--! @return public.real_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.real_ord, value public.real_ord) +RETURNS public.real_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.real_ord. +--! @param input public.real_ord +--! @return public.real_ord +CREATE AGGREGATE eql_v3.min(public.real_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.real_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.real_ord. +--! @param state public.real_ord +--! @param value public.real_ord +--! @return public.real_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.real_ord, value public.real_ord) +RETURNS public.real_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.real_ord. +--! @param input public.real_ord +--! @return public.real_ord +CREATE AGGREGATE eql_v3.max(public.real_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.real_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/query_real_ord_operators.sql +--! @brief Operators for eql_v3.query_real_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_ord, RIGHTARG = eql_v3.query_real_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_ord, RIGHTARG = eql_v3.query_real_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.real_ord, RIGHTARG = eql_v3.query_real_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.real_ord, RIGHTARG = eql_v3.query_real_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.real_ord, RIGHTARG = eql_v3.query_real_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.real_ord, RIGHTARG = eql_v3.query_real_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_real_ord, RIGHTARG = public.real_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_operators.sql +--! @brief Operators for public.real. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.real +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.real, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.real, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.real, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.real, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.real, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.real, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.real, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.real, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real, RIGHTARG = public.real +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.real +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_ord_ope_aggregates.sql +--! @brief Aggregates for public.real_ord_ope. + +--! @brief State function for min on public.real_ord_ope. +--! @param state public.real_ord_ope +--! @param value public.real_ord_ope +--! @return public.real_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.real_ord_ope, value public.real_ord_ope) +RETURNS public.real_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.real_ord_ope. +--! @param input public.real_ord_ope +--! @return public.real_ord_ope +CREATE AGGREGATE eql_v3.min(public.real_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.real_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.real_ord_ope. +--! @param state public.real_ord_ope +--! @param value public.real_ord_ope +--! @return public.real_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.real_ord_ope, value public.real_ord_ope) +RETURNS public.real_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.real_ord_ope. +--! @param input public.real_ord_ope +--! @return public.real_ord_ope +CREATE AGGREGATE eql_v3.max(public.real_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.real_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/real/real_eq_operators.sql +--! @brief Operators for public.real_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.real_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.real_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.real_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.real_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.real_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.real_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.real_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.real_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.real_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.real_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.real_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.real_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.real_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.real_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.real_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.real_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_eq, RIGHTARG = public.real_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.real_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.real_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_ore_aggregates.sql +--! @brief Aggregates for public.smallint_ord_ore. + +--! @brief State function for min on public.smallint_ord_ore. +--! @param state public.smallint_ord_ore +--! @param value public.smallint_ord_ore +--! @return public.smallint_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.smallint_ord_ore, value public.smallint_ord_ore) +RETURNS public.smallint_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.smallint_ord_ore. +--! @param input public.smallint_ord_ore +--! @return public.smallint_ord_ore +CREATE AGGREGATE eql_v3.min(public.smallint_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.smallint_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.smallint_ord_ore. +--! @param state public.smallint_ord_ore +--! @param value public.smallint_ord_ore +--! @return public.smallint_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.smallint_ord_ore, value public.smallint_ord_ore) +RETURNS public.smallint_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.smallint_ord_ore. +--! @param input public.smallint_ord_ore +--! @return public.smallint_ord_ore +CREATE AGGREGATE eql_v3.max(public.smallint_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.smallint_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_smallint_ord_ope. + +--! @brief Index extractor for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_smallint_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b eql_v3.query_smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord_ope, b eql_v3.query_smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b eql_v3.query_smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord_ope, b eql_v3.query_smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b eql_v3.query_smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord_ope, b eql_v3.query_smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b eql_v3.query_smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord_ope, b eql_v3.query_smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b eql_v3.query_smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord_ope, b eql_v3.query_smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a public.smallint_ord_ope +--! @param b eql_v3.query_smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord_ope, b eql_v3.query_smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ope. +--! @param a eql_v3.query_smallint_ord_ope +--! @param b public.smallint_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_smallint_ord_ope, b public.smallint_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_smallint_ord_ore. + +--! @brief Index extractor for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_smallint_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b eql_v3.query_smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.smallint_ord_ore, b eql_v3.query_smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b eql_v3.query_smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.smallint_ord_ore, b eql_v3.query_smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b eql_v3.query_smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.smallint_ord_ore, b eql_v3.query_smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b eql_v3.query_smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.smallint_ord_ore, b eql_v3.query_smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b eql_v3.query_smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.smallint_ord_ore, b eql_v3.query_smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a public.smallint_ord_ore +--! @param b eql_v3.query_smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.smallint_ord_ore, b eql_v3.query_smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_smallint_ord_ore. +--! @param a eql_v3.query_smallint_ord_ore +--! @param b public.smallint_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_smallint_ord_ore, b public.smallint_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_operators.sql +--! @brief Operators for public.smallint_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.smallint_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.smallint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.smallint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.smallint_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.smallint_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.smallint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.smallint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.smallint_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_ord, RIGHTARG = public.smallint_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.smallint_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_eq_operators.sql +--! @brief Operators for eql_v3.query_smallint_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_eq, RIGHTARG = eql_v3.query_smallint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_smallint_eq, RIGHTARG = public.smallint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_eq, RIGHTARG = eql_v3.query_smallint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_smallint_eq, RIGHTARG = public.smallint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_ord_operators.sql +--! @brief Operators for eql_v3.query_smallint_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord, RIGHTARG = eql_v3.query_smallint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord, RIGHTARG = eql_v3.query_smallint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord, RIGHTARG = eql_v3.query_smallint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord, RIGHTARG = eql_v3.query_smallint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord, RIGHTARG = eql_v3.query_smallint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord, RIGHTARG = eql_v3.query_smallint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_smallint_ord, RIGHTARG = public.smallint_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_operators.sql +--! @brief Operators for public.smallint. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.smallint +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.smallint, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.smallint, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.smallint, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.smallint, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.smallint, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.smallint, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.smallint, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.smallint, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint, RIGHTARG = public.smallint +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.smallint +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_smallint_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord_ope, RIGHTARG = eql_v3.query_smallint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord_ope, RIGHTARG = eql_v3.query_smallint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord_ope, RIGHTARG = eql_v3.query_smallint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord_ope, RIGHTARG = eql_v3.query_smallint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord_ope, RIGHTARG = eql_v3.query_smallint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord_ope, RIGHTARG = eql_v3.query_smallint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_smallint_ord_ope, RIGHTARG = public.smallint_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_eq_operators.sql +--! @brief Operators for public.smallint_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.smallint_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.smallint_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.smallint_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.smallint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.smallint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.smallint_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.smallint_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.smallint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.smallint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.smallint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.smallint_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_eq, RIGHTARG = public.smallint_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.smallint_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.smallint_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_ope_aggregates.sql +--! @brief Aggregates for public.smallint_ord_ope. + +--! @brief State function for min on public.smallint_ord_ope. +--! @param state public.smallint_ord_ope +--! @param value public.smallint_ord_ope +--! @return public.smallint_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.smallint_ord_ope, value public.smallint_ord_ope) +RETURNS public.smallint_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.smallint_ord_ope. +--! @param input public.smallint_ord_ope +--! @return public.smallint_ord_ope +CREATE AGGREGATE eql_v3.min(public.smallint_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.smallint_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.smallint_ord_ope. +--! @param state public.smallint_ord_ope +--! @param value public.smallint_ord_ope +--! @return public.smallint_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.smallint_ord_ope, value public.smallint_ord_ope) +RETURNS public.smallint_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.smallint_ord_ope. +--! @param input public.smallint_ord_ope +--! @return public.smallint_ord_ope +CREATE AGGREGATE eql_v3.max(public.smallint_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.smallint_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/query_smallint_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_smallint_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.smallint_ord_ore, RIGHTARG = eql_v3.query_smallint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.smallint_ord_ore, RIGHTARG = eql_v3.query_smallint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.smallint_ord_ore, RIGHTARG = eql_v3.query_smallint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.smallint_ord_ore, RIGHTARG = eql_v3.query_smallint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.smallint_ord_ore, RIGHTARG = eql_v3.query_smallint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.smallint_ord_ore, RIGHTARG = eql_v3.query_smallint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_smallint_ord_ore, RIGHTARG = public.smallint_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/smallint/smallint_ord_aggregates.sql +--! @brief Aggregates for public.smallint_ord. + +--! @brief State function for min on public.smallint_ord. +--! @param state public.smallint_ord +--! @param value public.smallint_ord +--! @return public.smallint_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.smallint_ord, value public.smallint_ord) +RETURNS public.smallint_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.smallint_ord. +--! @param input public.smallint_ord +--! @return public.smallint_ord +CREATE AGGREGATE eql_v3.min(public.smallint_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.smallint_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.smallint_ord. +--! @param state public.smallint_ord +--! @param value public.smallint_ord +--! @return public.smallint_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.smallint_ord, value public.smallint_ord) +RETURNS public.smallint_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.smallint_ord. +--! @param input public.smallint_ord +--! @return public.smallint_ord +CREATE AGGREGATE eql_v3.max(public.smallint_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.smallint_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_ord_operators.sql +--! @brief Operators for eql_v3.query_date_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord, RIGHTARG = eql_v3.query_date_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord, RIGHTARG = eql_v3.query_date_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord, RIGHTARG = eql_v3.query_date_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord, RIGHTARG = eql_v3.query_date_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord, RIGHTARG = eql_v3.query_date_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord, RIGHTARG = eql_v3.query_date_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_date_ord_ore. + +--! @brief Index extractor for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_date_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a public.date_ord_ore +--! @param b eql_v3.query_date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord_ore, b eql_v3.query_date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a public.date_ord_ore +--! @param b eql_v3.query_date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord_ore, b eql_v3.query_date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a public.date_ord_ore +--! @param b eql_v3.query_date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord_ore, b eql_v3.query_date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a public.date_ord_ore +--! @param b eql_v3.query_date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord_ore, b eql_v3.query_date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a public.date_ord_ore +--! @param b eql_v3.query_date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord_ore, b eql_v3.query_date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a public.date_ord_ore +--! @param b eql_v3.query_date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord_ore, b eql_v3.query_date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ore. +--! @param a eql_v3.query_date_ord_ore +--! @param b public.date_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_date_ord_ore, b public.date_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_date_ord_ope. + +--! @brief Index extractor for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_date_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a public.date_ord_ope +--! @param b eql_v3.query_date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_ord_ope, b eql_v3.query_date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a public.date_ord_ope +--! @param b eql_v3.query_date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_ord_ope, b eql_v3.query_date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a public.date_ord_ope +--! @param b eql_v3.query_date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.date_ord_ope, b eql_v3.query_date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a public.date_ord_ope +--! @param b eql_v3.query_date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.date_ord_ope, b eql_v3.query_date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a public.date_ord_ope +--! @param b eql_v3.query_date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.date_ord_ope, b eql_v3.query_date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a public.date_ord_ope +--! @param b eql_v3.query_date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.date_ord_ope, b eql_v3.query_date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_ord_ope. +--! @param a eql_v3.query_date_ord_ope +--! @param b public.date_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_date_ord_ope, b public.date_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_eq_operators.sql +--! @brief Operators for public.date_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.date_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.date_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.date_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.date_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.date_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.date_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.date_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.date_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.date_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.date_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.date_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_eq, RIGHTARG = public.date_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.date_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_operators.sql +--! @brief Operators for public.date. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.date +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.date, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.date, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.date, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.date, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.date, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.date, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.date, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.date, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date, RIGHTARG = public.date +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.date +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_ore_aggregates.sql +--! @brief Aggregates for public.date_ord_ore. + +--! @brief State function for min on public.date_ord_ore. +--! @param state public.date_ord_ore +--! @param value public.date_ord_ore +--! @return public.date_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.date_ord_ore, value public.date_ord_ore) +RETURNS public.date_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.date_ord_ore. +--! @param input public.date_ord_ore +--! @return public.date_ord_ore +CREATE AGGREGATE eql_v3.min(public.date_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.date_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.date_ord_ore. +--! @param state public.date_ord_ore +--! @param value public.date_ord_ore +--! @return public.date_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.date_ord_ore, value public.date_ord_ore) +RETURNS public.date_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.date_ord_ore. +--! @param input public.date_ord_ore +--! @return public.date_ord_ore +CREATE AGGREGATE eql_v3.max(public.date_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.date_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_eq_functions.sql +--! @brief Functions for eql_v3.query_date_eq. + +--! @brief Index extractor for eql_v3.query_date_eq. +--! @param a eql_v3.query_date_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_date_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_date_eq. +--! @param a public.date_eq +--! @param b eql_v3.query_date_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.date_eq, b eql_v3.query_date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_eq. +--! @param a eql_v3.query_date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_date_eq, b public.date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_eq. +--! @param a public.date_eq +--! @param b eql_v3.query_date_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.date_eq, b eql_v3.query_date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_date_eq. +--! @param a eql_v3.query_date_eq +--! @param b public.date_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_date_eq, b public.date_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_ope_aggregates.sql +--! @brief Aggregates for public.date_ord_ope. + +--! @brief State function for min on public.date_ord_ope. +--! @param state public.date_ord_ope +--! @param value public.date_ord_ope +--! @return public.date_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.date_ord_ope, value public.date_ord_ope) +RETURNS public.date_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.date_ord_ope. +--! @param input public.date_ord_ope +--! @return public.date_ord_ope +CREATE AGGREGATE eql_v3.min(public.date_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.date_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.date_ord_ope. +--! @param state public.date_ord_ope +--! @param value public.date_ord_ope +--! @return public.date_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.date_ord_ope, value public.date_ord_ope) +RETURNS public.date_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.date_ord_ope. +--! @param input public.date_ord_ope +--! @return public.date_ord_ope +CREATE AGGREGATE eql_v3.max(public.date_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.date_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_date_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord_ore, RIGHTARG = eql_v3.query_date_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord_ore, RIGHTARG = eql_v3.query_date_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord_ore, RIGHTARG = eql_v3.query_date_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord_ore, RIGHTARG = eql_v3.query_date_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord_ore, RIGHTARG = eql_v3.query_date_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord_ore, RIGHTARG = eql_v3.query_date_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_date_ord_ore, RIGHTARG = public.date_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_operators.sql +--! @brief Operators for public.date_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.date_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.date_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.date_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.date_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.date_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.date_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.date_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.date_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_ord, RIGHTARG = public.date_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.date_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.date_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.date_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.date_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.date_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.date_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.date_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.date_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.date_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.date_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.date_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.date_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.date_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.date_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.date_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_ord, RIGHTARG = public.date_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.date_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.date_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/date_ord_aggregates.sql +--! @brief Aggregates for public.date_ord. + +--! @brief State function for min on public.date_ord. +--! @param state public.date_ord +--! @param value public.date_ord +--! @return public.date_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.date_ord, value public.date_ord) +RETURNS public.date_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.date_ord. +--! @param input public.date_ord +--! @return public.date_ord +CREATE AGGREGATE eql_v3.min(public.date_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.date_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.date_ord. +--! @param state public.date_ord +--! @param value public.date_ord +--! @return public.date_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.date_ord, value public.date_ord) +RETURNS public.date_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.date_ord. +--! @param input public.date_ord +--! @return public.date_ord +CREATE AGGREGATE eql_v3.max(public.date_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.date_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_eq_operators.sql +--! @brief Operators for eql_v3.query_date_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_eq, RIGHTARG = eql_v3.query_date_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_date_eq, RIGHTARG = public.date_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_eq, RIGHTARG = eql_v3.query_date_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_date_eq, RIGHTARG = public.date_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/date/query_date_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_date_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.date_ord_ope, RIGHTARG = eql_v3.query_date_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.date_ord_ope, RIGHTARG = eql_v3.query_date_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.date_ord_ope, RIGHTARG = eql_v3.query_date_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.date_ord_ope, RIGHTARG = eql_v3.query_date_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.date_ord_ope, RIGHTARG = eql_v3.query_date_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.date_ord_ope, RIGHTARG = eql_v3.query_date_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_date_ord_ope, RIGHTARG = public.date_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_eq_functions.sql +--! @brief Functions for eql_v3.query_numeric_eq. + +--! @brief Index extractor for eql_v3.query_numeric_eq. +--! @param a eql_v3.query_numeric_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_numeric_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_eq. +--! @param a public.numeric_eq +--! @param b eql_v3.query_numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.numeric_eq, b eql_v3.query_numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_eq. +--! @param a eql_v3.query_numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_numeric_eq, b public.numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_eq. +--! @param a public.numeric_eq +--! @param b eql_v3.query_numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.numeric_eq, b eql_v3.query_numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_numeric_eq. +--! @param a eql_v3.query_numeric_eq +--! @param b public.numeric_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_numeric_eq, b public.numeric_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_ord_operators.sql +--! @brief Operators for eql_v3.query_numeric_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord, RIGHTARG = eql_v3.query_numeric_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord, RIGHTARG = eql_v3.query_numeric_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord, RIGHTARG = eql_v3.query_numeric_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord, RIGHTARG = eql_v3.query_numeric_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord, RIGHTARG = eql_v3.query_numeric_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord, RIGHTARG = eql_v3.query_numeric_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_numeric_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord_ore, RIGHTARG = eql_v3.query_numeric_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord_ore, RIGHTARG = eql_v3.query_numeric_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord_ore, RIGHTARG = eql_v3.query_numeric_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord_ore, RIGHTARG = eql_v3.query_numeric_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord_ore, RIGHTARG = eql_v3.query_numeric_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord_ore, RIGHTARG = eql_v3.query_numeric_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_numeric_ord_ore, RIGHTARG = public.numeric_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_functions.sql +--! @brief Functions for public.numeric. + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.numeric, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.numeric) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param selector text +--! @return public.numeric +CREATE FUNCTION eql_v3_internal."->"(a public.numeric, selector text) +RETURNS public.numeric IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param selector integer +--! @return public.numeric +CREATE FUNCTION eql_v3_internal."->"(a public.numeric, selector integer) +RETURNS public.numeric IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param selector public.numeric +--! @return public.numeric +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.numeric) +RETURNS public.numeric IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.numeric, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param selector public.numeric +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.numeric) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.numeric, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.numeric, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.numeric, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.numeric, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.numeric, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.numeric, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.numeric, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.numeric, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.numeric, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b public.numeric +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric, b public.numeric) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a public.numeric +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.numeric, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.numeric. +--! @param a jsonb +--! @param b public.numeric +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.numeric) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.numeric'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_numeric_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord_ope, RIGHTARG = eql_v3.query_numeric_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord_ope, RIGHTARG = eql_v3.query_numeric_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord_ope, RIGHTARG = eql_v3.query_numeric_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord_ope, RIGHTARG = eql_v3.query_numeric_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord_ope, RIGHTARG = eql_v3.query_numeric_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord_ope, RIGHTARG = eql_v3.query_numeric_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_numeric_ord_ope, RIGHTARG = public.numeric_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_eq_operators.sql +--! @brief Operators for public.numeric_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.numeric_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.numeric_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.numeric_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.numeric_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.numeric_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.numeric_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.numeric_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.numeric_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_eq, RIGHTARG = public.numeric_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.numeric_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_ore_aggregates.sql +--! @brief Aggregates for public.numeric_ord_ore. + +--! @brief State function for min on public.numeric_ord_ore. +--! @param state public.numeric_ord_ore +--! @param value public.numeric_ord_ore +--! @return public.numeric_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.numeric_ord_ore, value public.numeric_ord_ore) +RETURNS public.numeric_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.numeric_ord_ore. +--! @param input public.numeric_ord_ore +--! @return public.numeric_ord_ore +CREATE AGGREGATE eql_v3.min(public.numeric_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.numeric_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.numeric_ord_ore. +--! @param state public.numeric_ord_ore +--! @param value public.numeric_ord_ore +--! @return public.numeric_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.numeric_ord_ore, value public.numeric_ord_ore) +RETURNS public.numeric_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.numeric_ord_ore. +--! @param input public.numeric_ord_ore +--! @return public.numeric_ord_ore +CREATE AGGREGATE eql_v3.max(public.numeric_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.numeric_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_operators.sql +--! @brief Operators for public.numeric. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.numeric +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.numeric, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.numeric, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.numeric, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.numeric, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.numeric, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.numeric, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.numeric, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.numeric, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric, RIGHTARG = public.numeric +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.numeric +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/query_numeric_eq_operators.sql +--! @brief Operators for eql_v3.query_numeric_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_eq, RIGHTARG = eql_v3.query_numeric_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_numeric_eq, RIGHTARG = public.numeric_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_eq, RIGHTARG = eql_v3.query_numeric_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_numeric_eq, RIGHTARG = public.numeric_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_ope_aggregates.sql +--! @brief Aggregates for public.numeric_ord_ope. + +--! @brief State function for min on public.numeric_ord_ope. +--! @param state public.numeric_ord_ope +--! @param value public.numeric_ord_ope +--! @return public.numeric_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.numeric_ord_ope, value public.numeric_ord_ope) +RETURNS public.numeric_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.numeric_ord_ope. +--! @param input public.numeric_ord_ope +--! @return public.numeric_ord_ope +CREATE AGGREGATE eql_v3.min(public.numeric_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.numeric_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.numeric_ord_ope. +--! @param state public.numeric_ord_ope +--! @param value public.numeric_ord_ope +--! @return public.numeric_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.numeric_ord_ope, value public.numeric_ord_ope) +RETURNS public.numeric_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.numeric_ord_ope. +--! @param input public.numeric_ord_ope +--! @return public.numeric_ord_ope +CREATE AGGREGATE eql_v3.max(public.numeric_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.numeric_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_operators.sql +--! @brief Operators for public.numeric_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.numeric_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_ord, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.numeric_ord, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_ord, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.numeric_ord, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.numeric_ord, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.numeric_ord, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.numeric_ord, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.numeric_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.numeric_ord, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.numeric_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.numeric_ord, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.numeric_ord, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.numeric_ord, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_ord, RIGHTARG = public.numeric_ord +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.numeric_ord, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.numeric_ord +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/numeric/numeric_ord_aggregates.sql +--! @brief Aggregates for public.numeric_ord. + +--! @brief State function for min on public.numeric_ord. +--! @param state public.numeric_ord +--! @param value public.numeric_ord +--! @return public.numeric_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.numeric_ord, value public.numeric_ord) +RETURNS public.numeric_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.numeric_ord. +--! @param input public.numeric_ord +--! @return public.numeric_ord +CREATE AGGREGATE eql_v3.min(public.numeric_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.numeric_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.numeric_ord. +--! @param state public.numeric_ord +--! @param value public.numeric_ord +--! @return public.numeric_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.numeric_ord, value public.numeric_ord) +RETURNS public.numeric_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.numeric_ord. +--! @param input public.numeric_ord +--! @return public.numeric_ord +CREATE AGGREGATE eql_v3.max(public.numeric_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.numeric_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/boolean/boolean_types.sql +--! @brief Encrypted-domain types for boolean. + +DO $$ +BEGIN + --! @brief Encrypted domain public.boolean. + IF NOT EXISTS ( + SELECT 1 FROM pg_type + WHERE typname = 'boolean' AND typnamespace = 'public'::regnamespace + ) THEN + CREATE DOMAIN public.boolean AS jsonb + CHECK ( + jsonb_typeof(VALUE) = 'object' + AND VALUE ? 'v' + AND VALUE ? 'i' + AND VALUE ? 'c' + AND VALUE->>'v' = '3' + ); + END IF; + + COMMENT ON DOMAIN public.boolean IS 'EQL encrypted boolean (storage only)'; +END +$$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/boolean/boolean_functions.sql +--! @brief Functions for public.boolean. + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.boolean, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.boolean, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.boolean) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param selector text +--! @return public.boolean +CREATE FUNCTION eql_v3_internal."->"(a public.boolean, selector text) +RETURNS public.boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param selector integer +--! @return public.boolean +CREATE FUNCTION eql_v3_internal."->"(a public.boolean, selector integer) +RETURNS public.boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param selector public.boolean +--! @return public.boolean +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.boolean) +RETURNS public.boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.boolean, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.boolean, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param selector public.boolean +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.boolean) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.boolean, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.boolean, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.boolean, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.boolean, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.boolean, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.boolean, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.boolean, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.boolean, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.boolean, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.boolean, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.boolean, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b public.boolean +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.boolean, b public.boolean) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a public.boolean +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.boolean, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.boolean'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.boolean. +--! @param a jsonb +--! @param b public.boolean +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.boolean) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.boolean'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/boolean/boolean_operators.sql +--! @brief Operators for public.boolean. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.boolean, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.boolean, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.boolean, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.boolean, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.boolean +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.boolean, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.boolean, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.boolean, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.boolean, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.boolean, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.boolean, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.boolean, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.boolean, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.boolean, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.boolean, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.boolean, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.boolean, RIGHTARG = public.boolean +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.boolean, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.boolean +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_ord_functions.sql +--! @brief Functions for eql_v3.query_double_ord. + +--! @brief Index extractor for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_double_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a public.double_ord +--! @param b eql_v3.query_double_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord, b eql_v3.query_double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a public.double_ord +--! @param b eql_v3.query_double_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord, b eql_v3.query_double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a public.double_ord +--! @param b eql_v3.query_double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord, b eql_v3.query_double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a public.double_ord +--! @param b eql_v3.query_double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord, b eql_v3.query_double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a public.double_ord +--! @param b eql_v3.query_double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord, b eql_v3.query_double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a public.double_ord +--! @param b eql_v3.query_double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord, b eql_v3.query_double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord. +--! @param a eql_v3.query_double_ord +--! @param b public.double_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_double_ord, b public.double_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_double_ord_ore. + +--! @brief Index extractor for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_double_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a public.double_ord_ore +--! @param b eql_v3.query_double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord_ore, b eql_v3.query_double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a public.double_ord_ore +--! @param b eql_v3.query_double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord_ore, b eql_v3.query_double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a public.double_ord_ore +--! @param b eql_v3.query_double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord_ore, b eql_v3.query_double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a public.double_ord_ore +--! @param b eql_v3.query_double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord_ore, b eql_v3.query_double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a public.double_ord_ore +--! @param b eql_v3.query_double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord_ore, b eql_v3.query_double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a public.double_ord_ore +--! @param b eql_v3.query_double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord_ore, b eql_v3.query_double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ore. +--! @param a eql_v3.query_double_ord_ore +--! @param b public.double_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_double_ord_ore, b public.double_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_aggregates.sql +--! @brief Aggregates for public.double_ord. + +--! @brief State function for min on public.double_ord. +--! @param state public.double_ord +--! @param value public.double_ord +--! @return public.double_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.double_ord, value public.double_ord) +RETURNS public.double_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.double_ord. +--! @param input public.double_ord +--! @return public.double_ord +CREATE AGGREGATE eql_v3.min(public.double_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.double_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.double_ord. +--! @param state public.double_ord +--! @param value public.double_ord +--! @return public.double_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.double_ord, value public.double_ord) +RETURNS public.double_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.double_ord. +--! @param input public.double_ord +--! @return public.double_ord +CREATE AGGREGATE eql_v3.max(public.double_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.double_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_ope_aggregates.sql +--! @brief Aggregates for public.double_ord_ope. + +--! @brief State function for min on public.double_ord_ope. +--! @param state public.double_ord_ope +--! @param value public.double_ord_ope +--! @return public.double_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.double_ord_ope, value public.double_ord_ope) +RETURNS public.double_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.double_ord_ope. +--! @param input public.double_ord_ope +--! @return public.double_ord_ope +CREATE AGGREGATE eql_v3.min(public.double_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.double_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.double_ord_ope. +--! @param state public.double_ord_ope +--! @param value public.double_ord_ope +--! @return public.double_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.double_ord_ope, value public.double_ord_ope) +RETURNS public.double_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.double_ord_ope. +--! @param input public.double_ord_ope +--! @return public.double_ord_ope +CREATE AGGREGATE eql_v3.max(public.double_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.double_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_operators.sql +--! @brief Operators for public.double. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.double +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.double, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.double, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.double, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.double, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.double, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.double, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.double, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.double, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double, RIGHTARG = public.double +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.double +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_eq_operators.sql +--! @brief Operators for eql_v3.query_double_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_eq, RIGHTARG = eql_v3.query_double_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_double_eq, RIGHTARG = public.double_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_eq, RIGHTARG = eql_v3.query_double_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_double_eq, RIGHTARG = public.double_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_double_ord_ope. + +--! @brief Index extractor for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_double_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a public.double_ord_ope +--! @param b eql_v3.query_double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.double_ord_ope, b eql_v3.query_double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a public.double_ord_ope +--! @param b eql_v3.query_double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.double_ord_ope, b eql_v3.query_double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a public.double_ord_ope +--! @param b eql_v3.query_double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.double_ord_ope, b eql_v3.query_double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a public.double_ord_ope +--! @param b eql_v3.query_double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.double_ord_ope, b eql_v3.query_double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a public.double_ord_ope +--! @param b eql_v3.query_double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.double_ord_ope, b eql_v3.query_double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a public.double_ord_ope +--! @param b eql_v3.query_double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.double_ord_ope, b eql_v3.query_double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_double_ord_ope. +--! @param a eql_v3.query_double_ord_ope +--! @param b public.double_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_double_ord_ope, b public.double_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_eq_operators.sql +--! @brief Operators for public.double_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.double_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.double_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.double_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.double_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.double_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.double_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.double_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.double_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.double_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.double_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.double_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.double_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.double_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.double_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_eq, RIGHTARG = public.double_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.double_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.double_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_double_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord_ore, RIGHTARG = eql_v3.query_double_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord_ore, RIGHTARG = eql_v3.query_double_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord_ore, RIGHTARG = eql_v3.query_double_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord_ore, RIGHTARG = eql_v3.query_double_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord_ore, RIGHTARG = eql_v3.query_double_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord_ore, RIGHTARG = eql_v3.query_double_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_double_ord_ore, RIGHTARG = public.double_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_ord_operators.sql +--! @brief Operators for eql_v3.query_double_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord, RIGHTARG = eql_v3.query_double_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord, RIGHTARG = eql_v3.query_double_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord, RIGHTARG = eql_v3.query_double_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord, RIGHTARG = eql_v3.query_double_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord, RIGHTARG = eql_v3.query_double_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord, RIGHTARG = eql_v3.query_double_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_double_ord, RIGHTARG = public.double_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/double_ord_ore_aggregates.sql +--! @brief Aggregates for public.double_ord_ore. + +--! @brief State function for min on public.double_ord_ore. +--! @param state public.double_ord_ore +--! @param value public.double_ord_ore +--! @return public.double_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.double_ord_ore, value public.double_ord_ore) +RETURNS public.double_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.double_ord_ore. +--! @param input public.double_ord_ore +--! @return public.double_ord_ore +CREATE AGGREGATE eql_v3.min(public.double_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.double_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.double_ord_ore. +--! @param state public.double_ord_ore +--! @param value public.double_ord_ore +--! @return public.double_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.double_ord_ore, value public.double_ord_ore) +RETURNS public.double_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.double_ord_ore. +--! @param input public.double_ord_ore +--! @return public.double_ord_ore +CREATE AGGREGATE eql_v3.max(public.double_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.double_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/double/query_double_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_double_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.double_ord_ope, RIGHTARG = eql_v3.query_double_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.double_ord_ope, RIGHTARG = eql_v3.query_double_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.double_ord_ope, RIGHTARG = eql_v3.query_double_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.double_ord_ope, RIGHTARG = eql_v3.query_double_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.double_ord_ope, RIGHTARG = eql_v3.query_double_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.double_ord_ope, RIGHTARG = eql_v3.query_double_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_double_ord_ope, RIGHTARG = public.double_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_aggregates.sql +--! @brief Aggregates for public.integer_ord. + +--! @brief State function for min on public.integer_ord. +--! @param state public.integer_ord +--! @param value public.integer_ord +--! @return public.integer_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.integer_ord, value public.integer_ord) +RETURNS public.integer_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.integer_ord. +--! @param input public.integer_ord +--! @return public.integer_ord +CREATE AGGREGATE eql_v3.min(public.integer_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.integer_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.integer_ord. +--! @param state public.integer_ord +--! @param value public.integer_ord +--! @return public.integer_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.integer_ord, value public.integer_ord) +RETURNS public.integer_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.integer_ord. +--! @param input public.integer_ord +--! @return public.integer_ord +CREATE AGGREGATE eql_v3.max(public.integer_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.integer_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_ore_aggregates.sql +--! @brief Aggregates for public.integer_ord_ore. + +--! @brief State function for min on public.integer_ord_ore. +--! @param state public.integer_ord_ore +--! @param value public.integer_ord_ore +--! @return public.integer_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.integer_ord_ore, value public.integer_ord_ore) +RETURNS public.integer_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.integer_ord_ore. +--! @param input public.integer_ord_ore +--! @return public.integer_ord_ore +CREATE AGGREGATE eql_v3.min(public.integer_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.integer_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.integer_ord_ore. +--! @param state public.integer_ord_ore +--! @param value public.integer_ord_ore +--! @return public.integer_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.integer_ord_ore, value public.integer_ord_ore) +RETURNS public.integer_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.integer_ord_ore. +--! @param input public.integer_ord_ore +--! @return public.integer_ord_ore +CREATE AGGREGATE eql_v3.max(public.integer_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.integer_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_integer_ord_ore. + +--! @brief Index extractor for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_integer_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b eql_v3.query_integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord_ore, b eql_v3.query_integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b eql_v3.query_integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord_ore, b eql_v3.query_integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b eql_v3.query_integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord_ore, b eql_v3.query_integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b eql_v3.query_integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord_ore, b eql_v3.query_integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b eql_v3.query_integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord_ore, b eql_v3.query_integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a public.integer_ord_ore +--! @param b eql_v3.query_integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord_ore, b eql_v3.query_integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ore. +--! @param a eql_v3.query_integer_ord_ore +--! @param b public.integer_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_integer_ord_ore, b public.integer_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_ope_operators.sql +--! @brief Operators for public.integer_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.integer_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.integer_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.integer_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.integer_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.integer_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.integer_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_ord_ope, RIGHTARG = public.integer_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.integer_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_integer_ord_ope. + +--! @brief Index extractor for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_integer_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b eql_v3.query_integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord_ope, b eql_v3.query_integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b eql_v3.query_integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord_ope, b eql_v3.query_integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b eql_v3.query_integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord_ope, b eql_v3.query_integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b eql_v3.query_integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord_ope, b eql_v3.query_integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b eql_v3.query_integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord_ope, b eql_v3.query_integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a public.integer_ord_ope +--! @param b eql_v3.query_integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord_ope, b eql_v3.query_integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord_ope. +--! @param a eql_v3.query_integer_ord_ope +--! @param b public.integer_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_integer_ord_ope, b public.integer_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_operators.sql +--! @brief Operators for public.integer. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.integer +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.integer, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.integer, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.integer, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.integer, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.integer, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.integer, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.integer, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.integer, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer, RIGHTARG = public.integer +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.integer +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_eq_operators.sql +--! @brief Operators for eql_v3.query_integer_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_eq, RIGHTARG = eql_v3.query_integer_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_integer_eq, RIGHTARG = public.integer_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_eq, RIGHTARG = eql_v3.query_integer_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_integer_eq, RIGHTARG = public.integer_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_ord_functions.sql +--! @brief Functions for eql_v3.query_integer_ord. + +--! @brief Index extractor for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_integer_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a public.integer_ord +--! @param b eql_v3.query_integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.integer_ord, b eql_v3.query_integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a public.integer_ord +--! @param b eql_v3.query_integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.integer_ord, b eql_v3.query_integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a public.integer_ord +--! @param b eql_v3.query_integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.integer_ord, b eql_v3.query_integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a public.integer_ord +--! @param b eql_v3.query_integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.integer_ord, b eql_v3.query_integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a public.integer_ord +--! @param b eql_v3.query_integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.integer_ord, b eql_v3.query_integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a public.integer_ord +--! @param b eql_v3.query_integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.integer_ord, b eql_v3.query_integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_integer_ord. +--! @param a eql_v3.query_integer_ord +--! @param b public.integer_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_integer_ord, b public.integer_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_integer_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord_ore, RIGHTARG = eql_v3.query_integer_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord_ore, RIGHTARG = eql_v3.query_integer_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord_ore, RIGHTARG = eql_v3.query_integer_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord_ore, RIGHTARG = eql_v3.query_integer_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord_ore, RIGHTARG = eql_v3.query_integer_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord_ore, RIGHTARG = eql_v3.query_integer_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_integer_ord_ore, RIGHTARG = public.integer_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_eq_operators.sql +--! @brief Operators for public.integer_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.integer_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.integer_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.integer_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.integer_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.integer_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.integer_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.integer_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.integer_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.integer_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.integer_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.integer_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.integer_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.integer_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_eq, RIGHTARG = public.integer_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.integer_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.integer_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_ord_operators.sql +--! @brief Operators for eql_v3.query_integer_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord, RIGHTARG = eql_v3.query_integer_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord, RIGHTARG = eql_v3.query_integer_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord, RIGHTARG = eql_v3.query_integer_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord, RIGHTARG = eql_v3.query_integer_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord, RIGHTARG = eql_v3.query_integer_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord, RIGHTARG = eql_v3.query_integer_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_integer_ord, RIGHTARG = public.integer_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/integer_ord_ope_aggregates.sql +--! @brief Aggregates for public.integer_ord_ope. + +--! @brief State function for min on public.integer_ord_ope. +--! @param state public.integer_ord_ope +--! @param value public.integer_ord_ope +--! @return public.integer_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.integer_ord_ope, value public.integer_ord_ope) +RETURNS public.integer_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.integer_ord_ope. +--! @param input public.integer_ord_ope +--! @return public.integer_ord_ope +CREATE AGGREGATE eql_v3.min(public.integer_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.integer_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.integer_ord_ope. +--! @param state public.integer_ord_ope +--! @param value public.integer_ord_ope +--! @return public.integer_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.integer_ord_ope, value public.integer_ord_ope) +RETURNS public.integer_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.integer_ord_ope. +--! @param input public.integer_ord_ope +--! @return public.integer_ord_ope +CREATE AGGREGATE eql_v3.max(public.integer_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.integer_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/integer/query_integer_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_integer_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.integer_ord_ope, RIGHTARG = eql_v3.query_integer_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.integer_ord_ope, RIGHTARG = eql_v3.query_integer_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.integer_ord_ope, RIGHTARG = eql_v3.query_integer_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.integer_ord_ope, RIGHTARG = eql_v3.query_integer_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.integer_ord_ope, RIGHTARG = eql_v3.query_integer_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.integer_ord_ope, RIGHTARG = eql_v3.query_integer_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_integer_ord_ope, RIGHTARG = public.integer_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file v3/scalars/ore_fallback.sql +--! @brief Disable the ORE-backed encrypted domains when the ORE operator class is absent (CIP-3468). +--! +--! Runs after the DO block in src/v3/sem/ore_block_256/operator_class.sql, +--! which ATTEMPTS to create the default btree operator class for +--! eql_v3_internal.ore_block_256 and skips it on insufficient_privilege +--! (CREATE OPERATOR CLASS requires superuser; managed platforms — cloud +--! Supabase and most hosted Postgres — run the installer as a non-superuser +--! role). When the class was created, this file is a no-op. +--! +--! When the class was skipped, the ORE-carrying domains would otherwise +--! install half-working: `<`/`>` comparisons still run (as unindexable seq +--! scans), while `CREATE INDEX ... (eql_v3.ord_term(col))` and bare +--! `ORDER BY` fail with opaque Postgres errors. Instead of that silent +--! degradation, this file poisons every ORE-carrying domain (and its +--! query-operand twin) with an always-raising CHECK constraint, so the first +--! value coerced into the domain fails loudly and points at the +--! platform-supported alternatives (OPE ordering / HMAC equality / +--! bloom-filter match). +--! +--! Footguns honoured (see the encrypted-domain footgun list in CLAUDE.md): +--! the poison function is LANGUAGE plpgsql (never inlined, so the RAISE +--! cannot be planned away) and NOT STRICT (a STRICT function is skipped for +--! NULL inputs, which would silently let NULLs through the poisoned domain). +--! +--! The poison constraints are added NOT VALID. For domains — unlike table +--! constraints — this does not weaken enforcement: coercion applies every +--! constraint regardless of validation status, so new casts and inserts +--! (including NULL) still raise. What it skips is validating existing stored +--! data: without it, re-running the installer over a database that already +--! holds ORE values (written under an earlier superuser install, before the +--! installing role was demoted) would run the always-raising poison against +--! every stored row and abort the install. + +DO $do$ +BEGIN + IF EXISTS ( + SELECT 1 + FROM pg_catalog.pg_opclass c + JOIN pg_catalog.pg_am am ON am.oid = c.opcmethod + WHERE am.amname = 'btree' + AND c.opcdefault + AND c.opcintype = 'eql_v3_internal.ore_block_256'::pg_catalog.regtype + ) THEN + RETURN; + END IF; + + --! @brief Poison CHECK backing for the ORE-carrying domains on platforms + --! without the ORE operator class. Always raises; never returns. + --! @internal + CREATE FUNCTION eql_v3_internal.ore_domain_unavailable(val jsonb, domain_name text, alternatives text) + RETURNS boolean + IMMUTABLE PARALLEL SAFE + SET search_path = pg_catalog, extensions, public + LANGUAGE plpgsql + AS $poison$ + BEGIN + RAISE EXCEPTION 'EQL: % cannot be used on this platform: the EQL installer could not create the ORE operator class (requires superuser, unavailable on e.g. cloud-hosted Supabase)', domain_name + USING HINT = 'Use ' || alternatives || ' instead.', + ERRCODE = 'feature_not_supported'; + END; + $poison$; + -- NOT VALID: skip validating existing stored data (rows written under an + -- earlier superuser install must stay readable, and re-installing over them + -- must not abort). Domain coercion still enforces the CHECK on every new + -- cast/insert regardless of validation status. + + ALTER DOMAIN public.integer_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.integer_ord_ore', 'public.integer_eq (equality) or public.integer_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_integer_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_integer_ord_ore', 'eql_v3.query_integer_eq (equality) or eql_v3.query_integer_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.integer_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.integer_ord', 'public.integer_eq (equality) or public.integer_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_integer_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_integer_ord', 'eql_v3.query_integer_eq (equality) or eql_v3.query_integer_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.smallint_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.smallint_ord_ore', 'public.smallint_eq (equality) or public.smallint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_smallint_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_smallint_ord_ore', 'eql_v3.query_smallint_eq (equality) or eql_v3.query_smallint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.smallint_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.smallint_ord', 'public.smallint_eq (equality) or public.smallint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_smallint_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_smallint_ord', 'eql_v3.query_smallint_eq (equality) or eql_v3.query_smallint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.bigint_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.bigint_ord_ore', 'public.bigint_eq (equality) or public.bigint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_bigint_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_bigint_ord_ore', 'eql_v3.query_bigint_eq (equality) or eql_v3.query_bigint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.bigint_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.bigint_ord', 'public.bigint_eq (equality) or public.bigint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_bigint_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_bigint_ord', 'eql_v3.query_bigint_eq (equality) or eql_v3.query_bigint_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.date_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.date_ord_ore', 'public.date_eq (equality) or public.date_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_date_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_date_ord_ore', 'eql_v3.query_date_eq (equality) or eql_v3.query_date_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.date_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.date_ord', 'public.date_eq (equality) or public.date_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_date_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_date_ord', 'eql_v3.query_date_eq (equality) or eql_v3.query_date_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.timestamp_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.timestamp_ord_ore', 'public.timestamp_eq (equality) or public.timestamp_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_timestamp_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_timestamp_ord_ore', 'eql_v3.query_timestamp_eq (equality) or eql_v3.query_timestamp_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.timestamp_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.timestamp_ord', 'public.timestamp_eq (equality) or public.timestamp_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_timestamp_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_timestamp_ord', 'eql_v3.query_timestamp_eq (equality) or eql_v3.query_timestamp_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.numeric_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.numeric_ord_ore', 'public.numeric_eq (equality) or public.numeric_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_numeric_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_numeric_ord_ore', 'eql_v3.query_numeric_eq (equality) or eql_v3.query_numeric_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.numeric_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.numeric_ord', 'public.numeric_eq (equality) or public.numeric_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_numeric_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_numeric_ord', 'eql_v3.query_numeric_eq (equality) or eql_v3.query_numeric_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.text_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.text_ord_ore', 'public.text_eq (equality) or public.text_match (match) or public.text_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_text_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_text_ord_ore', 'eql_v3.query_text_eq (equality) or eql_v3.query_text_match (match) or eql_v3.query_text_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.text_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.text_ord', 'public.text_eq (equality) or public.text_match (match) or public.text_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_text_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_text_ord', 'eql_v3.query_text_eq (equality) or eql_v3.query_text_match (match) or eql_v3.query_text_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.text_search ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.text_search', 'public.text_eq (equality) or public.text_match (match) or public.text_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_text_search ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_text_search', 'eql_v3.query_text_eq (equality) or eql_v3.query_text_match (match) or eql_v3.query_text_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.real_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.real_ord_ore', 'public.real_eq (equality) or public.real_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_real_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_real_ord_ore', 'eql_v3.query_real_eq (equality) or eql_v3.query_real_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.real_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.real_ord', 'public.real_eq (equality) or public.real_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_real_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_real_ord', 'eql_v3.query_real_eq (equality) or eql_v3.query_real_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.double_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.double_ord_ore', 'public.double_eq (equality) or public.double_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_double_ord_ore ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_double_ord_ore', 'eql_v3.query_double_eq (equality) or eql_v3.query_double_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN public.double_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'public.double_ord', 'public.double_eq (equality) or public.double_ord_ope (ordering)')) NOT VALID; + + ALTER DOMAIN eql_v3.query_double_ord ADD CONSTRAINT eql_ore_unavailable + CHECK (eql_v3_internal.ore_domain_unavailable(VALUE, 'eql_v3.query_double_ord', 'eql_v3.query_double_eq (equality) or eql_v3.query_double_ord_ope (ordering)')) NOT VALID; + + RAISE NOTICE 'EQL: ORE operator class absent (creation requires superuser) — 38 ORE-backed domains disabled and will raise on use; use the _ord_ope (ordering) and _eq (equality) domains — and text_match for text pattern match — instead'; +END; +$do$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_match_functions.sql +--! @brief Functions for eql_v3.query_text_match. + +--! @brief Index extractor for eql_v3.query_text_match. +--! @param a eql_v3.query_text_match +--! @return eql_v3_internal.bloom_filter +CREATE FUNCTION eql_v3.match_term(a eql_v3.query_text_match) +RETURNS eql_v3_internal.bloom_filter +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.bloom_filter(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_text_match. +--! @param a public.text_match +--! @param b eql_v3.query_text_match +--! @return boolean +CREATE FUNCTION eql_v3.contains(a public.text_match, b eql_v3.query_text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_match. +--! @param a eql_v3.query_text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3.contains(a eql_v3.query_text_match, b public.text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_match. +--! @param a public.text_match +--! @param b eql_v3.query_text_match +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a public.text_match, b eql_v3.query_text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_match. +--! @param a eql_v3.query_text_match +--! @param b public.text_match +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a eql_v3.query_text_match, b public.text_match) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_functions.sql +--! @brief Functions for public.text. + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.text, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param selector text +--! @return public.text +CREATE FUNCTION eql_v3_internal."->"(a public.text, selector text) +RETURNS public.text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param selector integer +--! @return public.text +CREATE FUNCTION eql_v3_internal."->"(a public.text, selector integer) +RETURNS public.text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param selector public.text +--! @return public.text +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.text) +RETURNS public.text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.text, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param selector public.text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.text, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.text, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.text, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.text, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.text, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.text, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.text, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.text, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.text, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b public.text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text, b public.text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a public.text +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.text, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.text. +--! @param a jsonb +--! @param b public.text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.text'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_text_ord_ope. + +--! @brief Index extractor for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_text_ord_ope) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_text_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a public.text_ord_ope +--! @param b eql_v3.query_text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord_ope, b eql_v3.query_text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a public.text_ord_ope +--! @param b eql_v3.query_text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord_ope, b eql_v3.query_text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a public.text_ord_ope +--! @param b eql_v3.query_text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord_ope, b eql_v3.query_text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a public.text_ord_ope +--! @param b eql_v3.query_text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord_ope, b eql_v3.query_text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a public.text_ord_ope +--! @param b eql_v3.query_text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord_ope, b eql_v3.query_text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a public.text_ord_ope +--! @param b eql_v3.query_text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord_ope, b eql_v3.query_text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ope. +--! @param a eql_v3.query_text_ord_ope +--! @param b public.text_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_text_ord_ope, b public.text_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_ord_operators.sql +--! @brief Operators for eql_v3.query_text_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord, RIGHTARG = eql_v3.query_text_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord, RIGHTARG = eql_v3.query_text_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord, RIGHTARG = eql_v3.query_text_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord, RIGHTARG = eql_v3.query_text_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord, RIGHTARG = eql_v3.query_text_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord, RIGHTARG = eql_v3.query_text_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_text_ord, RIGHTARG = public.text_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_eq_functions.sql +--! @brief Functions for eql_v3.query_text_eq. + +--! @brief Index extractor for eql_v3.query_text_eq. +--! @param a eql_v3.query_text_eq +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_text_eq) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_text_eq. +--! @param a public.text_eq +--! @param b eql_v3.query_text_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_eq, b eql_v3.query_text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_eq. +--! @param a eql_v3.query_text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_text_eq, b public.text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_eq. +--! @param a public.text_eq +--! @param b eql_v3.query_text_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_eq, b eql_v3.query_text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_eq. +--! @param a eql_v3.query_text_eq +--! @param b public.text_eq +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_text_eq, b public.text_eq) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_match_operators.sql +--! @brief Operators for public.text_match. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = public.text_match, RIGHTARG = public.text_match, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = public.text_match, RIGHTARG = jsonb, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = jsonb, RIGHTARG = public.text_match, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = public.text_match, RIGHTARG = public.text_match, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = public.text_match, RIGHTARG = jsonb, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text_match, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_match, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_match, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_match, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_match, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text_match +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text_match, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text_match, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text_match, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text_match, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text_match, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text_match, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text_match, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_match, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_match, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_match, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text_match, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_match, RIGHTARG = public.text_match +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_match, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text_match +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_search_operators.sql +--! @brief Operators for public.text_search. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = public.text_search, RIGHTARG = public.text_search, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = public.text_search, RIGHTARG = jsonb, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text_search, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_search, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_search, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text_search +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_search, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_search, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text_search +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text_search, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text_search, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text_search, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text_search, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text_search, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text_search, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text_search, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_search, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_search, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_search, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text_search, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_search, RIGHTARG = public.text_search +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_search, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text_search +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_text_ord_ore. + +--! @brief Index extractor for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_text_ord_ore) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_text_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a public.text_ord_ore +--! @param b eql_v3.query_text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_ord_ore, b eql_v3.query_text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a public.text_ord_ore +--! @param b eql_v3.query_text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_ord_ore, b eql_v3.query_text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a public.text_ord_ore +--! @param b eql_v3.query_text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_ord_ore, b eql_v3.query_text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a public.text_ord_ore +--! @param b eql_v3.query_text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_ord_ore, b eql_v3.query_text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a public.text_ord_ore +--! @param b eql_v3.query_text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_ord_ore, b eql_v3.query_text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a public.text_ord_ore +--! @param b eql_v3.query_text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_ord_ore, b eql_v3.query_text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_ord_ore. +--! @param a eql_v3.query_text_ord_ore +--! @param b public.text_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_text_ord_ore, b public.text_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_search_functions.sql +--! @brief Functions for eql_v3.query_text_search. + +--! @brief Index extractor for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @return eql_v3_internal.hmac_256 +CREATE FUNCTION eql_v3.eq_term(a eql_v3.query_text_search) +RETURNS eql_v3_internal.hmac_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.hmac_256(a::jsonb) $$; + +--! @brief Index extractor for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_text_search) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Index extractor for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @return eql_v3_internal.bloom_filter +CREATE FUNCTION eql_v3.match_term(a eql_v3.query_text_search) +RETURNS eql_v3_internal.bloom_filter +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.bloom_filter(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.contains(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.contains(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) @> eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a public.text_search +--! @param b eql_v3.query_text_search +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a public.text_search, b eql_v3.query_text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_text_search. +--! @param a eql_v3.query_text_search +--! @param b public.text_search +--! @return boolean +CREATE FUNCTION eql_v3.contained_by(a eql_v3.query_text_search, b public.text_search) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.match_term(a) <@ eql_v3.match_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_eq_operators.sql +--! @brief Operators for public.text_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.text_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.text_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_eq, RIGHTARG = public.text_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_ore_aggregates.sql +--! @brief Aggregates for public.text_ord_ore. + +--! @brief State function for min on public.text_ord_ore. +--! @param state public.text_ord_ore +--! @param value public.text_ord_ore +--! @return public.text_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.text_ord_ore, value public.text_ord_ore) +RETURNS public.text_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.text_ord_ore. +--! @param input public.text_ord_ore +--! @return public.text_ord_ore +CREATE AGGREGATE eql_v3.min(public.text_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.text_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.text_ord_ore. +--! @param state public.text_ord_ore +--! @param value public.text_ord_ore +--! @return public.text_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.text_ord_ore, value public.text_ord_ore) +RETURNS public.text_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.text_ord_ore. +--! @param input public.text_ord_ore +--! @return public.text_ord_ore +CREATE AGGREGATE eql_v3.max(public.text_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.text_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_aggregates.sql +--! @brief Aggregates for public.text_ord. + +--! @brief State function for min on public.text_ord. +--! @param state public.text_ord +--! @param value public.text_ord +--! @return public.text_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.text_ord, value public.text_ord) +RETURNS public.text_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.text_ord. +--! @param input public.text_ord +--! @return public.text_ord +CREATE AGGREGATE eql_v3.min(public.text_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.text_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.text_ord. +--! @param state public.text_ord +--! @param value public.text_ord +--! @return public.text_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.text_ord, value public.text_ord) +RETURNS public.text_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.text_ord. +--! @param input public.text_ord +--! @return public.text_ord +CREATE AGGREGATE eql_v3.max(public.text_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.text_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_text_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord_ope, RIGHTARG = eql_v3.query_text_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord_ope, RIGHTARG = eql_v3.query_text_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord_ope, RIGHTARG = eql_v3.query_text_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord_ope, RIGHTARG = eql_v3.query_text_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord_ope, RIGHTARG = eql_v3.query_text_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord_ope, RIGHTARG = eql_v3.query_text_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_ope_operators.sql +--! @brief Operators for public.text_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text_ord_ope, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord_ope, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord_ope, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text_ord_ope, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_ord_ope, RIGHTARG = public.text_ord_ope +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text_ord_ope, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text_ord_ope +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_ord_ope_aggregates.sql +--! @brief Aggregates for public.text_ord_ope. + +--! @brief State function for min on public.text_ord_ope. +--! @param state public.text_ord_ope +--! @param value public.text_ord_ope +--! @return public.text_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.text_ord_ope, value public.text_ord_ope) +RETURNS public.text_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.text_ord_ope. +--! @param input public.text_ord_ope +--! @return public.text_ord_ope +CREATE AGGREGATE eql_v3.min(public.text_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.text_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.text_ord_ope. +--! @param state public.text_ord_ope +--! @param value public.text_ord_ope +--! @return public.text_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.text_ord_ope, value public.text_ord_ope) +RETURNS public.text_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.text_ord_ope. +--! @param input public.text_ord_ope +--! @return public.text_ord_ope +CREATE AGGREGATE eql_v3.max(public.text_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.text_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_match_operators.sql +--! @brief Operators for eql_v3.query_text_match. + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = public.text_match, RIGHTARG = eql_v3.query_text_match, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = eql_v3.query_text_match, RIGHTARG = public.text_match, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = public.text_match, RIGHTARG = eql_v3.query_text_match, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = eql_v3.query_text_match, RIGHTARG = public.text_match, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_operators.sql +--! @brief Operators for public.text. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.text, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.text, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.text +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.text, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.text, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.text, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.text, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.text, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.text, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.text, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.text, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.text, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text, RIGHTARG = public.text +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.text, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.text +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/text_search_aggregates.sql +--! @brief Aggregates for public.text_search. + +--! @brief State function for min on public.text_search. +--! @param state public.text_search +--! @param value public.text_search +--! @return public.text_search +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.text_search, value public.text_search) +RETURNS public.text_search +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.text_search. +--! @param input public.text_search +--! @return public.text_search +CREATE AGGREGATE eql_v3.min(public.text_search) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.text_search, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.text_search. +--! @param state public.text_search +--! @param value public.text_search +--! @return public.text_search +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.text_search, value public.text_search) +RETURNS public.text_search +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.text_search. +--! @param input public.text_search +--! @return public.text_search +CREATE AGGREGATE eql_v3.max(public.text_search) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.text_search, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_search_operators.sql +--! @brief Operators for eql_v3.query_text_search. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3.contains, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = <@, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = public.text_search, RIGHTARG = eql_v3.query_text_search, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3.contained_by, + LEFTARG = eql_v3.query_text_search, RIGHTARG = public.text_search, + COMMUTATOR = @>, RESTRICT = contsel, JOIN = contjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_eq_operators.sql +--! @brief Operators for eql_v3.query_text_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_eq, RIGHTARG = eql_v3.query_text_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_text_eq, RIGHTARG = public.text_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_eq, RIGHTARG = eql_v3.query_text_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_text_eq, RIGHTARG = public.text_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/text/query_text_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_text_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.text_ord_ore, RIGHTARG = eql_v3.query_text_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.text_ord_ore, RIGHTARG = eql_v3.query_text_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.text_ord_ore, RIGHTARG = eql_v3.query_text_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.text_ord_ore, RIGHTARG = eql_v3.query_text_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.text_ord_ore, RIGHTARG = eql_v3.query_text_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.text_ord_ore, RIGHTARG = eql_v3.query_text_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_text_ord_ore, RIGHTARG = public.text_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_functions.sql +--! @brief Functions for public.timestamp. + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.eq(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.neq(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.lt(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.lte(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.gt(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.gte(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '>=', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.contains(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a public.timestamp, b jsonb) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return boolean +CREATE FUNCTION eql_v3_internal.contained_by(a jsonb, b public.timestamp) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '<@', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param selector text +--! @return public.timestamp +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp, selector text) +RETURNS public.timestamp IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param selector integer +--! @return public.timestamp +CREATE FUNCTION eql_v3_internal."->"(a public.timestamp, selector integer) +RETURNS public.timestamp IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param selector public.timestamp +--! @return public.timestamp +CREATE FUNCTION eql_v3_internal."->"(a jsonb, selector public.timestamp) +RETURNS public.timestamp IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param selector text +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp, selector text) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param selector integer +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a public.timestamp, selector integer) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param selector public.timestamp +--! @return text +CREATE FUNCTION eql_v3_internal."->>"(a jsonb, selector public.timestamp) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '->>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text +--! @return boolean +CREATE FUNCTION eql_v3_internal."?"(a public.timestamp, b text) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?|"(a public.timestamp, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?|', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text[] +--! @return boolean +CREATE FUNCTION eql_v3_internal."?&"(a public.timestamp, b text[]) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '?&', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@?"(a public.timestamp, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@?', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonpath +--! @return boolean +CREATE FUNCTION eql_v3_internal."@@"(a public.timestamp, b jsonpath) +RETURNS boolean IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '@@', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#>"(a public.timestamp, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text[] +--! @return text +CREATE FUNCTION eql_v3_internal."#>>"(a public.timestamp, b text[]) +RETURNS text IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#>>', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp, b text) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b integer +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp, b integer) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."-"(a public.timestamp, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '-', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b text[] +--! @return jsonb +CREATE FUNCTION eql_v3_internal."#-"(a public.timestamp, b text[]) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '#-', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b public.timestamp +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp, b public.timestamp) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a public.timestamp +--! @param b jsonb +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a public.timestamp, b jsonb) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; + +--! @brief Unsupported operator blocker for public.timestamp. +--! @param a jsonb +--! @param b public.timestamp +--! @return jsonb +CREATE FUNCTION eql_v3_internal."||"(a jsonb, b public.timestamp) +RETURNS jsonb IMMUTABLE PARALLEL SAFE +AS $$ BEGIN RAISE EXCEPTION 'operator % is not supported for %', '||', 'public.timestamp'; END; $$ +LANGUAGE plpgsql; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_aggregates.sql +--! @brief Aggregates for public.timestamp_ord. + +--! @brief State function for min on public.timestamp_ord. +--! @param state public.timestamp_ord +--! @param value public.timestamp_ord +--! @return public.timestamp_ord +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.timestamp_ord, value public.timestamp_ord) +RETURNS public.timestamp_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.timestamp_ord. +--! @param input public.timestamp_ord +--! @return public.timestamp_ord +CREATE AGGREGATE eql_v3.min(public.timestamp_ord) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.timestamp_ord, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.timestamp_ord. +--! @param state public.timestamp_ord +--! @param value public.timestamp_ord +--! @return public.timestamp_ord +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.timestamp_ord, value public.timestamp_ord) +RETURNS public.timestamp_ord +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.timestamp_ord. +--! @param input public.timestamp_ord +--! @return public.timestamp_ord +CREATE AGGREGATE eql_v3.max(public.timestamp_ord) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.timestamp_ord, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_ord_ore_functions.sql +--! @brief Functions for eql_v3.query_timestamp_ord_ore. + +--! @brief Index extractor for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_timestamp_ord_ore) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b eql_v3.query_timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord_ore, b eql_v3.query_timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b eql_v3.query_timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord_ore, b eql_v3.query_timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b eql_v3.query_timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord_ore, b eql_v3.query_timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b eql_v3.query_timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord_ore, b eql_v3.query_timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b eql_v3.query_timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord_ore, b eql_v3.query_timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a public.timestamp_ord_ore +--! @param b eql_v3.query_timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord_ore, b eql_v3.query_timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ore. +--! @param a eql_v3.query_timestamp_ord_ore +--! @param b public.timestamp_ord_ore +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_timestamp_ord_ore, b public.timestamp_ord_ore) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_eq_operators.sql +--! @brief Operators for eql_v3.query_timestamp_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_eq, RIGHTARG = eql_v3.query_timestamp_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_timestamp_eq, RIGHTARG = public.timestamp_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_eq, RIGHTARG = eql_v3.query_timestamp_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_timestamp_eq, RIGHTARG = public.timestamp_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_eq_operators.sql +--! @brief Operators for public.timestamp_eq. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_eq, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp_eq, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_eq, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp_eq, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.timestamp_eq, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.timestamp_eq, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.timestamp_eq, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.timestamp_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.timestamp_eq, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.timestamp_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.timestamp_eq, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_eq, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_eq, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp_eq, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.timestamp_eq, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_eq, RIGHTARG = public.timestamp_eq +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp_eq, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.timestamp_eq +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_ord_ope_functions.sql +--! @brief Functions for eql_v3.query_timestamp_ord_ope. + +--! @brief Index extractor for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @return eql_v3_internal.ope_cllw +CREATE FUNCTION eql_v3.ord_ope_term(a eql_v3.query_timestamp_ord_ope) +RETURNS eql_v3_internal.ope_cllw +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ope_cllw(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b eql_v3.query_timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord_ope, b eql_v3.query_timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) = eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b eql_v3.query_timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord_ope, b eql_v3.query_timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <> eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b eql_v3.query_timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord_ope, b eql_v3.query_timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b eql_v3.query_timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord_ope, b eql_v3.query_timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b eql_v3.query_timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord_ope, b eql_v3.query_timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a public.timestamp_ord_ope +--! @param b eql_v3.query_timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord_ope, b eql_v3.query_timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord_ope. +--! @param a eql_v3.query_timestamp_ord_ope +--! @param b public.timestamp_ord_ope +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_timestamp_ord_ope, b public.timestamp_ord_ope) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_ope_aggregates.sql +--! @brief Aggregates for public.timestamp_ord_ope. + +--! @brief State function for min on public.timestamp_ord_ope. +--! @param state public.timestamp_ord_ope +--! @param value public.timestamp_ord_ope +--! @return public.timestamp_ord_ope +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.timestamp_ord_ope, value public.timestamp_ord_ope) +RETURNS public.timestamp_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.timestamp_ord_ope. +--! @param input public.timestamp_ord_ope +--! @return public.timestamp_ord_ope +CREATE AGGREGATE eql_v3.min(public.timestamp_ord_ope) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.timestamp_ord_ope, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.timestamp_ord_ope. +--! @param state public.timestamp_ord_ope +--! @param value public.timestamp_ord_ope +--! @return public.timestamp_ord_ope +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.timestamp_ord_ope, value public.timestamp_ord_ope) +RETURNS public.timestamp_ord_ope +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.timestamp_ord_ope. +--! @param input public.timestamp_ord_ope +--! @return public.timestamp_ord_ope +CREATE AGGREGATE eql_v3.max(public.timestamp_ord_ope) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.timestamp_ord_ope, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_ord_functions.sql +--! @brief Functions for eql_v3.query_timestamp_ord. + +--! @brief Index extractor for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @return eql_v3_internal.ore_block_256 +CREATE FUNCTION eql_v3.ord_term(a eql_v3.query_timestamp_ord) +RETURNS eql_v3_internal.ore_block_256 +LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3_internal.ore_block_256(a::jsonb) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a public.timestamp_ord +--! @param b eql_v3.query_timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a public.timestamp_ord, b eql_v3.query_timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.eq(a eql_v3.query_timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) = eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a public.timestamp_ord +--! @param b eql_v3.query_timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a public.timestamp_ord, b eql_v3.query_timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.neq(a eql_v3.query_timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <> eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a public.timestamp_ord +--! @param b eql_v3.query_timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a public.timestamp_ord, b eql_v3.query_timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lt(a eql_v3.query_timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) < eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a public.timestamp_ord +--! @param b eql_v3.query_timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a public.timestamp_ord, b eql_v3.query_timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.lte(a eql_v3.query_timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) <= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a public.timestamp_ord +--! @param b eql_v3.query_timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a public.timestamp_ord, b eql_v3.query_timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gt(a eql_v3.query_timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) > eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a public.timestamp_ord +--! @param b eql_v3.query_timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a public.timestamp_ord, b eql_v3.query_timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; + +--! @brief Operator wrapper for eql_v3.query_timestamp_ord. +--! @param a eql_v3.query_timestamp_ord +--! @param b public.timestamp_ord +--! @return boolean +CREATE FUNCTION eql_v3.gte(a eql_v3.query_timestamp_ord, b public.timestamp_ord) +RETURNS boolean LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ SELECT eql_v3.ord_term(a) >= eql_v3.ord_term(b) $$; +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_ord_ore_operators.sql +--! @brief Operators for eql_v3.query_timestamp_ord_ore. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = eql_v3.query_timestamp_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = eql_v3.query_timestamp_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = eql_v3.query_timestamp_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = eql_v3.query_timestamp_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = eql_v3.query_timestamp_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord_ore, RIGHTARG = eql_v3.query_timestamp_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_timestamp_ord_ore, RIGHTARG = public.timestamp_ord_ore, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_ord_ore_aggregates.sql +--! @brief Aggregates for public.timestamp_ord_ore. + +--! @brief State function for min on public.timestamp_ord_ore. +--! @param state public.timestamp_ord_ore +--! @param value public.timestamp_ord_ore +--! @return public.timestamp_ord_ore +CREATE FUNCTION eql_v3_internal.min_sfunc(state public.timestamp_ord_ore, value public.timestamp_ord_ore) +RETURNS public.timestamp_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value < state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate for public.timestamp_ord_ore. +--! @param input public.timestamp_ord_ore +--! @return public.timestamp_ord_ore +CREATE AGGREGATE eql_v3.min(public.timestamp_ord_ore) ( + sfunc = eql_v3_internal.min_sfunc, + stype = public.timestamp_ord_ore, + combinefunc = eql_v3_internal.min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.timestamp_ord_ore. +--! @param state public.timestamp_ord_ore +--! @param value public.timestamp_ord_ore +--! @return public.timestamp_ord_ore +CREATE FUNCTION eql_v3_internal.max_sfunc(state public.timestamp_ord_ore, value public.timestamp_ord_ore) +RETURNS public.timestamp_ord_ore +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + IF value > state THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate for public.timestamp_ord_ore. +--! @param input public.timestamp_ord_ore +--! @return public.timestamp_ord_ore +CREATE AGGREGATE eql_v3.max(public.timestamp_ord_ore) ( + sfunc = eql_v3_internal.max_sfunc, + stype = public.timestamp_ord_ore, + combinefunc = eql_v3_internal.max_sfunc, + parallel = safe +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/timestamp_operators.sql +--! @brief Operators for public.timestamp. + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.eq, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.neq, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.lt, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.lte, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.gt, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.gte, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.contains, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.contained_by, + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp, RIGHTARG = text +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = public.timestamp, RIGHTARG = integer +); + +CREATE OPERATOR -> ( + FUNCTION = eql_v3_internal."->", + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp, RIGHTARG = text +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = public.timestamp, RIGHTARG = integer +); + +CREATE OPERATOR ->> ( + FUNCTION = eql_v3_internal."->>", + LEFTARG = jsonb, RIGHTARG = public.timestamp +); + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal."?", + LEFTARG = public.timestamp, RIGHTARG = text +); + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal."?|", + LEFTARG = public.timestamp, RIGHTARG = text[] +); + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal."?&", + LEFTARG = public.timestamp, RIGHTARG = text[] +); + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal."@?", + LEFTARG = public.timestamp, RIGHTARG = jsonpath +); + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal."@@", + LEFTARG = public.timestamp, RIGHTARG = jsonpath +); + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal."#>", + LEFTARG = public.timestamp, RIGHTARG = text[] +); + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal."#>>", + LEFTARG = public.timestamp, RIGHTARG = text[] +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp, RIGHTARG = text +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp, RIGHTARG = integer +); + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal."-", + LEFTARG = public.timestamp, RIGHTARG = text[] +); + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal."#-", + LEFTARG = public.timestamp, RIGHTARG = text[] +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp, RIGHTARG = public.timestamp +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = public.timestamp, RIGHTARG = jsonb +); + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal."||", + LEFTARG = jsonb, RIGHTARG = public.timestamp +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_ord_operators.sql +--! @brief Operators for eql_v3.query_timestamp_ord. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord, RIGHTARG = eql_v3.query_timestamp_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord, RIGHTARG = eql_v3.query_timestamp_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord, RIGHTARG = eql_v3.query_timestamp_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord, RIGHTARG = eql_v3.query_timestamp_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord, RIGHTARG = eql_v3.query_timestamp_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord, RIGHTARG = eql_v3.query_timestamp_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_timestamp_ord, RIGHTARG = public.timestamp_ord, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); +-- AUTOMATICALLY GENERATED FILE. + +--! @file encrypted_domain/timestamp/query_timestamp_ord_ope_operators.sql +--! @brief Operators for eql_v3.query_timestamp_ord_ope. + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = eql_v3.query_timestamp_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = eql_v3.query_timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = =, NEGATOR = <>, RESTRICT = eqsel, JOIN = eqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = eql_v3.query_timestamp_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = eql_v3.query_timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <>, NEGATOR = =, RESTRICT = neqsel, JOIN = neqjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = eql_v3.query_timestamp_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = eql_v3.query_timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = >, NEGATOR = >=, RESTRICT = scalarltsel, JOIN = scalarltjoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = eql_v3.query_timestamp_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = eql_v3.query_timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = >=, NEGATOR = >, RESTRICT = scalarlesel, JOIN = scalarlejoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = eql_v3.query_timestamp_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = eql_v3.query_timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <, NEGATOR = <=, RESTRICT = scalargtsel, JOIN = scalargtjoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.timestamp_ord_ope, RIGHTARG = eql_v3.query_timestamp_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = eql_v3.query_timestamp_ord_ope, RIGHTARG = public.timestamp_ord_ope, + COMMUTATOR = <=, NEGATOR = <, RESTRICT = scalargesel, JOIN = scalargejoinsel +); + +--! @file v3/jsonb/aggregates.sql +--! @brief min / max aggregates over public.jsonb_entry. +--! +--! SteVec document entries extracted at a selector (`doc -> 'sel'`) order by +--! their CLLW OPE (`op`) term, so the extremum is picked by comparing +--! `eql_v3.ord_ope_term(entry)` rather than the scalar Block-ORE `ord_term` the +--! generated scalar ord aggregates use. The ope_cllw bytea domain orders under +--! native byte comparison, so `<` / `>` on the extracted terms needs no custom +--! comparator. Same STRICT + PARALLEL SAFE shape as the generated scalar +--! `min`/`max` so partial/parallel aggregation is available on large GROUP BY +--! workloads. +--! +--! Per the encrypted-domain footgun rules the state functions are +--! `LANGUAGE plpgsql` with the pinned `search_path` — a `LANGUAGE sql` body would +--! be inlinable and the planner could elide it. +--! +--! @note **Only `op`-carrying entries are orderable.** `eql_v3.ord_ope_term(entry)` +--! returns NULL when an entry has no `op` (CLLW OPE) term — the same entries a +--! `eql_v3.ord_ope_term` btree NULL-filters from range scans. The state functions +--! therefore IGNORE `op`-less entries (they never become or survive as the +--! extremum), so `min`/`max` is well-defined over a mix of `op`-carrying and +--! `op`-less entries and is not corrupted by an `op`-less seed. A naive +--! `ord_ope_term(value) < ord_ope_term(state)` would be NULL whenever either side +--! lacks `op`, pinning a wrong (`op`-less) extremum when the first aggregated +--! row is `op`-less. An all-`op`-less input has no orderable extremum and +--! returns the (arbitrary) STRICT seed. + +--! @brief State function for min on public.jsonb_entry. +--! +--! Keeps whichever orderable entry has the lesser CLLW OPE term. STRICT, so SQL +--! NULL entries are skipped by the aggregate machinery; `op`-less (non-orderable) +--! entries are skipped explicitly (see the @note on this file). +--! +--! @param state public.jsonb_entry Running extremum. +--! @param value public.jsonb_entry Candidate entry. +--! @return public.jsonb_entry The lesser orderable entry by `ord_ope_term`. +CREATE FUNCTION eql_v3_internal.jsonb_entry_min_sfunc( + state public.jsonb_entry, + value public.jsonb_entry +) +RETURNS public.jsonb_entry +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +DECLARE + value_ope eql_v3_internal.ope_cllw := eql_v3.ord_ope_term(value); + state_ope eql_v3_internal.ope_cllw := eql_v3.ord_ope_term(state); +BEGIN + -- A non-orderable (op-less) candidate never replaces the running extremum. + IF value_ope IS NULL THEN + RETURN state; + END IF; + -- Adopt the candidate when the running extremum is itself non-orderable + -- (e.g. an op-less STRICT seed) or strictly greater. + IF state_ope IS NULL OR value_ope < state_ope THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief min aggregate over public.jsonb_entry. +--! @param input public.jsonb_entry +--! @return public.jsonb_entry The entry with the smallest CLLW OPE term. +CREATE AGGREGATE eql_v3.min(public.jsonb_entry) ( + sfunc = eql_v3_internal.jsonb_entry_min_sfunc, + stype = public.jsonb_entry, + combinefunc = eql_v3_internal.jsonb_entry_min_sfunc, + parallel = safe +); + +--! @brief State function for max on public.jsonb_entry. +--! +--! Keeps whichever orderable entry has the greater CLLW OPE term. `op`-less +--! entries are skipped, mirroring `jsonb_entry_min_sfunc` (see the file @note). +--! +--! @param state public.jsonb_entry Running extremum. +--! @param value public.jsonb_entry Candidate entry. +--! @return public.jsonb_entry The greater orderable entry by `ord_ope_term`. +CREATE FUNCTION eql_v3_internal.jsonb_entry_max_sfunc( + state public.jsonb_entry, + value public.jsonb_entry +) +RETURNS public.jsonb_entry +LANGUAGE plpgsql IMMUTABLE STRICT PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +DECLARE + value_ope eql_v3_internal.ope_cllw := eql_v3.ord_ope_term(value); + state_ope eql_v3_internal.ope_cllw := eql_v3.ord_ope_term(state); +BEGIN + -- A non-orderable (op-less) candidate never replaces the running extremum. + IF value_ope IS NULL THEN + RETURN state; + END IF; + -- Adopt the candidate when the running extremum is itself non-orderable + -- (e.g. an op-less STRICT seed) or strictly lesser. + IF state_ope IS NULL OR value_ope > state_ope THEN + RETURN value; + END IF; + RETURN state; +END; +$$; + +--! @brief max aggregate over public.jsonb_entry. +--! @param input public.jsonb_entry +--! @return public.jsonb_entry The entry with the largest CLLW OPE term. +CREATE AGGREGATE eql_v3.max(public.jsonb_entry) ( + sfunc = eql_v3_internal.jsonb_entry_max_sfunc, + stype = public.jsonb_entry, + combinefunc = eql_v3_internal.jsonb_entry_max_sfunc, + parallel = safe +); + +--! @file v3/jsonb/operators.sql +--! @brief Operators on public.json and public.jsonb_entry. + +------------------------------------------------------------------------------ +-- -> field accessor (returns jsonb_entry) +------------------------------------------------------------------------------ + +--! @brief -> operator with text selector. +--! +--! Returns the sv entry whose `s` equals @p selector, with root `i`/`v` merged +--! in. Inlinable: `WHERE col -> 'sel' = $1` reduces structurally to +--! `eql_v3.eq_term(col -> 'sel') = eql_v3.eq_term($1)` and matches a functional +--! index on `eql_v3.eq_term(col -> 'sel')`. +--! +--! @warning The selector operand MUST carry a known type — a text-typed +--! parameter (`$1`, the Proxy interface) or an explicit cast (`col -> 'sel'::%text`). +--! A bare untyped literal (`col -> 'sel'`) resolves to the NATIVE `jsonb -> %text` +--! operator and silently returns native jsonb semantics (a root-key lookup, +--! typically NULL), NOT this operator: PostgreSQL reduces the `public.json` +--! domain to its base type `jsonb` when resolving an unknown-typed RHS, and the +--! native base-type operator wins the exact-match tiebreak. This is intrinsic to +--! the domain type-kind and applies to the native-jsonb blockers too. See +--! the "Typed operands" caveat in docs/reference/json-support.md. +--! +--! @param e public.json Root encrypted payload. +--! @param selector text Selector hash. +--! @return public.jsonb_entry Matching entry merged with root meta, or NULL. +CREATE FUNCTION eql_v3."->"(e public.json, selector text) + RETURNS public.jsonb_entry + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT ( + eql_v3.meta_data(e) || + jsonb_path_query_first( + e, + '$.sv[*] ? (@.s == $sel)'::jsonpath, + jsonb_build_object('sel', selector) + ) + )::public.jsonb_entry +$$; + +CREATE OPERATOR ->( + FUNCTION=eql_v3."->", + LEFTARG=public.json, + RIGHTARG=text +); + +--! @brief -> operator with integer array index (0-based, JSONB convention). +--! @param e public.json Encrypted sv-array payload. +--! @param selector integer Array index. +--! @return public.jsonb_entry Matching entry merged with root meta, or NULL. +CREATE FUNCTION eql_v3."->"(e public.json, selector integer) + RETURNS public.jsonb_entry + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT CASE + WHEN eql_v3_internal.is_ste_vec_array(e) THEN + -- NOTE: `e::jsonb` makes the native-jsonb traversal explicit. `'sv'` is an + -- unknown-typed literal, so `e -> 'sv'` already flattens `public.json` to + -- its base type and binds native `jsonb -> text` (see the @warning above) — + -- the custom `->(public.json, text)` operator does NOT capture a bare + -- untyped literal. The cast documents that intent and guards the `-> selector` + -- (integer) hop from ever resolving to the v3 `->(public.json, integer)` + -- operator instead of native array access. + (eql_v3.meta_data(e) || (e::jsonb -> 'sv' -> selector))::public.jsonb_entry + ELSE NULL + END +$$; + +CREATE OPERATOR ->( + FUNCTION=eql_v3."->", + LEFTARG=public.json, + RIGHTARG=integer +); + +------------------------------------------------------------------------------ +-- ->> field accessor (alias of -> coerced to text) +------------------------------------------------------------------------------ + +--! @brief ->> operator with text selector. Inlinable alias of -> coerced to +--! text. +--! +--! Intentional v2 parity: this serializes the entire matched jsonb_entry +--! object as JSON text. It does not decrypt or return scalar plaintext like +--! native `jsonb ->>`. +--! @param e public.json Encrypted payload. +--! @param selector text Field selector hash. +--! @return text The matching entry as text. +CREATE FUNCTION eql_v3."->>"(e public.json, selector text) + RETURNS text + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3."->"(e, selector)::jsonb::text +$$; + +CREATE OPERATOR ->> ( + FUNCTION=eql_v3."->>", + LEFTARG=public.json, + RIGHTARG=text +); + +--! @brief ->> operator with integer array index. Inlinable alias of +--! ->(json, integer) coerced to text. +--! @param e public.json Encrypted sv-array payload. +--! @param selector integer Array index. +--! @return text The matching entry as text. +CREATE FUNCTION eql_v3."->>"(e public.json, selector integer) + RETURNS text + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3."->"(e, selector)::jsonb::text +$$; + +CREATE OPERATOR ->> ( + FUNCTION=eql_v3."->>", + LEFTARG=public.json, + RIGHTARG=integer +); + +------------------------------------------------------------------------------ +-- @> containment +------------------------------------------------------------------------------ + +--! @brief @> contains operator (document, document). +--! @param a public.json Container. +--! @param b public.json Contained value. +--! @return boolean True if a contains b. +--! @see eql_v3.ste_vec_contains +CREATE FUNCTION eql_v3."@>"(a public.json, b public.json) +RETURNS boolean +LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.ste_vec_contains(a, b) +$$; + +CREATE OPERATOR @>( + FUNCTION=eql_v3."@>", + LEFTARG=public.json, + RIGHTARG=public.json +); + +--! @brief @> contains operator with an query_jsonb needle. +--! +--! Inlines to native `jsonb @>` over `eql_v3.to_ste_vec_query(a)::jsonb`, so a +--! functional GIN index on the same expression engages. +--! +--! @param a public.json Container. +--! @param b eql_v3.query_jsonb Query payload. +--! @return boolean True if a contains b. +CREATE FUNCTION eql_v3."@>"(a public.json, b eql_v3.query_jsonb) +RETURNS boolean +LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.to_ste_vec_query(a)::jsonb @> b::jsonb +$$; + +CREATE OPERATOR @>( + FUNCTION=eql_v3."@>", + LEFTARG=public.json, + RIGHTARG=eql_v3.query_jsonb +); + +--! @brief @> contains operator with a single jsonb_entry needle. +--! +--! Wraps the entry into a single-element sv array (stripping `c`) and reduces +--! to the same `to_ste_vec_query(a)::jsonb @> needle::jsonb` form. +--! +--! @param a public.json Container. +--! @param b public.jsonb_entry Single entry. +--! @return boolean True if a contains an sv entry matching b. +CREATE FUNCTION eql_v3."@>"(a public.json, b public.jsonb_entry) +RETURNS boolean +LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.to_ste_vec_query(a)::jsonb + @> jsonb_build_object( + 'sv', + jsonb_build_array( + jsonb_strip_nulls( + jsonb_build_object( + 's', b -> 's', + 'hm', b -> 'hm', + 'op', b -> 'op' + ) + ) + ) + ) +$$; + +CREATE OPERATOR @>( + FUNCTION=eql_v3."@>", + LEFTARG=public.json, + RIGHTARG=public.jsonb_entry +); + +------------------------------------------------------------------------------ +-- <@ contained-by (reverse of @>) +------------------------------------------------------------------------------ + +--! @brief <@ contained-by operator (document, document). +--! @param a public.json Contained value. +--! @param b public.json Container. +--! @return boolean True if a is contained by b. +CREATE FUNCTION eql_v3."<@"(a public.json, b public.json) +RETURNS boolean +LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.ste_vec_contains(b, a) +$$; + +CREATE OPERATOR <@( + FUNCTION=eql_v3."<@", + LEFTARG=public.json, + RIGHTARG=public.json +); + +--! @brief <@ contained-by operator with an query_jsonb LHS. +--! @param a eql_v3.query_jsonb Query payload. +--! @param b public.json Container. +--! @return boolean True if b contains a. +CREATE FUNCTION eql_v3."<@"(a eql_v3.query_jsonb, b public.json) +RETURNS boolean +LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3."@>"(b, a) +$$; + +CREATE OPERATOR <@( + FUNCTION=eql_v3."<@", + LEFTARG=eql_v3.query_jsonb, + RIGHTARG=public.json +); + +--! @brief <@ contained-by operator with a jsonb_entry LHS. +--! @param a public.jsonb_entry Single entry. +--! @param b public.json Container. +--! @return boolean True if b contains a. +CREATE FUNCTION eql_v3."<@"(a public.jsonb_entry, b public.json) +RETURNS boolean +LANGUAGE SQL IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3."@>"(b, a) +$$; + +CREATE OPERATOR <@( + FUNCTION=eql_v3."<@", + LEFTARG=public.jsonb_entry, + RIGHTARG=public.json +); + +------------------------------------------------------------------------------ +-- jsonb_entry comparisons +------------------------------------------------------------------------------ + +--! @brief Equality on jsonb_entry via eq_term (hm-or-oc byte equality). +--! @param a public.jsonb_entry Left operand +--! @param b public.jsonb_entry Right operand +--! @return boolean True if the entries are equal +CREATE FUNCTION eql_v3.eq(a public.jsonb_entry, b public.jsonb_entry) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.eq_term(a) = eql_v3.eq_term(b) +$$; + +CREATE OPERATOR = ( + FUNCTION = eql_v3.eq, + LEFTARG = public.jsonb_entry, + RIGHTARG = public.jsonb_entry, + COMMUTATOR = =, + NEGATOR = <>, + RESTRICT = eqsel, + JOIN = eqjoinsel +); + +--! @brief Inequality on jsonb_entry via eq_term. +--! @param a public.jsonb_entry Left operand +--! @param b public.jsonb_entry Right operand +--! @return boolean True if the entries are not equal +CREATE FUNCTION eql_v3.neq(a public.jsonb_entry, b public.jsonb_entry) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.eq_term(a) <> eql_v3.eq_term(b) +$$; + +CREATE OPERATOR <> ( + FUNCTION = eql_v3.neq, + LEFTARG = public.jsonb_entry, + RIGHTARG = public.jsonb_entry, + COMMUTATOR = <>, + NEGATOR = =, + RESTRICT = neqsel, + JOIN = neqjoinsel +); + +--! @brief Less-than on jsonb_entry via the CLLW OPE term (native bytea order). +--! @param a public.jsonb_entry Left operand +--! @param b public.jsonb_entry Right operand +--! @return boolean True if a is less than b +CREATE FUNCTION eql_v3.lt(a public.jsonb_entry, b public.jsonb_entry) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.ord_ope_term(a) < eql_v3.ord_ope_term(b) +$$; + +CREATE OPERATOR < ( + FUNCTION = eql_v3.lt, + LEFTARG = public.jsonb_entry, + RIGHTARG = public.jsonb_entry, + COMMUTATOR = >, + NEGATOR = >=, + RESTRICT = scalarltsel, + JOIN = scalarltjoinsel +); + +--! @brief Less-than-or-equal on jsonb_entry via the CLLW OPE term. +--! @param a public.jsonb_entry Left operand +--! @param b public.jsonb_entry Right operand +--! @return boolean True if a is less than or equal to b +CREATE FUNCTION eql_v3.lte(a public.jsonb_entry, b public.jsonb_entry) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.ord_ope_term(a) <= eql_v3.ord_ope_term(b) +$$; + +CREATE OPERATOR <= ( + FUNCTION = eql_v3.lte, + LEFTARG = public.jsonb_entry, + RIGHTARG = public.jsonb_entry, + COMMUTATOR = >=, + NEGATOR = >, + RESTRICT = scalarlesel, + JOIN = scalarlejoinsel +); + +--! @brief Greater-than on jsonb_entry via the CLLW OPE term. +--! @param a public.jsonb_entry Left operand +--! @param b public.jsonb_entry Right operand +--! @return boolean True if a is greater than b +CREATE FUNCTION eql_v3.gt(a public.jsonb_entry, b public.jsonb_entry) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.ord_ope_term(a) > eql_v3.ord_ope_term(b) +$$; + +CREATE OPERATOR > ( + FUNCTION = eql_v3.gt, + LEFTARG = public.jsonb_entry, + RIGHTARG = public.jsonb_entry, + COMMUTATOR = <, + NEGATOR = <=, + RESTRICT = scalargtsel, + JOIN = scalargtjoinsel +); + +--! @brief Greater-than-or-equal on jsonb_entry via the CLLW OPE term. +--! @param a public.jsonb_entry Left operand +--! @param b public.jsonb_entry Right operand +--! @return boolean True if a is greater than or equal to b +CREATE FUNCTION eql_v3.gte(a public.jsonb_entry, b public.jsonb_entry) + RETURNS boolean + LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE +AS $$ + SELECT eql_v3.ord_ope_term(a) >= eql_v3.ord_ope_term(b) +$$; + +CREATE OPERATOR >= ( + FUNCTION = eql_v3.gte, + LEFTARG = public.jsonb_entry, + RIGHTARG = public.jsonb_entry, + COMMUTATOR = <=, + NEGATOR = <, + RESTRICT = scalargesel, + JOIN = scalargejoinsel +); + +--! @file v3/jsonb/blockers.sql +--! @brief Native-jsonb firewall for public.json. +--! +--! public.json SUPPORTS @> <@ -> ->> (see operators.sql). Comparisons +--! = <> < <= > >= are supported on public.jsonb_entry only, not on the root +--! document domain. +--! Every OTHER native jsonb operator reachable via domain fallback against the +--! base type jsonb is BLOCKED here so an encrypted column can never silently +--! route to plaintext-jsonb semantics. The blocked set is KNOWN_JSONB_OPERATORS +--! minus the supported ops: ? ?| ?& @? @@ #> #>> - #- ||. +--! +--! Each blocker is LANGUAGE plpgsql (NEVER STRICT — a STRICT blocker would let +--! PostgreSQL skip the body and return NULL on a NULL argument, bypassing the +--! exception) and delegates to the shared eql_v3.encrypted_domain_unsupported_* +--! helpers. Each blocker's RETURNS type matches the native operator it shadows +--! (#> -> jsonb, #>> -> text, - / #- / || -> jsonb; the rest are boolean) so a +--! composed expression resolves and the body raises 'operator not supported', +--! rather than failing earlier with a misleading 'operator does not exist' on a +--! boolean intermediate. The bound operator must resolve before native fallback, +--! so the firewall fires. + +--! @brief Blocker: ? (key/element exists). +--! @param a public.json Left operand (encrypted payload). +--! @param b text Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_exists(a public.json, b text) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '?'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR ? ( + FUNCTION = eql_v3_internal.jsonb_blocked_exists, + LEFTARG = public.json, + RIGHTARG = text +); + +--! @brief Blocker: ?| (any key exists). +--! @param a public.json Left operand (encrypted payload). +--! @param b text[] Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_exists_any(a public.json, b text[]) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '?|'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR ?| ( + FUNCTION = eql_v3_internal.jsonb_blocked_exists_any, + LEFTARG = public.json, + RIGHTARG = text[] +); + +--! @brief Blocker: ?& (all keys exist). +--! @param a public.json Left operand (encrypted payload). +--! @param b text[] Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_exists_all(a public.json, b text[]) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '?&'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR ?& ( + FUNCTION = eql_v3_internal.jsonb_blocked_exists_all, + LEFTARG = public.json, + RIGHTARG = text[] +); + +--! @brief Blocker: @? (jsonpath exists). +--! @param a public.json Left operand (encrypted payload). +--! @param b jsonpath Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_jsonpath_exists(a public.json, b jsonpath) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '@?'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR @? ( + FUNCTION = eql_v3_internal.jsonb_blocked_jsonpath_exists, + LEFTARG = public.json, + RIGHTARG = jsonpath +); + +--! @brief Blocker: @@ (jsonpath predicate). +--! @param a public.json Left operand (encrypted payload). +--! @param b jsonpath Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_jsonpath_match(a public.json, b jsonpath) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '@@'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR @@ ( + FUNCTION = eql_v3_internal.jsonb_blocked_jsonpath_match, + LEFTARG = public.json, + RIGHTARG = jsonpath +); + +--! @brief Blocker: #> (path extract, native returns jsonb). +--! @param a public.json Left operand (encrypted payload). +--! @param b text[] Native RHS operand. +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_path_extract(a public.json, b text[]) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '#>'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR #> ( + FUNCTION = eql_v3_internal.jsonb_blocked_path_extract, + LEFTARG = public.json, + RIGHTARG = text[] +); + +--! @brief Blocker: #>> (path extract as text). +--! @param a public.json Left operand (encrypted payload). +--! @param b text[] Native RHS operand. +--! @return text Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_path_extract_text(a public.json, b text[]) +RETURNS text +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_text('public.json', '#>>'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR #>> ( + FUNCTION = eql_v3_internal.jsonb_blocked_path_extract_text, + LEFTARG = public.json, + RIGHTARG = text[] +); + +--! @brief Blocker: - (delete key, text RHS; native returns jsonb). +--! @param a public.json Left operand (encrypted payload). +--! @param b text Native RHS operand. +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_delete_text(a public.json, b text) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '-'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal.jsonb_blocked_delete_text, + LEFTARG = public.json, + RIGHTARG = text +); + +--! @brief Blocker: - (delete index, integer RHS). +--! @param a public.json Left operand (encrypted payload). +--! @param b integer Native RHS operand. +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_delete_int(a public.json, b integer) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '-'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal.jsonb_blocked_delete_int, + LEFTARG = public.json, + RIGHTARG = integer +); + +--! @brief Blocker: - (delete keys, text[] RHS). +--! @param a public.json Left operand (encrypted payload). +--! @param b text[] Native RHS operand. +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_delete_array(a public.json, b text[]) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '-'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR - ( + FUNCTION = eql_v3_internal.jsonb_blocked_delete_array, + LEFTARG = public.json, + RIGHTARG = text[] +); + +--! @brief Blocker: #- (delete at path). +--! @param a public.json Left operand (encrypted payload). +--! @param b text[] Native RHS operand. +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_delete_path(a public.json, b text[]) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '#-'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR #- ( + FUNCTION = eql_v3_internal.jsonb_blocked_delete_path, + LEFTARG = public.json, + RIGHTARG = text[] +); + +--! @brief Blocker: || (concatenate, encrypted on the left). +--! @param a public.json Left operand (encrypted payload). +--! @param b jsonb Native RHS operand. +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_concat(a public.json, b jsonb) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '||'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal.jsonb_blocked_concat, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +--! @brief Blocker: || (concatenate, encrypted on the right). +--! @param a jsonb Native LHS operand. +--! @param b public.json Right operand (encrypted payload). +--! @return jsonb Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_concat_rhs(a jsonb, b public.json) +RETURNS jsonb +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_jsonb('public.json', '||'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR || ( + FUNCTION = eql_v3_internal.jsonb_blocked_concat_rhs, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +------------------------------------------------------------------------------ +-- Root-document comparison blockers. +------------------------------------------------------------------------------ + +--! @brief Blocker: root public.json document comparisons. +--! @param a public.json Left operand (encrypted payload). +--! @param b public.json Right operand (encrypted payload). +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_compare_json_json(a public.json, b public.json) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', 'comparison'); +END; +$$ LANGUAGE plpgsql; + +--! @brief Blocker: root public.json-to-jsonb comparisons. +--! @param a public.json Left operand (encrypted payload). +--! @param b jsonb Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_compare_json_jsonb(a public.json, b jsonb) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', 'comparison'); +END; +$$ LANGUAGE plpgsql; + +--! @brief Blocker: root jsonb-to-public.json comparisons. +--! @param a jsonb Native LHS operand. +--! @param b public.json Right operand (encrypted payload). +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_compare_jsonb_json(a jsonb, b public.json) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', 'comparison'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_json, + LEFTARG = public.json, + RIGHTARG = public.json +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR = ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_json, + LEFTARG = public.json, + RIGHTARG = public.json +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR <> ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_json, + LEFTARG = public.json, + RIGHTARG = public.json +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR < ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_json, + LEFTARG = public.json, + RIGHTARG = public.json +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR <= ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_json, + LEFTARG = public.json, + RIGHTARG = public.json +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR > ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_json, + LEFTARG = public.json, + RIGHTARG = public.json +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR >= ( + FUNCTION = eql_v3_internal.jsonb_blocked_compare_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +------------------------------------------------------------------------------ +-- Mixed jsonb containment blockers. +------------------------------------------------------------------------------ + +--! @brief Blocker: @> with encrypted root document and native jsonb. +--! @param a public.json Left operand (encrypted payload). +--! @param b jsonb Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_contains_json_jsonb(a public.json, b jsonb) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '@>'); +END; +$$ LANGUAGE plpgsql; + +--! @brief Blocker: @> with native jsonb and encrypted root document. +--! @param a jsonb Native LHS operand. +--! @param b public.json Right operand (encrypted payload). +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_contains_jsonb_json(a jsonb, b public.json) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '@>'); +END; +$$ LANGUAGE plpgsql; + +--! @brief Blocker: <@ with encrypted root document and native jsonb. +--! @param a public.json Left operand (encrypted payload). +--! @param b jsonb Native RHS operand. +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_contained_json_jsonb(a public.json, b jsonb) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '<@'); +END; +$$ LANGUAGE plpgsql; + +--! @brief Blocker: <@ with native jsonb and encrypted root document. +--! @param a jsonb Native LHS operand. +--! @param b public.json Right operand (encrypted payload). +--! @return boolean Never returns; always raises 'operator not supported'. +CREATE FUNCTION eql_v3_internal.jsonb_blocked_contained_jsonb_json(a jsonb, b public.json) +RETURNS boolean +IMMUTABLE PARALLEL SAFE +SET search_path = pg_catalog, extensions, public +AS $$ +BEGIN + RETURN eql_v3_internal.encrypted_domain_unsupported_bool('public.json', '<@'); +END; +$$ LANGUAGE plpgsql; + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.jsonb_blocked_contains_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR @> ( + FUNCTION = eql_v3_internal.jsonb_blocked_contains_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.jsonb_blocked_contained_json_jsonb, + LEFTARG = public.json, + RIGHTARG = jsonb +); + +CREATE OPERATOR <@ ( + FUNCTION = eql_v3_internal.jsonb_blocked_contained_jsonb_json, + LEFTARG = jsonb, + RIGHTARG = public.json +); +--! @file pin_search_path_v3.sql +--! @brief Post-install: pin search_path on every eql_v3.* function. +--! +--! Appended verbatim by `tasks/build.sh` to the end of the v3-only release +--! artifact, AFTER all src/v3/**/*.sql files have been concatenated. It lives +--! outside src/ so it stays out of the dependency graph. +--! +--! Iterates over functions in the `eql_v3` and `eql_v3_internal` schemas and +--! applies a fixed `search_path` via `ALTER FUNCTION ... SET search_path = ...`, +--! satisfying Supabase splinter's `function_search_path_mutable` lint. +--! +--! @note A SET clause disables SQL-function inlining. The inline-critical SEM +--! helpers (ore_block_256_*, ope_cllw, hmac_256, bloom_filter over +--! jsonb) and the encrypted-domain family (recognised structurally, +--! including public user-column domains) are deliberately left +--! unpinned. +--! @see tasks/test/splinter.sh +--! @see tasks/build.sh + +DO $$ +DECLARE + fn_oid oid; + inline_critical_oids oid[]; + jsonb_oid oid; +BEGIN + SELECT t.oid INTO jsonb_oid + FROM pg_catalog.pg_type t + JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace + WHERE n.nspname = 'pg_catalog' AND t.typname = 'jsonb'; + + IF jsonb_oid IS NULL THEN + RAISE EXCEPTION 'pin_search_path_v3: type pg_catalog.jsonb not found'; + END IF; + + -- eql_v3 SEM index-term functions that must stay inlinable for + -- functional-index matching (no SET, IMMUTABLE). Mirrors the eql_v3 clause + -- in the legacy combined pin_search_path.sql. + SELECT pg_catalog.array_agg(p.oid) INTO inline_critical_oids + FROM pg_catalog.pg_proc p + JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname = ANY(eql_v3_internal.owned_schemas()) + AND ( + (p.pronargs = 2 + AND p.proname IN ('ore_block_256_eq', 'ore_block_256_neq', + 'ore_block_256_lt', 'ore_block_256_lte', + 'ore_block_256_gt', 'ore_block_256_gte')) + -- The CLLW-OPE surface is the extractor alone: eql_v3_internal.ope_cllw is a + -- domain over bytea (native comparison operators and btree opclass), + -- so there are no ope-specific comparison functions to keep inlinable. + OR (p.pronargs = 1 + AND p.proname = 'ope_cllw' + AND p.proargtypes[0] = jsonb_oid) + OR (p.pronargs = 1 + AND p.proname = 'hmac_256' + AND p.proargtypes[0] = jsonb_oid) + OR (p.pronargs = 1 + AND p.proname = 'bloom_filter' + AND p.proargtypes[0] = jsonb_oid) + ); + + FOR fn_oid IN + SELECT p.oid + FROM pg_catalog.pg_proc p + JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace + WHERE n.nspname = ANY(eql_v3_internal.owned_schemas()) + AND p.prokind IN ('f', 'w') + AND NOT EXISTS ( + SELECT 1 FROM pg_catalog.unnest(coalesce(p.proconfig, '{}'::text[])) c + WHERE c LIKE 'search_path=%' + ) + AND NOT (p.oid = ANY (coalesce(inline_critical_oids, '{}'::oid[]))) + -- Encrypted-domain family — structural skip: LANGUAGE sql, IMMUTABLE, + -- taking >=1 argument typed as a jsonb-backed DOMAIN. User-column + -- domains live in public; implementation-only domains live in EQL-owned + -- schemas. + AND NOT ( + p.prolang = (SELECT l.oid FROM pg_catalog.pg_language l + WHERE l.lanname = 'sql') + AND p.provolatile = 'i' + AND EXISTS ( + SELECT 1 + FROM pg_catalog.unnest(p.proargtypes::oid[]) AS arg(typ) + JOIN pg_catalog.pg_type dt ON dt.oid = arg.typ + JOIN pg_catalog.pg_namespace dn ON dn.oid = dt.typnamespace + WHERE dt.typtype = 'd' + AND dt.typbasetype = jsonb_oid + AND ( + dn.nspname = 'public' + OR dn.nspname = ANY(eql_v3_internal.owned_schemas()) + ) + ) + ) + -- Comment-marker fallback for hand-written inline-critical extension + -- functions that take no domain argument. + AND NOT EXISTS ( + SELECT 1 FROM pg_catalog.pg_description d + WHERE d.objoid = p.oid + AND d.classoid = 'pg_catalog.pg_proc'::regclass + AND d.description LIKE 'eql-inline-critical%' + ) + LOOP + EXECUTE pg_catalog.format( + 'ALTER FUNCTION %s SET search_path = pg_catalog, extensions, public', + fn_oid::regprocedure + ); + END LOOP; +END $$; diff --git a/crates/eql-bindings/sql/release-manifest.json b/crates/eql-bindings/sql/release-manifest.json new file mode 100644 index 000000000..de196e24c --- /dev/null +++ b/crates/eql-bindings/sql/release-manifest.json @@ -0,0 +1,6 @@ +{ + "eqlVersion": "3.0.0-alpha.4", + "schemaVersion": 3, + "installSqlSha256": "eb4036cf7d2513e9cdff987582c1bba889300929f8ff4d6e6d984665c06eec9b", + "uninstallSqlSha256": "b1b5131b8175c5d04da9ada108d25c81c5772b15fad79a6c419ebb32d18c60a9" +} diff --git a/crates/eql-bindings/src/from_v2/error.rs b/crates/eql-bindings/src/from_v2/error.rs new file mode 100644 index 000000000..8e49dd242 --- /dev/null +++ b/crates/eql-bindings/src/from_v2/error.rs @@ -0,0 +1,184 @@ +//! The `from_v2` error enum — hand-rolled `Display`/`Error` (this crate's +//! dependency set is pinned to serde/serde_json/ts-rs/schemars, so no +//! thiserror). + +use std::error::Error; +use std::fmt; + +/// Why a v2 → v3 conversion was refused. Every variant is fail-closed: the +/// converter never emits a v3 payload it could not validate. +#[derive(Debug)] +pub enum FromV2Error { + /// The input's envelope version (`v`) is not the v2 wire version `2` — + /// `found: Some(3)` for an already-converted v3 payload, `None` when `v` + /// is absent or not an integer (e.g. plaintext JSON). + UnsupportedVersion { + /// The integer `v` the input carried, if any. + found: Option, + }, + /// The input's kind discriminator (`k`) is neither `"ct"` nor `"sv"` + /// (`found: None` when `k` is absent or not a string). + UnknownKind { + /// The `k` string the input carried, if any. + found: Option, + }, + /// [`TargetDomain::parse`](super::TargetDomain::parse) did not find the + /// name in the catalog-generated inventory (or it names a SteVec shape — + /// `jsonb_entry` / `query_jsonb` — that is not a conversion target). + UnknownDomain { + /// The name that failed to resolve. + name: String, + }, + /// A term key the target domain requires is absent from the input. For + /// SteVec entries `key` is `"hm|op"`: an entry must carry exactly one of + /// the two, and this variant reports the "neither" half (the "both" half + /// is [`FromV2Error::AmbiguousTerm`]) with `entry` locating the offender. + MissingTerm { + /// The (unqualified) target domain name, e.g. `text_eq`, or the + /// SteVec shape (`json` / `query_jsonb`) for per-entry terms. + domain: String, + /// The missing wire key (`hm`/`ob`/`bf`/`op`, or `hm|op` for entries). + key: String, + /// Zero-based index of the term-less `sv` entry; `None` for flat + /// scalar payloads, which have no entries to index. + entry: Option, + }, + /// A SteVec entry carries BOTH `hm` and `op`; the v2 and v3 contracts + /// both require exactly one, and picking one would silently drop a term. + AmbiguousTerm { + /// Zero-based index of the offending `sv` entry. + entry: usize, + }, + /// A SteVec entry carries a CLLW-ORE ordering term (`oc`), which v3 + /// cannot represent: v3 orders SteVec entries by the CLLW-OPE `op` term + /// (native byte order), and CLLW-ORE ciphertext bytes do not order under + /// byte comparison — passing them through would silently misorder. An + /// `oc`-bearing v2 document must be re-encrypted through a client that + /// emits OPE SteVec terms; no mechanical conversion exists. + UnconvertibleOreTerm { + /// Zero-based index of the offending `sv` entry. + entry: usize, + }, + /// The input's kind contradicts the target: an `sv` payload for a scalar + /// target, or a `ct` payload for [`TargetDomain::Json`](super::TargetDomain::Json). + KindMismatch { + /// The input's `k` discriminator (`ct` or `sv`). + kind: String, + /// The requested target (a domain name, or `json`). + target: String, + }, + /// A `bf` element is outside both the signed `i16` range and the unsigned + /// upper half (`32768..=65535`) that reinterprets into it — it cannot be + /// a PostgreSQL `smallint[]` bit position. + BloomOutOfRange { + /// Zero-based index of the offending `bf` element. + index: usize, + /// The out-of-range element value. + value: i64, + }, + /// [`from_v2_query`](super::from_v2_query) was asked for a scalar target, + /// but no v3 scalar query wire shape exists (every scalar domain CHECK + /// requires the ciphertext `c` a query payload omits). Scalar query + /// conversion is pending the mapper redesign; this crate will not invent + /// a wire shape ahead of it. + UnsupportedQueryTarget { + /// The (unqualified) scalar domain name that was requested. + domain: String, + }, + /// The converted payload failed the final strict parse through the target + /// domain's binding struct (`deny_unknown_fields` + `SchemaVersion`), or + /// the input was structurally malformed (e.g. a non-array `sv` or `bf`). + Invalid(serde_json::Error), +} + +impl fmt::Display for FromV2Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::UnsupportedVersion { found: Some(v) } => { + write!(f, "unsupported EQL payload version {v} (expected 2)") + } + Self::UnsupportedVersion { found: None } => { + write!( + f, + "input carries no integer EQL version key `v` (expected 2)" + ) + } + Self::UnknownKind { found: Some(k) } => { + write!( + f, + "unknown EQL payload kind {k:?} (expected \"ct\" or \"sv\")" + ) + } + Self::UnknownKind { found: None } => { + write!( + f, + "input carries no kind key `k` (expected \"ct\" or \"sv\")" + ) + } + Self::UnknownDomain { name } => { + write!(f, "unknown target domain {name:?}") + } + Self::MissingTerm { + domain, + key, + entry: Some(entry), + } => { + write!( + f, + "sv entry {entry} carries no term key `{key}` required by `{domain}`" + ) + } + Self::MissingTerm { + domain, + key, + entry: None, + } => { + write!(f, "target domain `{domain}` requires term key `{key}`, absent from the v2 payload") + } + Self::AmbiguousTerm { entry } => { + write!( + f, + "sv entry {entry} carries both `hm` and `op` (exactly one is required)" + ) + } + Self::UnconvertibleOreTerm { entry } => { + write!( + f, + "sv entry {entry} carries a CLLW-ORE ordering term `oc`; v3 orders SteVec \ + entries by the CLLW-OPE `op` term, and ORE ciphertext bytes cannot be \ + converted — re-encrypt through a client that emits OPE SteVec terms" + ) + } + Self::KindMismatch { kind, target } => { + write!( + f, + "v2 payload kind `{kind}` cannot convert to target `{target}`" + ) + } + Self::BloomOutOfRange { index, value } => { + write!( + f, + "bf element {index} ({value}) is outside the smallint bit-position range" + ) + } + Self::UnsupportedQueryTarget { domain } => { + write!( + f, + "no v3 scalar query wire shape exists for `{domain}` (pending the mapper redesign)" + ) + } + Self::Invalid(e) => { + write!(f, "converted payload failed v3 validation: {e}") + } + } + } +} + +impl Error for FromV2Error { + fn source(&self) -> Option<&(dyn Error + 'static)> { + match self { + Self::Invalid(e) => Some(e), + _ => None, + } + } +} diff --git a/crates/eql-bindings/src/from_v2/mod.rs b/crates/eql-bindings/src/from_v2/mod.rs new file mode 100644 index 000000000..2f5407c68 --- /dev/null +++ b/crates/eql-bindings/src/from_v2/mod.rs @@ -0,0 +1,549 @@ +//! # `from_v2` — EQL v2.3 → v3 wire conversion +//! +//! Converts the EQL v2.3 payloads cipherstash-client emits (reference +//! contract: `docs/reference/schema/eql-payload-v2.3.schema.json`) into v3 +//! payloads for the `eql_v3` domains. Consumers: protect-ffi (which knows the +//! column configuration at runtime), the benches (which know per-table +//! intent), and potentially CipherStash Proxy. +//! +//! ## The target domain is explicit input +//! +//! Every v2 index term is optional on the wire, so a payload's capability +//! cannot be inferred — an `{v,k,c,i,hm}` payload could target `text_eq` or +//! be an over-provisioned `text` storage column. The caller names the target +//! via [`TargetDomain::parse`], which resolves against the catalog-generated +//! inventory ([`crate::v3::all`]) so the accepted names and required term +//! keys can never drift from `eql-domains::CATALOG`. +//! +//! ## Conversion rules +//! +//! **Scalar** (v2 `k: "ct"` → [`TargetDomain::Scalar`]): requires `v == 2` +//! and `k == "ct"`; copies `i` and `c` verbatim; emits `v: 3`; copies exactly +//! the term keys the target requires (`hm`/`ob`/`bf`/`op`), failing closed +//! with [`FromV2Error::MissingTerm`] when one is absent; DROPS `k` and every +//! term key the target does not require. `bf` is reinterpreted from v2's +//! unsigned bit positions into the signed `smallint[]` representation +//! (`32768..=65535` wrap negative; anything beyond is +//! [`FromV2Error::BloomOutOfRange`]; already-negative values pass through). +//! `ob` and `op` pass through verbatim. +//! +//! Two deliberate points of divergence from the v2.3 schema file: +//! +//! - **`k` is required.** The v2.3 schema marks `k` optional on the `ct` +//! form; this converter requires it (cipherstash-client emits it on every +//! payload). A `k`-less input is [`FromV2Error::UnknownKind`] — fail-closed +//! beats guessing the shape of an unlabelled payload. +//! - **`op` is accepted as a scalar term key.** The v2.3 schema predates the +//! CLLW-OPE term and cannot carry it (`additionalProperties: false`); +//! cipherstash-client emits `op` for OPE-ordered columns ahead of the v3 +//! envelope, and the `_ord_ope` targets require it. +//! +//! **SteVec** (v2 `k: "sv"` → [`TargetDomain::Json`]): keeps the root `k` +//! (the v3 document models the `"sv"` form discriminator — required on the +//! wire), sets `v: 3`, keeps `i`; per entry keeps `s`, `c`, the optional +//! array-membership marker `a` (the v3 [`crate::v3::jsonb::SteVecEntry`] +//! retains it), and exactly one of `hm` XOR `op` +//! ([`FromV2Error::AmbiguousTerm`] / [`FromV2Error::MissingTerm`] on +//! both/neither). Like scalar `op`, the sv-level `op` term predates the +//! v2.3 schema file: cipherstash-client emits it for OPE-mode SteVec columns +//! ahead of the v3 envelope. A CLLW-*ORE* `oc` entry term is +//! [`FromV2Error::UnconvertibleOreTerm`] — v3 orders SteVec entries by the +//! CLLW-OPE `op` term (native byte order), ORE ciphertext bytes would +//! silently misorder, and whether older Compat-mode `oc` bytes are really +//! OPE cannot be determined from the payload alone. Fail closed; +//! re-encryption is the only conversion. v3 sv entries carry no per-entry +//! `v`/`i`/`k` — the envelope lives only at the root `{v, k, i, sv}`, +//! exactly the [`crate::v3::jsonb::SteVecDocument`] shape. +//! +//! Every converted payload is validated by a final strict parse through the +//! target's binding struct (`deny_unknown_fields` + [`crate::SchemaVersion`]) +//! before it is returned — the converter never emits a payload the v3 domain +//! CHECK would reject. The parse happens exactly once per conversion: +//! [`from_v2`] validates and discards it +//! (via [`crate::v3::DomainType::parse_value`]) and returns the wire `Value`; +//! [`from_v2_typed`] KEEPS it, returning the matching +//! [`crate::v3::DomainPayload`] variant (whose untagged serialization is +//! byte-identical to the `Value` [`from_v2`] returns). +//! +//! ## Query payloads +//! +//! [`from_v2_query`] covers both query shapes. The jsonb containment needle +//! (`{sv: [{s, hm|op}]}` → [`crate::v3::jsonb::SteVecQuery`]) normalizes +//! entries down to `s` + one term exactly as the SQL cast +//! `eql_v3.to_ste_vec_query` does (stray `a` markers and `c` ciphertexts are +//! stripped). A term-bearing scalar target hoists the target's required terms +//! into the enveloped term-only operand `{v: 3, i, }` for its +//! `query_` domain — the query counterpart of the stored conversion, +//! dropping `c`/`k` (CIP-3432). A STORAGE-ONLY scalar target (no terms, no +//! operators) has no query operand and returns +//! [`FromV2Error::UnsupportedQueryTarget`]. +//! +//! Query conversion has the same entry-point split as the stored-payload +//! side: [`from_v2_query`] validates the converted needle and returns the +//! wire `Value`; [`from_v2_query_typed`] KEEPS the strict parse, returning +//! the matching [`crate::v3::QueryPayload`] variant (whose untagged +//! serialization is byte-identical to the `Value` [`from_v2_query`] returns). +//! One shared conversion path, one strict parse either way. +//! +//! ## Decryption root: `sv[0]` +//! +//! The record ciphertext of a SteVec document — the `c` downstream decrypt +//! must hand to cipherstash-client — is carried by the FIRST `sv` entry +//! (`sv[0].c`, the root-selector entry). This mirrors upstream +//! `SteVec::into_root_ciphertext` and is exactly how v2 consumers treated +//! `sv[0].c` (see protect-ffi's `encrypted_record_from_mp_base85`). The v3 +//! SQL surface does not re-state this invariant (its CHECKs validate shape, +//! not entry order), so conversion preserves `sv` entry order verbatim — +//! reordering entries would silently break decryption. + +mod error; +mod target; + +pub use error::FromV2Error; +pub use target::{ScalarTarget, TargetDomain}; + +use serde::de::Error as _; +use serde_json::{json, Map, Value}; + +use crate::v3::{all, DomainPayload, QueryPayload}; + +/// The v2 wire version this converter accepts. +const V2_WIRE_VERSION: u64 = 2; + +/// Convert a STORED EQL v2.3 payload into the v3 payload for `target`. +/// +/// See the [module docs](self) for the conversion rules. Fails closed: the +/// returned value has already passed a strict parse through the target +/// domain's binding struct. Wire-oriented callers keep the `Value`; callers +/// that want the payload typed use [`from_v2_typed`] instead (same +/// conversion, same failures, one strict parse either way). +pub fn from_v2(v2: &Value, target: TargetDomain) -> Result { + let out = convert(v2, target)?; + validate_as(target.describe(), &out)?; + Ok(out) +} + +/// Convert a STORED EQL v2.3 payload into the TYPED v3 payload for `target`: +/// [`from_v2`] returning the [`DomainPayload`] variant for the target domain +/// instead of a shape-erased `Value`. +/// +/// Same conversion rules and same failures as [`from_v2`] — one shared +/// conversion path, and the final strict parse through the target's binding +/// struct happens exactly once (here it is KEPT as the enum variant; in +/// [`from_v2`] it is a validate-and-discard check). Because +/// [`DomainPayload`]'s serialization is untagged, +/// `serde_json::to_value(&from_v2_typed(v2, t)?)` equals `from_v2(v2, t)?` +/// exactly (pinned by `tests/domain_payload.rs`). +pub fn from_v2_typed(v2: &Value, target: TargetDomain) -> Result { + let out = convert(v2, target)?; + DomainPayload::parse(target.describe(), &out) + .unwrap_or_else(|| { + // Every conversion target (all scalar domains + "eql_v3_json") has a + // generated DomainPayload variant; TargetDomain::parse resolved + // `target` against the same catalog. + unreachable!( + "conversion target {} must have a DomainPayload variant", + target.describe() + ) + }) + .map_err(FromV2Error::Invalid) +} + +/// The shared conversion path behind [`from_v2`] / [`from_v2_typed`]: +/// dispatch on the v2 `k` form against the target shape and build the v3 +/// payload `Value`. Does NOT run the final strict parse — each public entry +/// point does that exactly once (validate-and-discard in [`from_v2`], +/// parse-and-keep in [`from_v2_typed`]). +fn convert(v2: &Value, target: TargetDomain) -> Result { + let obj = require_v2_envelope(v2)?; + let kind = obj.get("k").and_then(Value::as_str); + match (kind, target) { + (Some("ct"), TargetDomain::Scalar(t)) => convert_scalar(obj, t), + (Some("sv"), TargetDomain::Json) => convert_ste_vec(obj), + (Some(kind @ ("ct" | "sv")), _) => Err(FromV2Error::KindMismatch { + kind: kind.into(), + target: target.describe().into(), + }), + (found, _) => Err(FromV2Error::UnknownKind { + found: found.map(String::from), + }), + } +} + +/// Convert an EQL v2.3 QUERY payload into the v3 query operand for `target`. +/// +/// [`TargetDomain::Json`]: the v2 containment needle (`{sv: [{s, hm|op}]}`, the +/// v2.3 `SteVecQueryPayload`) converts to the [`crate::v3::jsonb::SteVecQuery`] +/// shape — entries normalized to `s` + exactly one term (mirroring +/// `eql_v3.to_ste_vec_query`; stray `a`/`c` keys are stripped, so a stored +/// document payload can also be normalized into a needle), `i` dropped. +/// +/// A term-bearing [`TargetDomain::Scalar`]: the target's required terms are +/// hoisted into the enveloped term-only operand `{v: 3, i, }` for its +/// `query_` domain, dropping `c`/`k` (`bf` reinterpreted to signed +/// `smallint[]`). A storage-only scalar target has no operators and returns +/// [`FromV2Error::UnsupportedQueryTarget`]. +/// +/// Wire-oriented callers keep the `Value`; callers that want it typed use +/// [`from_v2_query_typed`] instead (same conversion, same failures, one strict +/// parse either way). +pub fn from_v2_query(v2: &Value, target: TargetDomain) -> Result { + let out = convert_query(v2, target)?; + // Validate through the generated QueryPayload strict parser (the query-side + // counterpart of validate_as), keyed on the target's `query_` domain. + parse_query(&query_domain_name(target), &out)?; + Ok(out) +} + +/// Convert an EQL v2.3 QUERY payload into the TYPED v3 query payload for +/// `target`: [`from_v2_query`] returning the [`QueryPayload`] variant instead +/// of a shape-erased `Value`. +/// +/// Same conversion rules and same failures as [`from_v2_query`] — one shared +/// conversion path (`convert_query`), and the final strict parse through +/// the query binding struct happens exactly once (here it is KEPT as the enum +/// variant; in [`from_v2_query`] it is a validate-and-discard check). Because +/// [`QueryPayload`]'s serialization is untagged, +/// `serde_json::to_value(&from_v2_query_typed(v2, t)?)` equals +/// `from_v2_query(v2, t)?` exactly (pinned by `tests/query_payload.rs`). +/// +/// Storage-only scalar targets fail with +/// [`FromV2Error::UnsupportedQueryTarget`] exactly like [`from_v2_query`]; +/// term-bearing scalars yield the matching `query_` [`QueryPayload`] +/// variant. +pub fn from_v2_query_typed(v2: &Value, target: TargetDomain) -> Result { + let out = convert_query(v2, target)?; + parse_query(&query_domain_name(target), &out) +} + +/// The unqualified query-operand domain a target converts into: the scalar +/// twin `query_`, or `query_jsonb` for the hand-written SteVec needle — +/// both on the query-operand PREFIX convention (CIP-3442). (Replaces the old +/// single `QUERY_DOMAIN` constant now that scalar query shapes exist.) +fn query_domain_name(target: TargetDomain) -> String { + match target { + TargetDomain::Json => "query_jsonb".to_string(), + // The query twin joins `query_` to the BARE domain name: the stored + // domain's `eql_v3_` version prefix (CIP-3472) applies to public-schema + // column types only — query operands live in the already-versioned + // `eql_v3` schema, so `eql_v3_text_eq` twins `query_text_eq`. + TargetDomain::Scalar(t) => { + let bare = t + .domain() + .strip_prefix(crate::v3::domain_type::PUBLIC_TYPNAME_PREFIX) + .unwrap_or_else(|| { + unreachable!( + "stored scalar domain {} must carry the version prefix", + t.domain() + ) + }); + format!("query_{bare}") + } + } +} + +/// Validate `out` through the generated [`QueryPayload`] strict parser, keeping +/// the parsed variant. Every domain [`query_domain_name`] produces is a +/// QueryPayload variant (the scalar twins + the SteVec needle), so a `None` +/// return is unreachable — but `convert_query` guards storage-only scalar +/// targets first, so this is only ever called for a real query domain. +fn parse_query(domain: &str, out: &Value) -> Result { + QueryPayload::parse(domain, out) + .unwrap_or_else(|| unreachable!("query domain {domain} must have a QueryPayload variant")) + .map_err(FromV2Error::Invalid) +} + +/// The shared conversion path behind [`from_v2_query`] / +/// [`from_v2_query_typed`]: dispatch on the target and build the v3 query +/// payload `Value`. Does NOT run the final strict parse — each public entry +/// point does that exactly once (validate-and-discard in [`from_v2_query`], +/// parse-and-keep in [`from_v2_query_typed`]). +fn convert_query(v2: &Value, target: TargetDomain) -> Result { + match target { + TargetDomain::Json => convert_ste_vec_query(v2), + TargetDomain::Scalar(t) => convert_scalar_query(v2, t), + } +} + +/// v2 scalar query payload → v3 enveloped term-only operand `{v: 3, i, +/// }` for `target`'s `query_` domain. Hoists exactly the target's +/// required terms out of the v2 payload (a query operand may omit the v2 +/// envelope), dropping `c`/`k` — the query counterpart of [`convert_scalar`] +/// (which keeps `c`). A STORAGE-ONLY target (no terms, no operators) has no +/// query operand and returns [`FromV2Error::UnsupportedQueryTarget`]. +fn convert_scalar_query(v2: &Value, target: ScalarTarget) -> Result { + if target.term_json_keys().is_empty() { + return Err(FromV2Error::UnsupportedQueryTarget { + domain: target.domain().into(), + }); + } + let obj = v2 + .as_object() + .ok_or_else(|| invalid("a query payload must be a JSON object"))?; + // A versioned input must be v2; a query operand may omit the envelope. + if let Some(v) = obj.get("v") { + if v.as_u64() != Some(V2_WIRE_VERSION) { + return Err(FromV2Error::UnsupportedVersion { found: v.as_u64() }); + } + } + let mut out = Map::new(); + out.insert("v".into(), json!(crate::EQL_SCHEMA_VERSION)); + if let Some(i) = obj.get("i") { + out.insert("i".into(), i.clone()); + // Absent `i` fails the entry point's final strict parse (the query + // domain requires `{v, i, }`). + } + for &key in target.term_json_keys() { + let val = obj.get(key).ok_or_else(|| FromV2Error::MissingTerm { + domain: target.domain().into(), + key: key.into(), + entry: None, + })?; + // `hm`/`ob`/`op` are representation-identical in v2 and v3; `bf` is + // reinterpreted from v2 unsigned bit positions to signed smallint[]. + let converted = if key == "bf" { + convert_bloom(val)? + } else { + val.clone() + }; + out.insert(key.into(), converted); + } + Ok(Value::Object(out)) +} + +/// Lenient v3 envelope probe for format sniffing (protect-ffi / proxy): true +/// when the value is an object with integer `v == 3`, an object `i`, and a +/// stored-payload body (string `c` for scalars, or array `sv` for SteVec +/// documents). Deliberately NOT a validator — it answers "should this go +/// down the v3 path?", not "is this a valid v3 payload?" (that is +/// [`crate::v3::DomainType::parse_value`]). Note a v3 containment needle +/// (`{sv: [...]}` with no envelope) is not a stored payload and probes false. +pub fn is_v3_payload(value: &Value) -> bool { + let Some(obj) = value.as_object() else { + return false; + }; + obj.get("v").and_then(Value::as_u64) == Some(u64::from(crate::EQL_SCHEMA_VERSION)) + && obj.get("i").is_some_and(Value::is_object) + && (obj.get("c").is_some_and(Value::is_string) + || obj.get("sv").is_some_and(Value::is_array)) +} + +/// Require an object input carrying integer `v == 2`; return the object. +fn require_v2_envelope(v2: &Value) -> Result<&Map, FromV2Error> { + let found = v2.get("v").and_then(Value::as_u64); + if found != Some(V2_WIRE_VERSION) { + return Err(FromV2Error::UnsupportedVersion { found }); + } + // `get` above only succeeds on objects (or arrays, which cannot carry a + // string key), so this cannot fail once the version matched. + v2.as_object() + .ok_or(FromV2Error::UnsupportedVersion { found: None }) +} + +/// A structurally-malformed-input error (non-array `sv`/`bf`, non-object +/// entry, …), wrapped as [`FromV2Error::Invalid`]. +fn invalid(msg: &str) -> FromV2Error { + FromV2Error::Invalid(serde_json::Error::custom(msg)) +} + +/// Final gate: strict-parse `value` through `domain`'s binding struct. +/// +/// Rebuilds the inventory per call (as [`TargetDomain::parse`] does): a +/// static cache would need `all()` to return `dyn DomainType + Send + Sync` +/// — public API churn not worth ~50 zero-sized boxes per conversion unless +/// bulk-migration profiling ever says otherwise. +fn validate_as(domain: &str, value: &Value) -> Result<(), FromV2Error> { + let entry = all() + .into_iter() + .find(|d| d.domain() == domain) + .unwrap_or_else(|| { + // `domain` always came from the same inventory via + // `TargetDomain::parse` (or is the literal "eql_v3_json"/"query_jsonb"). + unreachable!("domain {domain} resolved by parse must be in the inventory") + }); + entry.parse_value(value).map_err(FromV2Error::Invalid) +} + +/// v2 `k: "ct"` → flat scalar `{v: 3, i, c, }`. +fn convert_scalar(obj: &Map, target: ScalarTarget) -> Result { + let mut out = Map::new(); + out.insert("v".into(), json!(crate::EQL_SCHEMA_VERSION)); + for key in ["i", "c"] { + if let Some(v) = obj.get(key) { + out.insert(key.into(), v.clone()); + } + // A missing envelope key fails the entry point's final strict parse + // (e.g. a v2 QUERY payload, which omits `c`, is rejected there — + // from_v2 converts stored payloads only). + } + for &key in target.term_json_keys() { + let v = obj.get(key).ok_or_else(|| FromV2Error::MissingTerm { + domain: target.domain().into(), + key: key.into(), + entry: None, + })?; + let converted = if key == "bf" { + convert_bloom(v)? + } else { + // `hm` is a hex string, `ob` an array of hex blocks, `op` a hex + // string — all representation-identical in v2 and v3. + v.clone() + }; + out.insert(key.into(), converted); + } + Ok(Value::Object(out)) +} + +/// Reinterpret a v2 `bf` array into the signed `smallint[]` representation: +/// in-range `i16` values pass through, the unsigned upper half +/// (`32768..=65535`) wraps negative (two's complement), anything else is +/// [`FromV2Error::BloomOutOfRange`]. +fn convert_bloom(bf: &Value) -> Result { + let arr = bf + .as_array() + .ok_or_else(|| invalid("`bf` must be an array of bit positions"))?; + let mut out = Vec::with_capacity(arr.len()); + for (index, el) in arr.iter().enumerate() { + let value = el + .as_i64() + .ok_or_else(|| invalid("`bf` elements must be integers"))?; + let reinterpreted: i16 = if (i64::from(i16::MIN)..=i64::from(i16::MAX)).contains(&value) { + value as i16 + } else if (i64::from(i16::MAX) + 1..=i64::from(u16::MAX)).contains(&value) { + (value as u16) as i16 + } else { + return Err(FromV2Error::BloomOutOfRange { index, value }); + }; + out.push(Value::from(reinterpreted)); + } + Ok(Value::Array(out)) +} + +/// v2 `k: "sv"` → SteVec document `{v: 3, k: "sv", i, sv: [{s, c, a?, hm|op}]}`. +/// Entry order is preserved verbatim — `sv[0]` is the decryption root (see +/// the module docs). +fn convert_ste_vec(obj: &Map) -> Result { + let mut out = Map::new(); + out.insert("v".into(), json!(crate::EQL_SCHEMA_VERSION)); + // The root `k: "sv"` form discriminator is carried through: the v3 + // document models it ([`crate::v3::jsonb::SteVecDocument`]'s `k`, + // required on the wire). `from_v2` already dispatched on `k == "sv"`, so + // emitting the literal is exact. + out.insert("k".into(), json!("sv")); + if let Some(i) = obj.get("i") { + out.insert("i".into(), i.clone()); + // Absent `i` fails the entry point's final strict parse. + } + let sv = obj + .get("sv") + .and_then(Value::as_array) + .ok_or_else(|| invalid("`sv` must be an array of entries"))?; + let entries = sv + .iter() + .enumerate() + .map(|(idx, entry)| convert_entry(idx, entry, EntryShape::Document)) + .collect::, _>>()?; + out.insert("sv".into(), Value::Array(entries)); + Ok(Value::Object(out)) +} + +/// v2 query needle `{sv: [{s, hm|op, …}]}` → v3 `SteVecQuery` shape. Like the +/// stored-payload converters, does NOT run the final strict parse — that is +/// the entry points' job, exactly once. +fn convert_ste_vec_query(v2: &Value) -> Result { + let obj = v2 + .as_object() + .ok_or_else(|| invalid("a query payload must be a JSON object"))?; + // The v2.3 SteVecQueryPayload carries no envelope, but tolerate one: + // a versioned input must be v2, and a kind-discriminated one must be sv. + if let Some(v) = obj.get("v") { + if v.as_u64() != Some(V2_WIRE_VERSION) { + return Err(FromV2Error::UnsupportedVersion { found: v.as_u64() }); + } + } + match obj.get("k").and_then(Value::as_str) { + None | Some("sv") => {} + Some(kind) => { + return Err(FromV2Error::KindMismatch { + kind: kind.into(), + target: "eql_v3_json".into(), + }) + } + } + let sv = obj + .get("sv") + .and_then(Value::as_array) + .ok_or_else(|| invalid("`sv` must be an array of query entries"))?; + let entries = sv + .iter() + .enumerate() + .map(|(idx, entry)| convert_entry(idx, entry, EntryShape::Query)) + .collect::, _>>()?; + Ok(json!({ "sv": entries })) +} + +/// Which keys an sv entry keeps after conversion. +#[derive(Clone, Copy)] +enum EntryShape { + /// Document entry: `s`, `c`, optional `a`, one term. + Document, + /// Query entry: `s` + one term only (the `eql_v3.to_ste_vec_query` + /// normalization — `a`/`c` are stripped). + Query, +} + +impl EntryShape { + /// The keys the converted entry keeps beyond its term. + fn kept_keys(self) -> &'static [&'static str] { + match self { + Self::Document => &["s", "c", "a"], + Self::Query => &["s"], + } + } + + /// The (unqualified) SQL domain this entry shape belongs to, for error + /// context. + fn domain(self) -> &'static str { + match self { + Self::Document => "eql_v3_json", + Self::Query => "query_jsonb", + } + } +} + +/// Convert one v2 sv element: copy the shape's keys and exactly one of +/// `hm` XOR `op`. A CLLW-ORE `oc` term is unconvertible (see +/// [`FromV2Error::UnconvertibleOreTerm`]) — fail loudly rather than emit a +/// term v3 would misorder. +fn convert_entry(idx: usize, entry: &Value, shape: EntryShape) -> Result { + let obj = entry + .as_object() + .ok_or_else(|| invalid("`sv` entries must be JSON objects"))?; + if obj.contains_key("oc") { + return Err(FromV2Error::UnconvertibleOreTerm { entry: idx }); + } + let mut out = Map::new(); + for &key in shape.kept_keys() { + if let Some(v) = obj.get(key) { + out.insert(key.into(), v.clone()); + } + // A missing `s`/`c` fails the final document/query validation. + } + match (obj.get("hm"), obj.get("op")) { + (Some(_), Some(_)) => return Err(FromV2Error::AmbiguousTerm { entry: idx }), + (Some(hm), None) => { + out.insert("hm".into(), hm.clone()); + } + (None, Some(op)) => { + out.insert("op".into(), op.clone()); + } + (None, None) => { + return Err(FromV2Error::MissingTerm { + domain: shape.domain().into(), + key: "hm|op".into(), + entry: Some(idx), + }) + } + } + Ok(Value::Object(out)) +} diff --git a/crates/eql-bindings/src/from_v2/target.rs b/crates/eql-bindings/src/from_v2/target.rs new file mode 100644 index 000000000..af2358026 --- /dev/null +++ b/crates/eql-bindings/src/from_v2/target.rs @@ -0,0 +1,79 @@ +//! The explicit conversion target: which v3 domain a v2 payload converts +//! into. v2 index terms are all optional on the wire, so the capability can +//! never be inferred from the payload — the caller (protect-ffi's column +//! config, a bench's per-table intent) must name it. + +use super::FromV2Error; +use crate::v3::all; + +/// The v3 domain a v2 payload converts into. +/// +/// Resolved by [`TargetDomain::parse`] against the catalog-generated +/// inventory ([`crate::v3::all`]), so the accepted names — and each scalar +/// target's required term keys — cannot drift from `eql-domains::CATALOG`. +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub enum TargetDomain { + /// A flat scalar domain (`integer`, `text_eq`, `integer_ord_ope`, …): the v2 + /// payload must be the `k: "ct"` form. + Scalar(ScalarTarget), + /// The SteVec document domain `public.eql_v3_json`: the v2 payload must be the + /// `k: "sv"` form. + Json, +} + +/// A resolved scalar target: the unqualified domain name plus the term keys +/// its payload requires, both borrowed from the generated `DomainType` impls +/// (parity with the catalog is pinned by `tests/catalog_parity.rs`). +#[derive(Clone, Copy, Debug, PartialEq, Eq)] +pub struct ScalarTarget { + domain: &'static str, + term_keys: &'static [&'static str], +} + +impl ScalarTarget { + /// The unqualified target domain name, e.g. `"text_eq"`. + pub fn domain(&self) -> &'static str { + self.domain + } + + /// The term keys the target payload requires beyond the `v`/`i`/`c` + /// envelope, in wire order (empty for a storage-only domain). + pub fn term_json_keys(&self) -> &'static [&'static str] { + self.term_keys + } +} + +impl TargetDomain { + /// Resolve an unqualified v3 domain name (`"eql_v3_integer_ord_ope"`, + /// `"text_search"`, `"float8"`, `"eql_v3_json"`, …) against the inventory. + /// + /// Shape-aware: scalar domains resolve to [`TargetDomain::Scalar`] with + /// their catalog term keys; the SteVec document domain `json` resolves to + /// [`TargetDomain::Json`]; the remaining SteVec shapes (`jsonb_entry`, + /// `query_jsonb`) are inventory members but not conversion targets, so + /// they — like any unknown name — return + /// [`FromV2Error::UnknownDomain`]. + pub fn parse(name: &str) -> Result { + let entry = all().into_iter().find(|d| d.domain() == name); + match entry { + Some(d) => match d.term_json_keys() { + Some(term_keys) => Ok(Self::Scalar(ScalarTarget { + domain: d.domain(), + term_keys, + })), + None if name == "eql_v3_json" => Ok(Self::Json), + None => Err(FromV2Error::UnknownDomain { name: name.into() }), + }, + None => Err(FromV2Error::UnknownDomain { name: name.into() }), + } + } + + /// The target's name for error messages: the scalar domain name, or + /// `"eql_v3_json"`. + pub(super) fn describe(&self) -> &'static str { + match self { + Self::Scalar(t) => t.domain(), + Self::Json => "eql_v3_json", + } + } +} diff --git a/crates/eql-bindings/src/lib.rs b/crates/eql-bindings/src/lib.rs new file mode 100644 index 000000000..7846e5807 --- /dev/null +++ b/crates/eql-bindings/src/lib.rs @@ -0,0 +1,117 @@ +//! # eql-bindings — canonical EQL payload types +//! +//! One Rust definition per EQL payload shape — the single source of truth +//! for every tool that produces or consumes EQL payloads +//! (`cipherstash-client`, `protect-ffi`, CipherStash Proxy). TypeScript +//! bindings (`ts-rs`) and JSON Schemas (`schemars`) are generated from +//! these definitions — run `cargo test`, see `bindings/v3/` and +//! `schema/v3/`. The Rust types are the contract. +//! +//! ts-rs rule for the generated flat-scalar payload structs (learned from the +//! original spike): ts-rs silently drops a serde attribute it cannot parse, so +//! keep field-level serde attributes out of generated scalar structs — which +//! the flat-scalar wire rule below already demands. The hand-written SteVec +//! `jsonb` structs are the exception: they deliberately use serde `flatten`, +//! `default`, and `skip_serializing_if` because that wire shape is not +//! derivable from the scalar catalog. +//! +//! The [`v3`] module holds the `eql_v3` encrypted-domain types: one struct +//! per SQL domain (`public.eql_v3_integer_eq`, `public.eql_v3_text_match`, …), +//! *capability-encoded* — index terms are required fields, never `Option`. +//! The generated flat-scalar payload structs mirror the scalar subset of +//! `eql-domains::CATALOG` 1:1, enforced by `tests/catalog_parity.rs`; the +//! hand-written SteVec `jsonb` structs are still listed in the generated +//! inventory so the full `v3::all()` surface remains catalog-ordered. +//! +//! Wire rule: **field names ARE wire names** — no `#[serde(rename)]` +//! anywhere. The struct definition reads exactly like the JSON payload. + +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; + +pub mod from_v2; +pub mod sql; +pub mod v3; + +/// EQL wire-format version. Hard-coded to `3` for every payload in the +/// [`v3`] tier, whose generated domain CHECKs assert `VALUE->>'v' = '3'`. +/// (The legacy `eql_v2` wire stays `v: 2` — see +/// `docs/reference/schema/eql-payload-v2.*.schema.json`.) +pub const EQL_SCHEMA_VERSION: u16 = 3; + +/// The envelope version field (`v`) — always exactly [`EQL_SCHEMA_VERSION`] +/// on the wire. +/// +/// Deserialization rejects any other value: the Rust analogue of the domain +/// CHECK's `VALUE->>'v' = '3'`, so a wrong-version payload fails at the type +/// boundary instead of at INSERT. The inner value is private; the only +/// constructible instance is the current version. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, TS)] +#[ts(export, export_to = "v3/")] +pub struct SchemaVersion(#[ts(type = "3")] u16); + +impl SchemaVersion { + /// The current (only) wire version, `3`. + pub const CURRENT: Self = Self(EQL_SCHEMA_VERSION); + + /// The wire value. + pub const fn get(self) -> u16 { + self.0 + } +} + +impl Default for SchemaVersion { + fn default() -> Self { + Self::CURRENT + } +} + +impl<'de> Deserialize<'de> for SchemaVersion { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let v = u16::deserialize(deserializer)?; + if v == EQL_SCHEMA_VERSION { + Ok(Self(v)) + } else { + Err(serde::de::Error::custom(format!( + "unsupported EQL schema version {v} (expected {EQL_SCHEMA_VERSION})" + ))) + } + } +} + +/// Manual schema: pins `v` to the literal `3` (`const`), mirroring the +/// domain CHECK — the derive would emit an unconstrained integer. +impl schemars::JsonSchema for SchemaVersion { + fn schema_name() -> std::borrow::Cow<'static, str> { + "SchemaVersion".into() + } + + fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema { + // KEEP IN SYNC with the `SchemaVersion` doc comment above — it is the + // canonical text. A derived `JsonSchema` would copy the doc comment + // automatically; this manual impl can't, so this hand-written copy + // must be updated alongside it. + schemars::json_schema!({ + "type": "integer", + "const": EQL_SCHEMA_VERSION, + "description": "The envelope version field (`v`) — always exactly `3` on the wire.", + }) + } +} + +/// Table + column identifier — wire shape `{"t": "...", "c": "..."}`. +/// +/// Shared by every payload. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Identifier { + /// Table name. + pub t: String, + /// Column name. + pub c: String, +} diff --git a/crates/eql-bindings/src/sql.rs b/crates/eql-bindings/src/sql.rs new file mode 100644 index 000000000..1b7b317c3 --- /dev/null +++ b/crates/eql-bindings/src/sql.rs @@ -0,0 +1,10 @@ +//! Exact SQL assets bundled with a published `eql-bindings` release. + +/// Release metadata for the SQL bundle. +pub const RELEASE_MANIFEST_JSON: &str = include_str!("../sql/release-manifest.json"); + +/// Self-contained EQL v3 install SQL for this crate version. +pub const INSTALL_SQL: &str = include_str!("../sql/cipherstash-encrypt.sql"); + +/// Self-contained EQL v3 uninstall SQL for this crate version. +pub const UNINSTALL_SQL: &str = include_str!("../sql/cipherstash-encrypt-uninstall.sql"); diff --git a/crates/eql-bindings/src/v3/bigint.rs b/crates/eql-bindings/src/v3/bigint.rs new file mode 100644 index 000000000..207980475 --- /dev/null +++ b/crates/eql-bindings/src/v3/bigint.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `bigint` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_bigint` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Bigint { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Bigint { + fn sql_domain_static() -> &'static str { + "public.eql_v3_bigint" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Bigint::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Bigint) + } +} +/// `public.eql_v3_bigint_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for BigintEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_bigint_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintEq) + } +} +/// `public.eql_v3_bigint_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for BigintOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_bigint_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintOrdOre) + } +} +/// `public.eql_v3_bigint_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for BigintOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_bigint_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintOrd) + } +} +/// `public.eql_v3_bigint_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for BigintOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_bigint_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintOrdOpe) + } +} +/// `eql_v3.query_bigint_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for BigintEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_bigint_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintEqQuery) + } +} +/// `eql_v3.query_bigint_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for BigintOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_bigint_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintOrdOreQuery) + } +} +/// `eql_v3.query_bigint_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for BigintOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_bigint_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintOrdQuery) + } +} +/// `eql_v3.query_bigint_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct BigintOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for BigintOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_bigint_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + BigintOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(BigintOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/boolean.rs b/crates/eql-bindings/src/v3/boolean.rs new file mode 100644 index 000000000..2a64a6046 --- /dev/null +++ b/crates/eql-bindings/src/v3/boolean.rs @@ -0,0 +1,39 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `boolean` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::Ciphertext; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_boolean` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Boolean { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Boolean { + fn sql_domain_static() -> &'static str { + "public.eql_v3_boolean" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Boolean::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Boolean) + } +} diff --git a/crates/eql-bindings/src/v3/date.rs b/crates/eql-bindings/src/v3/date.rs new file mode 100644 index 000000000..96f694434 --- /dev/null +++ b/crates/eql-bindings/src/v3/date.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `date` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_date` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Date { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Date { + fn sql_domain_static() -> &'static str { + "public.eql_v3_date" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Date::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Date) + } +} +/// `public.eql_v3_date_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for DateEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_date_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateEq) + } +} +/// `public.eql_v3_date_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for DateOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_date_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateOrdOre) + } +} +/// `public.eql_v3_date_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for DateOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_date_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateOrd) + } +} +/// `public.eql_v3_date_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for DateOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_date_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateOrdOpe) + } +} +/// `eql_v3.query_date_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for DateEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_date_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateEqQuery) + } +} +/// `eql_v3.query_date_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for DateOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_date_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateOrdOreQuery) + } +} +/// `eql_v3.query_date_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for DateOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_date_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateOrdQuery) + } +} +/// `eql_v3.query_date_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DateOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for DateOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_date_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DateOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DateOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/domain_type.rs b/crates/eql-bindings/src/v3/domain_type.rs new file mode 100644 index 000000000..7df0575aa --- /dev/null +++ b/crates/eql-bindings/src/v3/domain_type.rs @@ -0,0 +1,142 @@ +//! The hand-written `DomainType` trait and its `PhantomData` enumeration +//! plumbing — the stable, NON-generated core of the v3 bindings surface. The +//! per-family payload structs and the `inventory.rs` `all()` list are generated +//! from `eql-domains::CATALOG` by `eql-codegen`; this trait, the schema-id base, +//! and the blanket `PhantomData` impl are authored by hand. + +use std::marker::PhantomData; + +use schemars::{schema_for, JsonSchema, Schema}; +use serde::Deserialize; + +/// The PostgreSQL schema every user-COLUMN domain in this module inhabits. +/// The `query_` operand twins are NOT column types and live in `eql_v3` +/// instead (CIP-3442) — dropping the EQL-owned schema can never drop an +/// application column, and a query operand is never an application column. +pub const SQL_SCHEMA: &str = "public"; + +/// The version prefix every public-schema column domain's typname carries +/// (`eql_v3_integer_eq`, `eql_v3_json`, … — CIP-3472). Mirrors +/// `eql_domains::PUBLIC_TYPNAME_PREFIX` (a dev-dependency here, so the +/// literal is repeated); parity with the catalog is pinned exhaustively by +/// `tests/catalog_parity.rs`. Query-operand domains (`query_`, +/// `query_jsonb`) are NOT prefixed — the `eql_v3` schema they live in +/// already versions them. +pub const PUBLIC_TYPNAME_PREFIX: &str = "eql_v3_"; + +/// Base URL for the canonical `$id` of every published v3 JSON Schema. +/// The per-domain `$id` is `{SCHEMA_ID_BASE}{domain}.json` (see +/// [`DomainType::schema_id`]); `tests/export.rs` injects it at write time. +pub const SCHEMA_ID_BASE: &str = "https://schemas.cipherstash.com/eql/v3/"; + +/// One v3 domain type — implemented by every payload type, so any payload +/// value can report the SQL domain it inhabits (`payload.sql_domain()`). +/// +/// Each token file implements this next to the type it describes; the SQL +/// domain string is defined exactly once, in that impl. `all()` is generated +/// from `eql-domains::CATALOG` (`inventory.rs`), so it cannot drift; the +/// published JSON Schema wire contract is pinned by `tests/catalog_parity.rs`. +/// Public so FFI consumers can enumerate the protocol surface too. +pub trait DomainType { + /// Fully-qualified SQL domain name, e.g. `"public.eql_v3_integer_eq"` — the + /// per-type fact everything else derives from, defined once in each + /// type's impl. + /// + /// `where Self: Sized` keeps the trait object-safe (the method is + /// excluded from the vtable); through `dyn DomainType`, use + /// [`Self::sql_domain`]. + fn sql_domain_static() -> &'static str + where + Self: Sized; + + /// Fully-qualified SQL domain name of this payload value. + fn sql_domain(&self) -> &'static str; + + /// Unqualified SQL domain name (e.g. `"integer_eq"`) — [`Self::sql_domain`] + /// minus the schema qualifier (`public.` for column domains, `eql_v3.` for + /// the query-operand twins); matches `eql-domains` + /// `DomainFamily::domain_name`. + fn domain(&self) -> &'static str { + self.sql_domain() + .split_once('.') + .expect("sql_domain must be schema-qualified") + .1 + } + + /// Canonical `$id` for this domain's published JSON Schema — + /// `{SCHEMA_ID_BASE}{domain}.json`. The single source of truth for the + /// identity `tests/export.rs` injects; pinned by `tests/catalog_parity.rs`. + fn schema_id(&self) -> String { + format!("{SCHEMA_ID_BASE}{}.json", self.domain()) + } + + /// Required term JSON keys of this domain beyond the envelope + /// (`hm`/`ob`/`bf`/`op`), in catalog (wire) order. `Some(&[])` for a + /// storage-only scalar; `None` for the SteVec (jsonb) shapes, whose index + /// terms live per `sv` leaf rather than as flat payload keys. The + /// generated scalar impls override this from the catalog + /// (`eql_domains::Term::term_json_keys`, pinned by + /// `tests/catalog_parity.rs`), which is how [`crate::from_v2`] resolves a + /// target domain's required keys without a runtime eql-domains dependency. + /// + /// `where Self: Sized` keeps the trait object-safe; through + /// `dyn DomainType`, use [`Self::term_json_keys`]. + fn term_json_keys_static() -> Option<&'static [&'static str]> + where + Self: Sized, + { + None + } + + /// Required term JSON keys of this payload value's domain — the + /// object-safe form of [`Self::term_json_keys_static`]. + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + None + } + + /// Strictly parse `value` as this domain's payload: the concrete struct's + /// serde `Deserialize` (with `deny_unknown_fields` / `SchemaVersion` + /// enforcement where the struct declares them), reachable through the + /// trait object. [`crate::from_v2`] uses this for final validation of + /// converted payloads; the parsed value is discarded — this is a + /// validation check, not a constructor. + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error>; + + /// The type's JSON Schema. + fn schema(&self) -> Schema; +} + +/// Type-level handle: lets [`all`] enumerate the domain types without +/// payload values to box — `Box::new(PhantomData::)` is zero-sized, +/// and the delegation goes through [`DomainType::sql_domain_static`], so no +/// payload instance is ever constructed. +/// +/// [`all`]: super::all +impl DomainType for PhantomData +where + T: DomainType + JsonSchema + for<'de> Deserialize<'de>, +{ + fn sql_domain_static() -> &'static str { + T::sql_domain_static() + } + + fn sql_domain(&self) -> &'static str { + T::sql_domain_static() + } + + fn term_json_keys_static() -> Option<&'static [&'static str]> { + T::term_json_keys_static() + } + + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + T::term_json_keys_static() + } + + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + T::deserialize(value).map(|_| ()) + } + + fn schema(&self) -> Schema { + schema_for!(T) + } +} diff --git a/crates/eql-bindings/src/v3/double.rs b/crates/eql-bindings/src/v3/double.rs new file mode 100644 index 000000000..30a218d4e --- /dev/null +++ b/crates/eql-bindings/src/v3/double.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `double` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_double` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Double { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Double { + fn sql_domain_static() -> &'static str { + "public.eql_v3_double" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Double::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Double) + } +} +/// `public.eql_v3_double_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for DoubleEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_double_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleEq) + } +} +/// `public.eql_v3_double_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for DoubleOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_double_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleOrdOre) + } +} +/// `public.eql_v3_double_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for DoubleOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_double_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleOrd) + } +} +/// `public.eql_v3_double_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for DoubleOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_double_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleOrdOpe) + } +} +/// `eql_v3.query_double_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for DoubleEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_double_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleEqQuery) + } +} +/// `eql_v3.query_double_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for DoubleOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_double_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleOrdOreQuery) + } +} +/// `eql_v3.query_double_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for DoubleOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_double_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleOrdQuery) + } +} +/// `eql_v3.query_double_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct DoubleOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for DoubleOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_double_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + DoubleOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(DoubleOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/integer.rs b/crates/eql-bindings/src/v3/integer.rs new file mode 100644 index 000000000..92486727f --- /dev/null +++ b/crates/eql-bindings/src/v3/integer.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `integer` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_integer` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Integer { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Integer { + fn sql_domain_static() -> &'static str { + "public.eql_v3_integer" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Integer::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Integer) + } +} +/// `public.eql_v3_integer_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for IntegerEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_integer_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerEq) + } +} +/// `public.eql_v3_integer_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for IntegerOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_integer_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerOrdOre) + } +} +/// `public.eql_v3_integer_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for IntegerOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_integer_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerOrd) + } +} +/// `public.eql_v3_integer_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for IntegerOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_integer_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerOrdOpe) + } +} +/// `eql_v3.query_integer_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for IntegerEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_integer_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerEqQuery) + } +} +/// `eql_v3.query_integer_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for IntegerOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_integer_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerOrdOreQuery) + } +} +/// `eql_v3.query_integer_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for IntegerOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_integer_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerOrdQuery) + } +} +/// `eql_v3.query_integer_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct IntegerOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for IntegerOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_integer_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + IntegerOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(IntegerOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/inventory.rs b/crates/eql-bindings/src/v3/inventory.rs new file mode 100644 index 000000000..f35a3c889 --- /dev/null +++ b/crates/eql-bindings/src/v3/inventory.rs @@ -0,0 +1,110 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `all()` / `all_query()` inventories — every v3 stored and query-operand payload type in eql-domains::CATALOG order. Generated from the catalog; the DomainType trait, the shared newtypes, and the architectural module doc stay hand-written (domain_type.rs / terms.rs / mod.rs). +use super::domain_type::DomainType; +use std::marker::PhantomData; +/// Every v3 stored-payload + SteVec domain type, in +/// `eql-domains::CATALOG` order — generated. This is the inventory +/// `from_v2::TargetDomain` resolves conversion targets against; query +/// twins are NOT here (see [`all_query`]). +pub fn all() -> Vec> { + vec![ + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + ] +} +/// Every v3 QUERY-operand twin (`eql_v3.query_`, the enveloped +/// term-only operand), in `eql-domains::CATALOG` order — generated. +/// Separate from [`all`] so query domains never resolve as stored +/// conversion targets; used by the JSON Schema export and query +/// validation. +pub fn all_query() -> Vec> { + vec![ + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + Box::new(PhantomData::), + ] +} diff --git a/crates/eql-bindings/src/v3/jsonb.rs b/crates/eql-bindings/src/v3/jsonb.rs new file mode 100644 index 000000000..4a1f2d919 --- /dev/null +++ b/crates/eql-bindings/src/v3/jsonb.rs @@ -0,0 +1,160 @@ +//! The `jsonb` (SteVec) encrypted-JSONB payload types — HAND-WRITTEN. +//! +//! Unlike the scalar families, the SteVec struct bodies (fields, `#[serde(flatten)]`, +//! the `Option` array marker, per-struct serde strictness) are not derivable +//! from `eql-domains::CATALOG`, so they live here by hand — symmetric with the +//! hand-written SQL under `src/v3/jsonb/`. The generated `inventory.rs` still lists +//! these three domains (in CATALOG order) via its `Shape` branch. See the SteVec +//! caveat in `mod.rs` for why the entry/query structs are necessarily lax. + +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; + +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, Selector}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; + +/// The `k` envelope key — the EQL payload **form discriminator**, always the +/// literal `"sv"` for an encrypted-JSONB document. +/// +/// `k` distinguishes the payload forms in the canonical wire contract (`"ct"` = +/// scalar ciphertext, `"sv"` = STE-vec). `eql_v3` itself does not consume `k` +/// (the typed domain + the structural `c`-vs-`sv` shape already discriminate, +/// and no `eql_v3` SQL reads it), but the canonical `SteVecPayload` +/// (`eql-payload-v2.3.schema.json`, `required: [v,k,i,sv]`) mandates it and +/// cipherstash-client emits it on every SteVec document — so the strict document +/// struct must model it or it rejects the real wire. +/// +/// Pinned exactly like [`SchemaVersion`] pins `v`: deserialization rejects any +/// value other than `"sv"`, so a scalar (`k:"ct"`) payload cannot be read back +/// as a document. The inner value is private; the only constructible instance is +/// [`SteVecForm::SV`]. +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, Serialize, TS)] +#[ts(export, export_to = "v3/")] +pub struct SteVecForm(#[ts(type = "\"sv\"")] &'static str); + +impl SteVecForm { + /// The only valid form for a document: the STE-vec discriminator `"sv"`. + pub const SV: Self = Self("sv"); +} + +impl<'de> Deserialize<'de> for SteVecForm { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let k = String::deserialize(deserializer)?; + if k == "sv" { + Ok(Self::SV) + } else { + Err(serde::de::Error::custom(format!( + "unsupported SteVec form discriminator {k:?} (expected \"sv\")" + ))) + } + } +} + +/// Manual schema: pins `k` to the literal `"sv"` (`const`), mirroring the +/// `SchemaVersion` schema — the derive would emit an unconstrained string. +impl JsonSchema for SteVecForm { + fn schema_name() -> std::borrow::Cow<'static, str> { + "SteVecForm".into() + } + + fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema { + schemars::json_schema!({ + "type": "string", + "const": "sv", + "description": "The `k` envelope form discriminator — always `\"sv\"` for a SteVec document.", + }) + } +} + +/// `public.eql_v3_json` — a SteVec encrypted-JSONB document (`{v, k, i, sv:[entry]}`, +/// no root ciphertext). Strict. `k` is the `"sv"` form discriminator (see +/// [`SteVecForm`]) — carried on the real wire, so the strict struct models it. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SteVecDocument { + pub v: SchemaVersion, + pub k: SteVecForm, + pub i: Identifier, + pub sv: Vec, +} + +/// `public.eql_v3_jsonb_entry` — one sv element (returned by `->`). Carries a selector +/// `s`, ciphertext `c`, optional array-membership marker `a`, and exactly one of +/// `hm` XOR `op`. LAX (flatten precludes `deny_unknown_fields`): tolerates the +/// root `i`/`v` merged in by `->`. XOR of the term is enforced by the SQL CHECK. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct SteVecEntry { + pub s: Selector, + pub c: Ciphertext, + // `#[ts(optional = nullable)]` emits `a?: boolean | null` — ts-rs does NOT + // infer optionality from serde `default`/`skip_serializing_if` (10.1: only an + // explicit `#[ts(optional)]`/`optional = nullable` does), so without this the + // TS binding would render `a` REQUIRED and drift from the JSON Schema, which + // excludes `a` from `required`. `= nullable` keeps the `| null`. + #[serde(default, skip_serializing_if = "Option::is_none")] + #[ts(optional = nullable)] + pub a: Option, + #[serde(flatten)] + pub term: SteVecTerm, +} + +/// `eql_v3.query_jsonb` — a containment needle (`{sv:[query-entry]}`). Strict. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SteVecQuery { + pub sv: Vec, +} + +/// One element of a SteVec containment needle: a selector plus one term, and +/// (per the SQL CHECK) no ciphertext. LAX for the same flatten reason as +/// `SteVecEntry`; the "no `c`" contract is enforced by `is_valid_ste_vec_query_payload`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct SteVecQueryEntry { + pub s: Selector, + #[serde(flatten)] + pub term: SteVecTerm, +} + +/// The per-entry deterministic term: exactly one of `hm` (HMAC equality) or `op` +/// (CLLW-OPE ordering). Untagged — a document mixes both across its `sv` array. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(untagged)] +pub enum SteVecTerm { + Hmac { hm: Hmac256 }, + OpeCllw { op: OpeCllw }, +} + +macro_rules! ste_vec_domain_type { + ($ty:ident, $sql:literal) => { + impl DomainType for $ty { + fn sql_domain_static() -> &'static str { + $sql + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + // `term_json_keys` keeps the trait default (`None`): SteVec index + // terms live per sv leaf (`hm` XOR `op`), not as flat payload keys. + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + <$ty as Deserialize>::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!($ty) + } + } + }; +} + +ste_vec_domain_type!(SteVecDocument, "public.eql_v3_json"); +ste_vec_domain_type!(SteVecEntry, "public.eql_v3_jsonb_entry"); +ste_vec_domain_type!(SteVecQuery, "eql_v3.query_jsonb"); diff --git a/crates/eql-bindings/src/v3/mod.rs b/crates/eql-bindings/src/v3/mod.rs new file mode 100644 index 000000000..82dde2dec --- /dev/null +++ b/crates/eql-bindings/src/v3/mod.rs @@ -0,0 +1,156 @@ +//! # `eql_v3` domain payload types +//! +//! One Rust struct per **SQL domain** in the `eql_v3` schema — the +//! capability-encoded design from the original integer scalar prototype +//! (PR #236's first cut), formalized: +//! the SQL surface is generated from `eql-domains::CATALOG`, and these types +//! mirror it 1:1 — `all()` is generated from the same catalog (`inventory.rs`), +//! so it cannot drift; the published JSON Schema wire contract is pinned by +//! `tests/catalog_parity.rs` and the emitted `.ts` property order by +//! `tests/ts_property_order.rs`. +//! +//! **Versioning.** "v3" is the SQL schema generation (`eql_v3.*` domains), +//! and the v3 tier now carries the matching JSON envelope version `v: 3` +//! ([`crate::EQL_SCHEMA_VERSION`]) — every generated domain CHECK asserts +//! `VALUE->>'v' = '3'`. The wire field names are unchanged from v2 +//! (`hm`/`ob`/`bf`, plus the new `op`; the purpose-named rename in the +//! payload-scheme-discipline RFC is deferred). The legacy `eql_v2` wire +//! (documented by `docs/reference/schema/eql-payload-v2.*.schema.json`) +//! stays `v: 2`. +//! +//! ## Shape of every flat scalar payload +//! +//! For the generated flat-scalar families, every payload has the shared envelope +//! keys (required by every scalar domain CHECK, mirroring `ENVELOPE_KEYS` in +//! `eql-domains`): `v`, `i`, `c`. Then the domain's required term keys — `hm` +//! for `_eq`, `ob` for `_ord`/`_ord_ore`, `op` for `_ord_ope`, `bf` for +//! `_match`, none for +//! storage-only. `Option` does not appear in the generated scalar structs: the +//! capability **is** the type identity. Hold a [`integer::IntegerEq`] and `hm` is +//! present, guaranteed by the Rust type and (SQL-side) by the domain CHECK. A +//! missing term key is a deserialization error — the Rust analogue of the CHECK +//! constraint. +//! +//! One exception to "`ob` for `_ord`": `text`'s ordered domains carry **both** +//! `hm` and the ordering term (`text_ord`/`text_ord_ore`/`text_search` carry +//! `hm` + `ob`; `text_ord_ope` carries `hm` + `op`), where the non-text +//! ordered domains carry the ordering term alone. Text routes `=`/`<>` +//! through `hm` rather than the ordering term because lexicographic ORE/OPE +//! over text is not equality-lossless, so equality needs the HMAC. The +//! generated struct doc surfaces this structurally — its required-keys line +//! lists `hm` `ob` (or `hm` `op`) rather than just the ordering key. +//! +//! The generated flat-scalar types are also **strict**: every scalar struct is +//! `#[serde(deny_unknown_fields)]`, so a payload carrying keys outside the +//! domain's set fails to deserialize rather than being silently stripped on the +//! next serialize (a pass-through consumer must not lose data it didn't know +//! about), and the `v` field is [`crate::SchemaVersion`], which rejects any +//! version other than `3`. The SteVec `jsonb` family below is structurally +//! different: its document/root shape has no root `c`, its entries flatten a +//! term enum, and only the flatten-free structs can be strict. +//! +//! **The `k` form discriminator, and why the flat-scalar structs omit it.** The +//! canonical EQL payload envelope (`eql-payload-v2.3.schema.json`) carries a `k` +//! form discriminator: `"ct"` for the scalar-ciphertext form, `"sv"` for the +//! STE-vec form. It is **optional on the scalar (`ct`) form** — the canonical +//! `EncryptedPayload` requires only `v`/`c`/`i`, and both the schema and the SQL +//! CHECKs discriminate structurally (`c`-vs-`sv` presence), not on `k`. So the +//! flat-scalar structs are deliberately `{v,i,c,+terms}` with no `k` field — +//! matching the scalar CHECK exactly. (Note: `eql_v3` never *reads* `k` — the +//! typed domain is the discriminator. If a producer emitted `k:"ct"` on a scalar +//! payload, these strict structs would reject it; no test currently parses real +//! scalar ciphertext into the bindings, so that path is unverified.) The one +//! place `k` is modelled is the SteVec **document** — see the `jsonb` note below. +//! +//! ## Why there is no discriminated enum +//! +//! Cross-token: impossible — an `integer_eq` and a `bigint_eq` payload are +//! byte-identical on the wire (`v`/`i`/`c`/`hm`); nothing discriminates them. +//! Per-token: for the FLAT SCALAR families it is deliberately omitted — an +//! untagged enum over a token's domains would discriminate by key-sniffing, and +//! `_ord` vs `_ord_ore` are identical shapes that no sniffing can separate. +//! Consumers read from a typed column and already know the domain. +//! +//! The generated [`DomainPayload`] enum (`payload.rs`) does NOT contradict +//! this rule: it spans every stored-payload domain but derives only +//! `Serialize` (untagged, so the wire form is exactly the inner struct's) and +//! is constructible solely from a KNOWN domain name +//! ([`payload::DomainPayload::parse`], [`crate::from_v2::from_v2_typed`]) — +//! there is still no `Deserialize`, because inference from bytes remains +//! unsound. The hand-written [`QueryPayload`] enum (`query_payload.rs`) +//! follows the same Serialize-only rule for QUERY payloads — see its module +//! doc for why it is hand-written rather than generated. +//! +//! The SteVec `jsonb` family is the ONE principled exception: a single encrypted +//! document legitimately mixes `hm` leaves (bool / root) and `oc` leaves +//! (string / number) in one `sv` array, so `SteVecEntry` must hold either term. +//! There the untagged [`jsonb::SteVecTerm`] (`{hm} | {oc}`) is inherent to the +//! wire, not a sniffing workaround — the "per-domain typing is possible" +//! reasoning above simply does not apply to a heterogeneous `sv` array. +//! +//! ## Per-family caller-facing notes +//! +//! These are not derivable from the catalog and are documented here because the +//! per-family modules are generated. +//! +//! **`double` / `real` special values.** `-0.0` canonicalizes to `+0.0` +//! (equal under `=`, IEEE-consistent) and `±Inf` order correctly +//! (`-Inf < finite < +Inf`). **NaN is unordered and unspecified in the +//! encoder**: it can be encrypted, stored, and pass the domain CHECK, but it +//! carries **no comparison guarantee** and does NOT follow IEEE semantics. The +//! domain CHECK validates only the envelope — it cannot inspect the ciphertext +//! — so a NaN payload is never rejected server-side. **Reject NaN client-side +//! before encryption** if your column must not contain it; otherwise a NaN row +//! sorts at an arbitrary (but deterministic) position in an encrypted range +//! scan. See the `float_special` regression suite for the locked behaviour. +//! +//! **`boolean` is storage-only by design.** It has no `_eq`/`_ord` domain and +//! carries no index term: a two-value column has so little cardinality that any +//! searchable index (even HMAC equality) would trivially leak the plaintext +//! distribution. The payload is `{v,i,c}` only and every operator is blocked. +//! +//! **`jsonb` (SteVec) is the one place `Option` and lax serde appear.** +//! `SteVecEntry.a` is `Option` — the sv-array-membership marker, absent +//! for non-array leaves — the sole `Option` in this module. `SteVecEntry` and +//! `SteVecQueryEntry` both carry a `#[serde(flatten)] SteVecTerm`, and serde +//! silently disables `#[serde(deny_unknown_fields)]` on any struct with a +//! flattened field — so these two structs are NECESSARILY lax: they accept +//! arbitrary extra keys, which is exactly what lets a `->`-returned entry carry +//! the root `i`/`v` merged in. Strictness for the query/entry contract (e.g. +//! "a query element carries no ciphertext `c`") is therefore enforced by the SQL +//! domain CHECKs (`is_valid_ste_vec_*_payload`), not client-side. Only the two +//! flatten-free structs — `SteVecDocument` and `SteVecQuery` — are +//! `#[serde(deny_unknown_fields)]`. +//! +//! **The document carries the `k:"sv"` form discriminator.** Unlike the scalar +//! form (where `k` is optional — see above), the canonical `SteVecPayload` +//! *requires* `k` (`required: [v,k,i,sv]`, `const "sv"`) and cipherstash-client +//! emits it on every real SteVec document. Because `SteVecDocument` is strict +//! (`deny_unknown_fields`), it MUST model `k` or it rejects the real wire — so it +//! carries a [`jsonb::SteVecForm`] field pinned to `"sv"`, exactly as +//! `SchemaVersion` pins `v`. `SteVecQuery` needs no `k`: it is a locally-built +//! `{sv:[…]}` containment needle (`eql_v3.to_ste_vec_query`), not a stored +//! envelope. `eql_v3` itself never reads `k`; it is passthrough form metadata +//! that the document preserves on round-trip. + +pub mod bigint; +pub mod boolean; +pub mod date; +pub mod domain_type; +pub mod double; +pub mod integer; +pub mod inventory; +pub mod jsonb; +pub mod numeric; +pub mod payload; +pub mod query_payload; +pub mod real; +pub mod smallint; +pub mod terms; +pub mod text; +pub mod timestamp; + +pub use domain_type::{DomainType, SCHEMA_ID_BASE, SQL_SCHEMA}; +pub use inventory::{all, all_query}; +pub use payload::DomainPayload; +pub use query_payload::QueryPayload; diff --git a/crates/eql-bindings/src/v3/numeric.rs b/crates/eql-bindings/src/v3/numeric.rs new file mode 100644 index 000000000..0131ac4b2 --- /dev/null +++ b/crates/eql-bindings/src/v3/numeric.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `numeric` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_numeric` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Numeric { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Numeric { + fn sql_domain_static() -> &'static str { + "public.eql_v3_numeric" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Numeric::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Numeric) + } +} +/// `public.eql_v3_numeric_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for NumericEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_numeric_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericEq) + } +} +/// `public.eql_v3_numeric_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for NumericOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_numeric_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericOrdOre) + } +} +/// `public.eql_v3_numeric_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for NumericOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_numeric_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericOrd) + } +} +/// `public.eql_v3_numeric_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for NumericOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_numeric_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericOrdOpe) + } +} +/// `eql_v3.query_numeric_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for NumericEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_numeric_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericEqQuery) + } +} +/// `eql_v3.query_numeric_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for NumericOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_numeric_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericOrdOreQuery) + } +} +/// `eql_v3.query_numeric_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for NumericOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_numeric_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericOrdQuery) + } +} +/// `eql_v3.query_numeric_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct NumericOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for NumericOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_numeric_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + NumericOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(NumericOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/payload.rs b/crates/eql-bindings/src/v3/payload.rs new file mode 100644 index 000000000..12765a537 --- /dev/null +++ b/crates/eql-bindings/src/v3/payload.rs @@ -0,0 +1,324 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The generated `DomainPayload` enum — every stored-payload v3 domain in one Rust type. Generated from the catalog; the DomainType trait, the shared newtypes, and the architectural module doc stay hand-written (domain_type.rs / terms.rs / mod.rs). +use super::domain_type::DomainType; +use serde::{Deserialize, Serialize}; +/// Every stored-payload v3 domain in one type: one variant per flat +/// scalar domain in `eql-domains::CATALOG` plus the SteVec document +/// (`public.eql_v3_json`). Generated from the catalog, so it cannot drift +/// when the catalog grows. +/// +/// Serialization is exactly the inner struct's (`#[serde(untagged)]` +/// adds no tagging), so typing a payload never changes the wire. +/// Deliberately NO `Deserialize`: cross-token payloads are +/// byte-identical on the wire (see "Why there is no discriminated +/// enum" in the v3 module docs), so a variant is only constructible +/// from a KNOWN domain — [`DomainPayload::parse`] or +/// [`crate::from_v2::from_v2_typed`] — never inferred from bytes. +#[derive(Clone, Debug, PartialEq, Serialize)] +#[serde(untagged)] +pub enum DomainPayload { + /// The `public.eql_v3_integer` payload. + Integer(super::integer::Integer), + /// The `public.eql_v3_integer_eq` payload. + IntegerEq(super::integer::IntegerEq), + /// The `public.eql_v3_integer_ord_ore` payload. + IntegerOrdOre(super::integer::IntegerOrdOre), + /// The `public.eql_v3_integer_ord` payload. + IntegerOrd(super::integer::IntegerOrd), + /// The `public.eql_v3_integer_ord_ope` payload. + IntegerOrdOpe(super::integer::IntegerOrdOpe), + /// The `public.eql_v3_smallint` payload. + Smallint(super::smallint::Smallint), + /// The `public.eql_v3_smallint_eq` payload. + SmallintEq(super::smallint::SmallintEq), + /// The `public.eql_v3_smallint_ord_ore` payload. + SmallintOrdOre(super::smallint::SmallintOrdOre), + /// The `public.eql_v3_smallint_ord` payload. + SmallintOrd(super::smallint::SmallintOrd), + /// The `public.eql_v3_smallint_ord_ope` payload. + SmallintOrdOpe(super::smallint::SmallintOrdOpe), + /// The `public.eql_v3_bigint` payload. + Bigint(super::bigint::Bigint), + /// The `public.eql_v3_bigint_eq` payload. + BigintEq(super::bigint::BigintEq), + /// The `public.eql_v3_bigint_ord_ore` payload. + BigintOrdOre(super::bigint::BigintOrdOre), + /// The `public.eql_v3_bigint_ord` payload. + BigintOrd(super::bigint::BigintOrd), + /// The `public.eql_v3_bigint_ord_ope` payload. + BigintOrdOpe(super::bigint::BigintOrdOpe), + /// The `public.eql_v3_date` payload. + Date(super::date::Date), + /// The `public.eql_v3_date_eq` payload. + DateEq(super::date::DateEq), + /// The `public.eql_v3_date_ord_ore` payload. + DateOrdOre(super::date::DateOrdOre), + /// The `public.eql_v3_date_ord` payload. + DateOrd(super::date::DateOrd), + /// The `public.eql_v3_date_ord_ope` payload. + DateOrdOpe(super::date::DateOrdOpe), + /// The `public.eql_v3_timestamp` payload. + Timestamp(super::timestamp::Timestamp), + /// The `public.eql_v3_timestamp_eq` payload. + TimestampEq(super::timestamp::TimestampEq), + /// The `public.eql_v3_timestamp_ord_ore` payload. + TimestampOrdOre(super::timestamp::TimestampOrdOre), + /// The `public.eql_v3_timestamp_ord` payload. + TimestampOrd(super::timestamp::TimestampOrd), + /// The `public.eql_v3_timestamp_ord_ope` payload. + TimestampOrdOpe(super::timestamp::TimestampOrdOpe), + /// The `public.eql_v3_numeric` payload. + Numeric(super::numeric::Numeric), + /// The `public.eql_v3_numeric_eq` payload. + NumericEq(super::numeric::NumericEq), + /// The `public.eql_v3_numeric_ord_ore` payload. + NumericOrdOre(super::numeric::NumericOrdOre), + /// The `public.eql_v3_numeric_ord` payload. + NumericOrd(super::numeric::NumericOrd), + /// The `public.eql_v3_numeric_ord_ope` payload. + NumericOrdOpe(super::numeric::NumericOrdOpe), + /// The `public.eql_v3_text` payload. + Text(super::text::Text), + /// The `public.eql_v3_text_eq` payload. + TextEq(super::text::TextEq), + /// The `public.eql_v3_text_match` payload. + TextMatch(super::text::TextMatch), + /// The `public.eql_v3_text_ord_ore` payload. + TextOrdOre(super::text::TextOrdOre), + /// The `public.eql_v3_text_ord` payload. + TextOrd(super::text::TextOrd), + /// The `public.eql_v3_text_ord_ope` payload. + TextOrdOpe(super::text::TextOrdOpe), + /// The `public.eql_v3_text_search` payload. + TextSearch(super::text::TextSearch), + /// The `public.eql_v3_boolean` payload. + Boolean(super::boolean::Boolean), + /// The `public.eql_v3_real` payload. + Real(super::real::Real), + /// The `public.eql_v3_real_eq` payload. + RealEq(super::real::RealEq), + /// The `public.eql_v3_real_ord_ore` payload. + RealOrdOre(super::real::RealOrdOre), + /// The `public.eql_v3_real_ord` payload. + RealOrd(super::real::RealOrd), + /// The `public.eql_v3_real_ord_ope` payload. + RealOrdOpe(super::real::RealOrdOpe), + /// The `public.eql_v3_double` payload. + Double(super::double::Double), + /// The `public.eql_v3_double_eq` payload. + DoubleEq(super::double::DoubleEq), + /// The `public.eql_v3_double_ord_ore` payload. + DoubleOrdOre(super::double::DoubleOrdOre), + /// The `public.eql_v3_double_ord` payload. + DoubleOrd(super::double::DoubleOrd), + /// The `public.eql_v3_double_ord_ope` payload. + DoubleOrdOpe(super::double::DoubleOrdOpe), + /// The `public.eql_v3_json` payload. + SteVecDocument(super::jsonb::SteVecDocument), +} +impl DomainPayload { + /// Strictly parse `value` as `domain`'s payload, KEEPING the + /// parsed value — the constructor counterpart of + /// [`DomainType::parse_value`] (which validates and discards). + /// `domain` is the unqualified installed name (`"eql_v3_integer_eq"`, + /// `"eql_v3_json"`, …). `None` when `domain` is not a stored-payload domain (the + /// SteVec entry/query shapes included); `Some(Err)` when the + /// strict parse fails (`deny_unknown_fields`, the + /// `SchemaVersion`/`SteVecForm` pins). + pub fn parse( + domain: &str, + value: &serde_json::Value, + ) -> Option> { + match domain { + "eql_v3_integer" => { + Some(super::integer::Integer::deserialize(value).map(Self::Integer)) + } + "eql_v3_integer_eq" => { + Some(super::integer::IntegerEq::deserialize(value).map(Self::IntegerEq)) + } + "eql_v3_integer_ord_ore" => { + Some(super::integer::IntegerOrdOre::deserialize(value).map(Self::IntegerOrdOre)) + } + "eql_v3_integer_ord" => { + Some(super::integer::IntegerOrd::deserialize(value).map(Self::IntegerOrd)) + } + "eql_v3_integer_ord_ope" => { + Some(super::integer::IntegerOrdOpe::deserialize(value).map(Self::IntegerOrdOpe)) + } + "eql_v3_smallint" => { + Some(super::smallint::Smallint::deserialize(value).map(Self::Smallint)) + } + "eql_v3_smallint_eq" => { + Some(super::smallint::SmallintEq::deserialize(value).map(Self::SmallintEq)) + } + "eql_v3_smallint_ord_ore" => { + Some(super::smallint::SmallintOrdOre::deserialize(value).map(Self::SmallintOrdOre)) + } + "eql_v3_smallint_ord" => { + Some(super::smallint::SmallintOrd::deserialize(value).map(Self::SmallintOrd)) + } + "eql_v3_smallint_ord_ope" => { + Some(super::smallint::SmallintOrdOpe::deserialize(value).map(Self::SmallintOrdOpe)) + } + "eql_v3_bigint" => Some(super::bigint::Bigint::deserialize(value).map(Self::Bigint)), + "eql_v3_bigint_eq" => { + Some(super::bigint::BigintEq::deserialize(value).map(Self::BigintEq)) + } + "eql_v3_bigint_ord_ore" => { + Some(super::bigint::BigintOrdOre::deserialize(value).map(Self::BigintOrdOre)) + } + "eql_v3_bigint_ord" => { + Some(super::bigint::BigintOrd::deserialize(value).map(Self::BigintOrd)) + } + "eql_v3_bigint_ord_ope" => { + Some(super::bigint::BigintOrdOpe::deserialize(value).map(Self::BigintOrdOpe)) + } + "eql_v3_date" => Some(super::date::Date::deserialize(value).map(Self::Date)), + "eql_v3_date_eq" => Some(super::date::DateEq::deserialize(value).map(Self::DateEq)), + "eql_v3_date_ord_ore" => { + Some(super::date::DateOrdOre::deserialize(value).map(Self::DateOrdOre)) + } + "eql_v3_date_ord" => Some(super::date::DateOrd::deserialize(value).map(Self::DateOrd)), + "eql_v3_date_ord_ope" => { + Some(super::date::DateOrdOpe::deserialize(value).map(Self::DateOrdOpe)) + } + "eql_v3_timestamp" => { + Some(super::timestamp::Timestamp::deserialize(value).map(Self::Timestamp)) + } + "eql_v3_timestamp_eq" => { + Some(super::timestamp::TimestampEq::deserialize(value).map(Self::TimestampEq)) + } + "eql_v3_timestamp_ord_ore" => Some( + super::timestamp::TimestampOrdOre::deserialize(value).map(Self::TimestampOrdOre), + ), + "eql_v3_timestamp_ord" => { + Some(super::timestamp::TimestampOrd::deserialize(value).map(Self::TimestampOrd)) + } + "eql_v3_timestamp_ord_ope" => Some( + super::timestamp::TimestampOrdOpe::deserialize(value).map(Self::TimestampOrdOpe), + ), + "eql_v3_numeric" => { + Some(super::numeric::Numeric::deserialize(value).map(Self::Numeric)) + } + "eql_v3_numeric_eq" => { + Some(super::numeric::NumericEq::deserialize(value).map(Self::NumericEq)) + } + "eql_v3_numeric_ord_ore" => { + Some(super::numeric::NumericOrdOre::deserialize(value).map(Self::NumericOrdOre)) + } + "eql_v3_numeric_ord" => { + Some(super::numeric::NumericOrd::deserialize(value).map(Self::NumericOrd)) + } + "eql_v3_numeric_ord_ope" => { + Some(super::numeric::NumericOrdOpe::deserialize(value).map(Self::NumericOrdOpe)) + } + "eql_v3_text" => Some(super::text::Text::deserialize(value).map(Self::Text)), + "eql_v3_text_eq" => Some(super::text::TextEq::deserialize(value).map(Self::TextEq)), + "eql_v3_text_match" => { + Some(super::text::TextMatch::deserialize(value).map(Self::TextMatch)) + } + "eql_v3_text_ord_ore" => { + Some(super::text::TextOrdOre::deserialize(value).map(Self::TextOrdOre)) + } + "eql_v3_text_ord" => Some(super::text::TextOrd::deserialize(value).map(Self::TextOrd)), + "eql_v3_text_ord_ope" => { + Some(super::text::TextOrdOpe::deserialize(value).map(Self::TextOrdOpe)) + } + "eql_v3_text_search" => { + Some(super::text::TextSearch::deserialize(value).map(Self::TextSearch)) + } + "eql_v3_boolean" => { + Some(super::boolean::Boolean::deserialize(value).map(Self::Boolean)) + } + "eql_v3_real" => Some(super::real::Real::deserialize(value).map(Self::Real)), + "eql_v3_real_eq" => Some(super::real::RealEq::deserialize(value).map(Self::RealEq)), + "eql_v3_real_ord_ore" => { + Some(super::real::RealOrdOre::deserialize(value).map(Self::RealOrdOre)) + } + "eql_v3_real_ord" => Some(super::real::RealOrd::deserialize(value).map(Self::RealOrd)), + "eql_v3_real_ord_ope" => { + Some(super::real::RealOrdOpe::deserialize(value).map(Self::RealOrdOpe)) + } + "eql_v3_double" => Some(super::double::Double::deserialize(value).map(Self::Double)), + "eql_v3_double_eq" => { + Some(super::double::DoubleEq::deserialize(value).map(Self::DoubleEq)) + } + "eql_v3_double_ord_ore" => { + Some(super::double::DoubleOrdOre::deserialize(value).map(Self::DoubleOrdOre)) + } + "eql_v3_double_ord" => { + Some(super::double::DoubleOrd::deserialize(value).map(Self::DoubleOrd)) + } + "eql_v3_double_ord_ope" => { + Some(super::double::DoubleOrdOpe::deserialize(value).map(Self::DoubleOrdOpe)) + } + "eql_v3_json" => { + Some(super::jsonb::SteVecDocument::deserialize(value).map(Self::SteVecDocument)) + } + _ => None, + } + } + /// The inner payload as a [`DomainType`] trait object. + pub fn as_domain_type(&self) -> &dyn DomainType { + match self { + Self::Integer(payload) => payload, + Self::IntegerEq(payload) => payload, + Self::IntegerOrdOre(payload) => payload, + Self::IntegerOrd(payload) => payload, + Self::IntegerOrdOpe(payload) => payload, + Self::Smallint(payload) => payload, + Self::SmallintEq(payload) => payload, + Self::SmallintOrdOre(payload) => payload, + Self::SmallintOrd(payload) => payload, + Self::SmallintOrdOpe(payload) => payload, + Self::Bigint(payload) => payload, + Self::BigintEq(payload) => payload, + Self::BigintOrdOre(payload) => payload, + Self::BigintOrd(payload) => payload, + Self::BigintOrdOpe(payload) => payload, + Self::Date(payload) => payload, + Self::DateEq(payload) => payload, + Self::DateOrdOre(payload) => payload, + Self::DateOrd(payload) => payload, + Self::DateOrdOpe(payload) => payload, + Self::Timestamp(payload) => payload, + Self::TimestampEq(payload) => payload, + Self::TimestampOrdOre(payload) => payload, + Self::TimestampOrd(payload) => payload, + Self::TimestampOrdOpe(payload) => payload, + Self::Numeric(payload) => payload, + Self::NumericEq(payload) => payload, + Self::NumericOrdOre(payload) => payload, + Self::NumericOrd(payload) => payload, + Self::NumericOrdOpe(payload) => payload, + Self::Text(payload) => payload, + Self::TextEq(payload) => payload, + Self::TextMatch(payload) => payload, + Self::TextOrdOre(payload) => payload, + Self::TextOrd(payload) => payload, + Self::TextOrdOpe(payload) => payload, + Self::TextSearch(payload) => payload, + Self::Boolean(payload) => payload, + Self::Real(payload) => payload, + Self::RealEq(payload) => payload, + Self::RealOrdOre(payload) => payload, + Self::RealOrd(payload) => payload, + Self::RealOrdOpe(payload) => payload, + Self::Double(payload) => payload, + Self::DoubleEq(payload) => payload, + Self::DoubleOrdOre(payload) => payload, + Self::DoubleOrd(payload) => payload, + Self::DoubleOrdOpe(payload) => payload, + Self::SteVecDocument(payload) => payload, + } + } + /// Fully-qualified SQL domain name, e.g. `"public.eql_v3_integer_eq"`. + pub fn sql_domain(&self) -> &'static str { + self.as_domain_type().sql_domain() + } + /// Unqualified SQL domain name, e.g. `"eql_v3_integer_eq"` — the name + /// [`DomainPayload::parse`] accepts. + pub fn domain(&self) -> &'static str { + self.as_domain_type().domain() + } +} diff --git a/crates/eql-bindings/src/v3/query_payload.rs b/crates/eql-bindings/src/v3/query_payload.rs new file mode 100644 index 000000000..1c4a003cf --- /dev/null +++ b/crates/eql-bindings/src/v3/query_payload.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The generated `QueryPayload` enum — every v3 QUERY-operand domain in one Rust type. Generated from the catalog; the DomainType trait, the shared newtypes, and the architectural module doc stay hand-written (domain_type.rs / terms.rs / mod.rs). +use super::domain_type::DomainType; +use serde::{Deserialize, Serialize}; +/// Every v3 QUERY-operand shape in one type: one variant per term-bearing +/// scalar query twin (`eql_v3.query_`, the enveloped term-only +/// operand — `{v, i, }`, no `c`) plus the SteVec containment +/// needle (`eql_v3.query_jsonb`). Generated from the catalog, so it +/// cannot drift when the catalog grows. +/// +/// Serialization is exactly the inner struct's (`#[serde(untagged)]` +/// adds no tagging), so typing a query operand never changes the wire. +/// Deliberately NO `Deserialize`: cross-token operands are byte-identical +/// on the wire, so a variant is only constructible from a KNOWN domain +/// — [`QueryPayload::parse`] or [`crate::from_v2::from_v2_query_typed`] — +/// never inferred from bytes. No ts-rs/schemars: it adds no wire shape. +#[derive(Clone, Debug, PartialEq, Serialize)] +#[serde(untagged)] +pub enum QueryPayload { + /// The `eql_v3.query_integer_eq` query operand. + IntegerEqQuery(super::integer::IntegerEqQuery), + /// The `eql_v3.query_integer_ord_ore` query operand. + IntegerOrdOreQuery(super::integer::IntegerOrdOreQuery), + /// The `eql_v3.query_integer_ord` query operand. + IntegerOrdQuery(super::integer::IntegerOrdQuery), + /// The `eql_v3.query_integer_ord_ope` query operand. + IntegerOrdOpeQuery(super::integer::IntegerOrdOpeQuery), + /// The `eql_v3.query_smallint_eq` query operand. + SmallintEqQuery(super::smallint::SmallintEqQuery), + /// The `eql_v3.query_smallint_ord_ore` query operand. + SmallintOrdOreQuery(super::smallint::SmallintOrdOreQuery), + /// The `eql_v3.query_smallint_ord` query operand. + SmallintOrdQuery(super::smallint::SmallintOrdQuery), + /// The `eql_v3.query_smallint_ord_ope` query operand. + SmallintOrdOpeQuery(super::smallint::SmallintOrdOpeQuery), + /// The `eql_v3.query_bigint_eq` query operand. + BigintEqQuery(super::bigint::BigintEqQuery), + /// The `eql_v3.query_bigint_ord_ore` query operand. + BigintOrdOreQuery(super::bigint::BigintOrdOreQuery), + /// The `eql_v3.query_bigint_ord` query operand. + BigintOrdQuery(super::bigint::BigintOrdQuery), + /// The `eql_v3.query_bigint_ord_ope` query operand. + BigintOrdOpeQuery(super::bigint::BigintOrdOpeQuery), + /// The `eql_v3.query_date_eq` query operand. + DateEqQuery(super::date::DateEqQuery), + /// The `eql_v3.query_date_ord_ore` query operand. + DateOrdOreQuery(super::date::DateOrdOreQuery), + /// The `eql_v3.query_date_ord` query operand. + DateOrdQuery(super::date::DateOrdQuery), + /// The `eql_v3.query_date_ord_ope` query operand. + DateOrdOpeQuery(super::date::DateOrdOpeQuery), + /// The `eql_v3.query_timestamp_eq` query operand. + TimestampEqQuery(super::timestamp::TimestampEqQuery), + /// The `eql_v3.query_timestamp_ord_ore` query operand. + TimestampOrdOreQuery(super::timestamp::TimestampOrdOreQuery), + /// The `eql_v3.query_timestamp_ord` query operand. + TimestampOrdQuery(super::timestamp::TimestampOrdQuery), + /// The `eql_v3.query_timestamp_ord_ope` query operand. + TimestampOrdOpeQuery(super::timestamp::TimestampOrdOpeQuery), + /// The `eql_v3.query_numeric_eq` query operand. + NumericEqQuery(super::numeric::NumericEqQuery), + /// The `eql_v3.query_numeric_ord_ore` query operand. + NumericOrdOreQuery(super::numeric::NumericOrdOreQuery), + /// The `eql_v3.query_numeric_ord` query operand. + NumericOrdQuery(super::numeric::NumericOrdQuery), + /// The `eql_v3.query_numeric_ord_ope` query operand. + NumericOrdOpeQuery(super::numeric::NumericOrdOpeQuery), + /// The `eql_v3.query_text_eq` query operand. + TextEqQuery(super::text::TextEqQuery), + /// The `eql_v3.query_text_match` query operand. + TextMatchQuery(super::text::TextMatchQuery), + /// The `eql_v3.query_text_ord_ore` query operand. + TextOrdOreQuery(super::text::TextOrdOreQuery), + /// The `eql_v3.query_text_ord` query operand. + TextOrdQuery(super::text::TextOrdQuery), + /// The `eql_v3.query_text_ord_ope` query operand. + TextOrdOpeQuery(super::text::TextOrdOpeQuery), + /// The `eql_v3.query_text_search` query operand. + TextSearchQuery(super::text::TextSearchQuery), + /// The `eql_v3.query_real_eq` query operand. + RealEqQuery(super::real::RealEqQuery), + /// The `eql_v3.query_real_ord_ore` query operand. + RealOrdOreQuery(super::real::RealOrdOreQuery), + /// The `eql_v3.query_real_ord` query operand. + RealOrdQuery(super::real::RealOrdQuery), + /// The `eql_v3.query_real_ord_ope` query operand. + RealOrdOpeQuery(super::real::RealOrdOpeQuery), + /// The `eql_v3.query_double_eq` query operand. + DoubleEqQuery(super::double::DoubleEqQuery), + /// The `eql_v3.query_double_ord_ore` query operand. + DoubleOrdOreQuery(super::double::DoubleOrdOreQuery), + /// The `eql_v3.query_double_ord` query operand. + DoubleOrdQuery(super::double::DoubleOrdQuery), + /// The `eql_v3.query_double_ord_ope` query operand. + DoubleOrdOpeQuery(super::double::DoubleOrdOpeQuery), + /// The `eql_v3.query_jsonb` query operand. + SteVec(super::jsonb::SteVecQuery), +} +impl QueryPayload { + /// Strictly parse `value` as `domain`'s query payload, KEEPING the + /// parsed value — the query-side counterpart of + /// [`super::DomainPayload::parse`]. `domain` is the unqualified name + /// (`"query_integer_eq"`, `"query_jsonb"`, …). `None` when `domain` + /// is not a query-operand domain; `Some(Err)` when the strict parse + /// fails (`deny_unknown_fields` rejects a stray `c`). + pub fn parse( + domain: &str, + value: &serde_json::Value, + ) -> Option> { + match domain { + "query_integer_eq" => { + Some(super::integer::IntegerEqQuery::deserialize(value).map(Self::IntegerEqQuery)) + } + "query_integer_ord_ore" => Some( + super::integer::IntegerOrdOreQuery::deserialize(value) + .map(Self::IntegerOrdOreQuery), + ), + "query_integer_ord" => { + Some(super::integer::IntegerOrdQuery::deserialize(value).map(Self::IntegerOrdQuery)) + } + "query_integer_ord_ope" => Some( + super::integer::IntegerOrdOpeQuery::deserialize(value) + .map(Self::IntegerOrdOpeQuery), + ), + "query_smallint_eq" => Some( + super::smallint::SmallintEqQuery::deserialize(value).map(Self::SmallintEqQuery), + ), + "query_smallint_ord_ore" => Some( + super::smallint::SmallintOrdOreQuery::deserialize(value) + .map(Self::SmallintOrdOreQuery), + ), + "query_smallint_ord" => Some( + super::smallint::SmallintOrdQuery::deserialize(value).map(Self::SmallintOrdQuery), + ), + "query_smallint_ord_ope" => Some( + super::smallint::SmallintOrdOpeQuery::deserialize(value) + .map(Self::SmallintOrdOpeQuery), + ), + "query_bigint_eq" => { + Some(super::bigint::BigintEqQuery::deserialize(value).map(Self::BigintEqQuery)) + } + "query_bigint_ord_ore" => Some( + super::bigint::BigintOrdOreQuery::deserialize(value).map(Self::BigintOrdOreQuery), + ), + "query_bigint_ord" => { + Some(super::bigint::BigintOrdQuery::deserialize(value).map(Self::BigintOrdQuery)) + } + "query_bigint_ord_ope" => Some( + super::bigint::BigintOrdOpeQuery::deserialize(value).map(Self::BigintOrdOpeQuery), + ), + "query_date_eq" => { + Some(super::date::DateEqQuery::deserialize(value).map(Self::DateEqQuery)) + } + "query_date_ord_ore" => { + Some(super::date::DateOrdOreQuery::deserialize(value).map(Self::DateOrdOreQuery)) + } + "query_date_ord" => { + Some(super::date::DateOrdQuery::deserialize(value).map(Self::DateOrdQuery)) + } + "query_date_ord_ope" => { + Some(super::date::DateOrdOpeQuery::deserialize(value).map(Self::DateOrdOpeQuery)) + } + "query_timestamp_eq" => Some( + super::timestamp::TimestampEqQuery::deserialize(value).map(Self::TimestampEqQuery), + ), + "query_timestamp_ord_ore" => Some( + super::timestamp::TimestampOrdOreQuery::deserialize(value) + .map(Self::TimestampOrdOreQuery), + ), + "query_timestamp_ord" => Some( + super::timestamp::TimestampOrdQuery::deserialize(value) + .map(Self::TimestampOrdQuery), + ), + "query_timestamp_ord_ope" => Some( + super::timestamp::TimestampOrdOpeQuery::deserialize(value) + .map(Self::TimestampOrdOpeQuery), + ), + "query_numeric_eq" => { + Some(super::numeric::NumericEqQuery::deserialize(value).map(Self::NumericEqQuery)) + } + "query_numeric_ord_ore" => Some( + super::numeric::NumericOrdOreQuery::deserialize(value) + .map(Self::NumericOrdOreQuery), + ), + "query_numeric_ord" => { + Some(super::numeric::NumericOrdQuery::deserialize(value).map(Self::NumericOrdQuery)) + } + "query_numeric_ord_ope" => Some( + super::numeric::NumericOrdOpeQuery::deserialize(value) + .map(Self::NumericOrdOpeQuery), + ), + "query_text_eq" => { + Some(super::text::TextEqQuery::deserialize(value).map(Self::TextEqQuery)) + } + "query_text_match" => { + Some(super::text::TextMatchQuery::deserialize(value).map(Self::TextMatchQuery)) + } + "query_text_ord_ore" => { + Some(super::text::TextOrdOreQuery::deserialize(value).map(Self::TextOrdOreQuery)) + } + "query_text_ord" => { + Some(super::text::TextOrdQuery::deserialize(value).map(Self::TextOrdQuery)) + } + "query_text_ord_ope" => { + Some(super::text::TextOrdOpeQuery::deserialize(value).map(Self::TextOrdOpeQuery)) + } + "query_text_search" => { + Some(super::text::TextSearchQuery::deserialize(value).map(Self::TextSearchQuery)) + } + "query_real_eq" => { + Some(super::real::RealEqQuery::deserialize(value).map(Self::RealEqQuery)) + } + "query_real_ord_ore" => { + Some(super::real::RealOrdOreQuery::deserialize(value).map(Self::RealOrdOreQuery)) + } + "query_real_ord" => { + Some(super::real::RealOrdQuery::deserialize(value).map(Self::RealOrdQuery)) + } + "query_real_ord_ope" => { + Some(super::real::RealOrdOpeQuery::deserialize(value).map(Self::RealOrdOpeQuery)) + } + "query_double_eq" => { + Some(super::double::DoubleEqQuery::deserialize(value).map(Self::DoubleEqQuery)) + } + "query_double_ord_ore" => Some( + super::double::DoubleOrdOreQuery::deserialize(value).map(Self::DoubleOrdOreQuery), + ), + "query_double_ord" => { + Some(super::double::DoubleOrdQuery::deserialize(value).map(Self::DoubleOrdQuery)) + } + "query_double_ord_ope" => Some( + super::double::DoubleOrdOpeQuery::deserialize(value).map(Self::DoubleOrdOpeQuery), + ), + "query_jsonb" => Some(super::jsonb::SteVecQuery::deserialize(value).map(Self::SteVec)), + _ => None, + } + } + /// The inner payload as a [`DomainType`] trait object. + pub fn as_domain_type(&self) -> &dyn DomainType { + match self { + Self::IntegerEqQuery(payload) => payload, + Self::IntegerOrdOreQuery(payload) => payload, + Self::IntegerOrdQuery(payload) => payload, + Self::IntegerOrdOpeQuery(payload) => payload, + Self::SmallintEqQuery(payload) => payload, + Self::SmallintOrdOreQuery(payload) => payload, + Self::SmallintOrdQuery(payload) => payload, + Self::SmallintOrdOpeQuery(payload) => payload, + Self::BigintEqQuery(payload) => payload, + Self::BigintOrdOreQuery(payload) => payload, + Self::BigintOrdQuery(payload) => payload, + Self::BigintOrdOpeQuery(payload) => payload, + Self::DateEqQuery(payload) => payload, + Self::DateOrdOreQuery(payload) => payload, + Self::DateOrdQuery(payload) => payload, + Self::DateOrdOpeQuery(payload) => payload, + Self::TimestampEqQuery(payload) => payload, + Self::TimestampOrdOreQuery(payload) => payload, + Self::TimestampOrdQuery(payload) => payload, + Self::TimestampOrdOpeQuery(payload) => payload, + Self::NumericEqQuery(payload) => payload, + Self::NumericOrdOreQuery(payload) => payload, + Self::NumericOrdQuery(payload) => payload, + Self::NumericOrdOpeQuery(payload) => payload, + Self::TextEqQuery(payload) => payload, + Self::TextMatchQuery(payload) => payload, + Self::TextOrdOreQuery(payload) => payload, + Self::TextOrdQuery(payload) => payload, + Self::TextOrdOpeQuery(payload) => payload, + Self::TextSearchQuery(payload) => payload, + Self::RealEqQuery(payload) => payload, + Self::RealOrdOreQuery(payload) => payload, + Self::RealOrdQuery(payload) => payload, + Self::RealOrdOpeQuery(payload) => payload, + Self::DoubleEqQuery(payload) => payload, + Self::DoubleOrdOreQuery(payload) => payload, + Self::DoubleOrdQuery(payload) => payload, + Self::DoubleOrdOpeQuery(payload) => payload, + Self::SteVec(payload) => payload, + } + } + /// Fully-qualified SQL domain name, e.g. `"eql_v3.query_integer_eq"`. + pub fn sql_domain(&self) -> &'static str { + self.as_domain_type().sql_domain() + } + /// Unqualified SQL domain name, e.g. `"query_integer_eq"` — the name + /// [`QueryPayload::parse`] accepts. + pub fn domain(&self) -> &'static str { + self.as_domain_type().domain() + } +} diff --git a/crates/eql-bindings/src/v3/real.rs b/crates/eql-bindings/src/v3/real.rs new file mode 100644 index 000000000..ab5df68a8 --- /dev/null +++ b/crates/eql-bindings/src/v3/real.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `real` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_real` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Real { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Real { + fn sql_domain_static() -> &'static str { + "public.eql_v3_real" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Real::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Real) + } +} +/// `public.eql_v3_real_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for RealEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_real_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealEq) + } +} +/// `public.eql_v3_real_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for RealOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_real_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealOrdOre) + } +} +/// `public.eql_v3_real_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for RealOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_real_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealOrd) + } +} +/// `public.eql_v3_real_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for RealOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_real_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealOrdOpe) + } +} +/// `eql_v3.query_real_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for RealEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_real_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealEqQuery) + } +} +/// `eql_v3.query_real_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for RealOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_real_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealOrdOreQuery) + } +} +/// `eql_v3.query_real_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for RealOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_real_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealOrdQuery) + } +} +/// `eql_v3.query_real_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct RealOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for RealOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_real_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + RealOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(RealOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/smallint.rs b/crates/eql-bindings/src/v3/smallint.rs new file mode 100644 index 000000000..2dfcc6f13 --- /dev/null +++ b/crates/eql-bindings/src/v3/smallint.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `smallint` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_smallint` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Smallint { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Smallint { + fn sql_domain_static() -> &'static str { + "public.eql_v3_smallint" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Smallint::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Smallint) + } +} +/// `public.eql_v3_smallint_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for SmallintEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_smallint_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintEq) + } +} +/// `public.eql_v3_smallint_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for SmallintOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_smallint_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintOrdOre) + } +} +/// `public.eql_v3_smallint_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for SmallintOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_smallint_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintOrd) + } +} +/// `public.eql_v3_smallint_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for SmallintOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_smallint_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintOrdOpe) + } +} +/// `eql_v3.query_smallint_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for SmallintEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_smallint_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintEqQuery) + } +} +/// `eql_v3.query_smallint_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for SmallintOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_smallint_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintOrdOreQuery) + } +} +/// `eql_v3.query_smallint_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for SmallintOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_smallint_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintOrdQuery) + } +} +/// `eql_v3.query_smallint_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct SmallintOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for SmallintOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_smallint_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + SmallintOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(SmallintOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/src/v3/terms.rs b/crates/eql-bindings/src/v3/terms.rs new file mode 100644 index 000000000..c2865e83c --- /dev/null +++ b/crates/eql-bindings/src/v3/terms.rs @@ -0,0 +1,132 @@ +//! Reusable wire-field newtypes shared by every v3 domain payload. +//! +//! Each newtype serializes as its inner value (serde's newtype-struct +//! default), so the wire shape is unchanged — but the *name* survives into +//! generated artifacts: ts-rs exports a named TS alias +//! (`export type Hmac256 = string`) that every domain binding imports, and +//! schemars registers a named definition that every domain schema `$ref`s. +//! A plain Rust `type` alias would vanish in both outputs. +//! +//! Names follow the SEM constructor names in `eql-domains` (`Term::ctor()`): +//! a future scheme change (e.g. a 12-block wide ORE term for timestamp +//! ordering) is a new newtype, not a hunt through `Vec` fields. + +use schemars::JsonSchema; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; + +/// mp_base85 source ciphertext — the `c` envelope key. +/// +/// Required by every v3 domain CHECK; present on every payload. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct Ciphertext(pub String); + +/// HMAC-SHA-256 equality term — the `hm` wire key. Backs the `_eq` domains +/// (`=`, `<>`). SQL-side constructor: `eql_v3_internal.hmac_256`. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct Hmac256(pub String); + +/// A SteVec selector — the `s` wire key. Addresses a JSON path leaf within an +/// encrypted document (`public.eql_v3_json`); present on every entry and query element. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct Selector(pub String); + +/// CLLW-OPE order term — the `op` wire key. Backs the scalar `_ord_ope` +/// domains (`=` `<>` `<` `<=` `>` `>=`) and the ordered entries of a SteVec +/// document (exactly one of `hm` (equality) XOR `op` (ordering) per entry — +/// enforced by the SQL domain CHECK): a hex-encoded CLLW OPE ciphertext, +/// sortable via native bytea comparison after hex-decode — unlike `ob` +/// (block-ORE) it needs no custom comparator. SQL-side constructor: +/// `eql_v3_internal.ope_cllw`; per-entry extractor: `eql_v3.ord_ope_term`. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct OpeCllw(pub String); + +/// Block-ORE order term — the `ob` wire key. Backs the `_ord` / `_ord_ore` +/// domains (`=` `<>` `<` `<=` `>` `>=`); ORE is lossless over the scalar's +/// domain, so it serves equality too. The block count is width-agnostic on the +/// wire (8 for the int scalars, 12 for timestamp, 14 for numeric) — the +/// array just carries more block strings. SQL-side constructor: +/// `eql_v3_internal.ore_block_256`. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +pub struct OreBlock256(pub Vec); + +/// Bloom-filter match term — the `bf` wire key. Backs the `_match` domains +/// (`@>`/`<@` containment). +/// +/// **Signed** i16, not u16: EQL stores the filter as PostgreSQL `smallint[]`, +/// and filters sized above 32768 emit upper-half bit positions as negative +/// signed values. +#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize, TS)] +#[ts(export, export_to = "v3/")] +pub struct BloomFilter(pub Vec); + +/// Manual schema: bounds the items to the `smallint` range — the derive +/// emits only `format: "int16"`, a non-validating annotation in draft-07, +/// so an out-of-range bit position would pass schema validation and fail +/// at the database. +impl schemars::JsonSchema for BloomFilter { + fn schema_name() -> std::borrow::Cow<'static, str> { + "BloomFilter".into() + } + + fn json_schema(_: &mut schemars::SchemaGenerator) -> schemars::Schema { + // KEEP IN SYNC with the doc comment on `BloomFilter` above — it is the + // canonical text. A derived `JsonSchema` would copy the doc comment + // automatically; this manual impl can't, so this hand-written + // paraphrase must be updated alongside it. + schemars::json_schema!({ + "type": "array", + "items": { + "type": "integer", + "format": "int16", + "minimum": i16::MIN, + "maximum": i16::MAX, + }, + "description": "Bloom-filter match term — the `bf` wire key. Backs the `_match` \ + domains (`@>`/`<@` containment). Signed i16: EQL stores the filter \ + as PostgreSQL `smallint[]`, and filters sized above 32768 emit \ + upper-half bit positions as negative signed values.", + }) + } +} + +impl From for Ciphertext { + fn from(value: String) -> Self { + Self(value) + } +} + +impl From for Hmac256 { + fn from(value: String) -> Self { + Self(value) + } +} + +impl From> for OreBlock256 { + fn from(value: Vec) -> Self { + Self(value) + } +} + +impl From> for BloomFilter { + fn from(value: Vec) -> Self { + Self(value) + } +} + +impl From for Selector { + fn from(value: String) -> Self { + Self(value) + } +} + +impl From for OpeCllw { + fn from(value: String) -> Self { + Self(value) + } +} diff --git a/crates/eql-bindings/src/v3/text.rs b/crates/eql-bindings/src/v3/text.rs new file mode 100644 index 000000000..f2179fc90 --- /dev/null +++ b/crates/eql-bindings/src/v3/text.rs @@ -0,0 +1,427 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `text` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{BloomFilter, Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_text` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Text { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Text { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Text::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Text) + } +} +/// `public.eql_v3_text_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for TextEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextEq) + } +} +/// `public.eql_v3_text_match` — match domain. +/// +/// Operators: `@>` `<@`. Required keys: `v` `i` `c` `bf`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextMatch { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub bf: BloomFilter, +} +impl DomainType for TextMatch { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text_match" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["bf"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextMatch::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextMatch) + } +} +/// `public.eql_v3_text_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, + pub ob: OreBlock256, +} +impl DomainType for TextOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextOrdOre) + } +} +/// `public.eql_v3_text_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, + pub ob: OreBlock256, +} +impl DomainType for TextOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextOrd) + } +} +/// `public.eql_v3_text_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `hm` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, + pub op: OpeCllw, +} +impl DomainType for TextOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextOrdOpe) + } +} +/// `public.eql_v3_text_search` — search domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `c` `hm` `ob` `bf`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextSearch { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, + pub ob: OreBlock256, + pub bf: BloomFilter, +} +impl DomainType for TextSearch { + fn sql_domain_static() -> &'static str { + "public.eql_v3_text_search" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "ob", "bf"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextSearch::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextSearch) + } +} +/// `eql_v3.query_text_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for TextEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_text_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextEqQuery) + } +} +/// `eql_v3.query_text_match` — match domain query operand. +/// +/// Operators: `@>` `<@`. Required keys: `v` `i` `bf`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextMatchQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub bf: BloomFilter, +} +impl DomainType for TextMatchQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_text_match" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["bf"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextMatchQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextMatchQuery) + } +} +/// `eql_v3.query_text_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, + pub ob: OreBlock256, +} +impl DomainType for TextOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_text_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextOrdOreQuery) + } +} +/// `eql_v3.query_text_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, + pub ob: OreBlock256, +} +impl DomainType for TextOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_text_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextOrdQuery) + } +} +/// `eql_v3.query_text_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `hm` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, + pub op: OpeCllw, +} +impl DomainType for TextOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_text_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextOrdOpeQuery) + } +} +/// `eql_v3.query_text_search` — search domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=` `@>` `<@`. Required keys: `v` `i` `hm` `ob` `bf`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TextSearchQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, + pub ob: OreBlock256, + pub bf: BloomFilter, +} +impl DomainType for TextSearchQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_text_search" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm", "ob", "bf"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TextSearchQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TextSearchQuery) + } +} diff --git a/crates/eql-bindings/src/v3/timestamp.rs b/crates/eql-bindings/src/v3/timestamp.rs new file mode 100644 index 000000000..a98fe8060 --- /dev/null +++ b/crates/eql-bindings/src/v3/timestamp.rs @@ -0,0 +1,291 @@ +// @generated by eql-codegen from the eql-domains catalog — do not edit +//! The `timestamp` encrypted-domain family — generated from the eql-domains catalog. +use crate::v3::terms::{Ciphertext, Hmac256, OpeCllw, OreBlock256}; +use crate::v3::DomainType; +use crate::{Identifier, SchemaVersion}; +use schemars::{schema_for, JsonSchema, Schema}; +use serde::{Deserialize, Serialize}; +use ts_rs::TS; +/// `public.eql_v3_timestamp` — storage-only domain. +/// +/// Operators: none. Required keys: `v` `i` `c`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct Timestamp { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, +} +impl DomainType for Timestamp { + fn sql_domain_static() -> &'static str { + "public.eql_v3_timestamp" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&[]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + Timestamp::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(Timestamp) + } +} +/// `public.eql_v3_timestamp_eq` — equality domain. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `c` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampEq { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub hm: Hmac256, +} +impl DomainType for TimestampEq { + fn sql_domain_static() -> &'static str { + "public.eql_v3_timestamp_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampEq::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampEq) + } +} +/// `public.eql_v3_timestamp_ord_ore` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampOrdOre { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for TimestampOrdOre { + fn sql_domain_static() -> &'static str { + "public.eql_v3_timestamp_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampOrdOre::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampOrdOre) + } +} +/// `public.eql_v3_timestamp_ord` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampOrd { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub ob: OreBlock256, +} +impl DomainType for TimestampOrd { + fn sql_domain_static() -> &'static str { + "public.eql_v3_timestamp_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampOrd::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampOrd) + } +} +/// `public.eql_v3_timestamp_ord_ope` — ordering domain. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `c` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampOrdOpe { + pub v: SchemaVersion, + pub i: Identifier, + pub c: Ciphertext, + pub op: OpeCllw, +} +impl DomainType for TimestampOrdOpe { + fn sql_domain_static() -> &'static str { + "public.eql_v3_timestamp_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampOrdOpe::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampOrdOpe) + } +} +/// `eql_v3.query_timestamp_eq` — equality domain query operand. +/// +/// Operators: `=` `<>`. Required keys: `v` `i` `hm`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampEqQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub hm: Hmac256, +} +impl DomainType for TimestampEqQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_timestamp_eq" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["hm"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampEqQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampEqQuery) + } +} +/// `eql_v3.query_timestamp_ord_ore` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampOrdOreQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for TimestampOrdOreQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_timestamp_ord_ore" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampOrdOreQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampOrdOreQuery) + } +} +/// `eql_v3.query_timestamp_ord` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `ob`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampOrdQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub ob: OreBlock256, +} +impl DomainType for TimestampOrdQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_timestamp_ord" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["ob"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampOrdQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampOrdQuery) + } +} +/// `eql_v3.query_timestamp_ord_ope` — ordering domain query operand. +/// +/// Operators: `=` `<>` `<` `<=` `>` `>=`. Required keys: `v` `i` `op`. +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, TS, JsonSchema)] +#[ts(export, export_to = "v3/")] +#[serde(deny_unknown_fields)] +pub struct TimestampOrdOpeQuery { + pub v: SchemaVersion, + pub i: Identifier, + pub op: OpeCllw, +} +impl DomainType for TimestampOrdOpeQuery { + fn sql_domain_static() -> &'static str { + "eql_v3.query_timestamp_ord_ope" + } + fn sql_domain(&self) -> &'static str { + Self::sql_domain_static() + } + fn term_json_keys_static() -> Option<&'static [&'static str]> { + Some(&["op"]) + } + fn term_json_keys(&self) -> Option<&'static [&'static str]> { + Self::term_json_keys_static() + } + fn parse_value(&self, value: &serde_json::Value) -> Result<(), serde_json::Error> { + TimestampOrdOpeQuery::deserialize(value).map(|_| ()) + } + fn schema(&self) -> Schema { + schema_for!(TimestampOrdOpeQuery) + } +} diff --git a/crates/eql-bindings/tests/catalog_parity.rs b/crates/eql-bindings/tests/catalog_parity.rs new file mode 100644 index 000000000..972c399ed --- /dev/null +++ b/crates/eql-bindings/tests/catalog_parity.rs @@ -0,0 +1,368 @@ +//! The drift gate: every v3 domain's wire contract — pinned through the +//! published JSON Schema — must match `eql-domains::CATALOG`, the same catalog +//! that GENERATES both the SQL surface and these payload structs. schemars +//! output reflects the real serde contract, so per domain this catches a +//! wrong/dropped required key, a struct that lost +//! `#[serde(deny_unknown_fields)]` (`additionalProperties: false`), and a `v` +//! field that is not [`eql_bindings::SchemaVersion`] (the `$ref` and its +//! `const: 2`). The inventory set/order IS policed here by +//! `inventory_exactly_covers_catalog_in_order()`, which asserts `v3::all()` +//! lists exactly the `CATALOG` domains in catalog order (the generated +//! `inventory.rs` byte-parity gate lives in eql-codegen; this covers the +//! compiled `all()`). The emitted `.ts` property order is pinned by +//! `tests/ts_property_order.rs`. Behavioural spot checks live in +//! `tests/v3_conformance.rs`. + +use std::collections::BTreeSet; + +use eql_bindings::{v3, EQL_SCHEMA_VERSION}; +use eql_domains::{Term, CATALOG, ENVELOPE_KEYS}; +use serde_json::{json, Value}; + +/// The *published* JSON Schemas must agree with the catalog: each domain's +/// schema `required` list is exactly envelope + catalog term keys — the +/// artifact schema consumers validate against cannot drift from the SQL +/// surface's CHECK constraints. +#[test] +fn schema_required_keys_match_catalog_terms() { + let entries = v3::all(); + // `scalar_families()` is the DRY filter for scalar-only consumers — the + // SteVec jsonb domains' required keys are not envelope+terms and are pinned + // separately by `jsonb_schema_required_keys_match_the_sql_check_contract`. + for spec in eql_domains::scalar_families() { + for domain in spec.domains { + let name = spec.domain_name(domain); + let entry = entries + .iter() + .find(|e| e.domain() == name) + .unwrap_or_else(|| panic!("no domain inventory entry for {name}")); + + let schema: Value = serde_json::to_value(entry.schema()) + .unwrap_or_else(|e| panic!("{name}: schema does not serialize: {e}")); + let required: BTreeSet<&str> = schema["required"] + .as_array() + .unwrap_or_else(|| panic!("{name}: schema has no required array")) + .iter() + .map(|v| v.as_str().expect("required entry is a string")) + .collect(); + + let expected: BTreeSet<&str> = ENVELOPE_KEYS + .iter() + .copied() + .chain(Term::term_json_keys(domain.terms)) + .collect(); + + assert_eq!( + required, expected, + "{name}: schema required keys must be envelope + catalog terms" + ); + } + } +} + +/// `v3::all()` must list exactly the catalog domains, in catalog order. The +/// generated `inventory.rs` makes this structurally true, but the only cargo- +/// level guard was `schema_required_keys_match_catalog_terms`, which iterates +/// CATALOG and *finds* each entry — it catches a missing entry but neither an +/// extra entry nor a wrong order. (The byte-parity gate in eql-codegen covers +/// the generated `inventory.rs` source; this covers the actually-compiled +/// `all()` at the eql-bindings level.) A direct ordered `assert_eq!` restores +/// both directions, the regression dropped when `inventory_exactly_covers_catalog` +/// was removed (commit 27c200c4). +#[test] +fn inventory_exactly_covers_catalog_in_order() { + // `domain_name` is correct for every shape (including the jsonb family's + // one documented exception, the `public.eql_v3_json` document domain — see + // `Domain::full_name`), so no per-shape branch is needed here. + let expected: Vec = CATALOG + .iter() + .flat_map(|spec| spec.domains.iter().map(move |d| spec.domain_name(d))) + .collect(); + let actual: Vec = v3::all().iter().map(|e| e.domain().to_string()).collect(); + assert_eq!( + actual, expected, + "v3::all() must list exactly the catalog domains in catalog order \ + (extra/missing entry or reordering) — regenerate with \ + `mise run types:generate` and commit inventory.rs" + ); +} + +/// The trait-level term-key surface must agree with the catalog: for every +/// scalar domain, `DomainType::term_json_keys` (threaded through the generated +/// impls so `from_v2::TargetDomain::parse` can resolve required keys without a +/// runtime eql-domains dependency) is exactly `Term::term_json_keys` over the +/// catalog terms; for the SteVec (jsonb) shapes it is `None` — their index +/// terms live per sv leaf, not as flat payload keys. +#[test] +fn term_json_keys_match_catalog_terms() { + let entries = v3::all(); + for spec in CATALOG { + for domain in spec.domains { + let name = spec.domain_name(domain); + let entry = entries + .iter() + .find(|e| e.domain() == name) + .unwrap_or_else(|| panic!("no domain inventory entry for {name}")); + if domain.is_scalar() { + let expected = Term::term_json_keys(domain.terms); + assert_eq!( + entry.term_json_keys().map(<[&str]>::to_vec), + Some(expected), + "{name}: term_json_keys must be the catalog term keys" + ); + } else { + assert_eq!( + entry.term_json_keys(), + None, + "{name}: non-scalar (SteVec) shapes carry no flat term keys" + ); + } + } + } +} + +/// `DomainType::parse_value` must be the strict serde parse of the concrete +/// payload struct, reachable through the trait object — the mechanism +/// `from_v2` uses for final validation of converted payloads. One positive +/// and one negative per capability shape suffices; the per-struct strictness +/// itself is covered by `v3_conformance.rs`. +#[test] +fn parse_value_validates_through_the_inventory() { + let entries = v3::all(); + let entry = |name: &str| { + entries + .iter() + .find(|e| e.domain() == name) + .unwrap_or_else(|| panic!("no domain inventory entry for {name}")) + }; + + let eq_payload = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "hm": "deadbeef" + }); + assert!(entry("eql_v3_integer_eq").parse_value(&eq_payload).is_ok()); + // Missing term key fails. + assert!(entry("eql_v3_integer_ord") + .parse_value(&eq_payload) + .is_err()); + // Unknown key fails (deny_unknown_fields is live through the trait). + assert!(entry("eql_v3_integer").parse_value(&eq_payload).is_err()); + + let doc = json!({ + "v": 3, + "k": "sv", + "i": { "t": "users", "c": "profile" }, + "sv": [ { "s": "sel", "c": "ct", "hm": "deadbeef" } ] + }); + assert!(entry("eql_v3_json").parse_value(&doc).is_ok()); + assert!(entry("query_jsonb").parse_value(&doc).is_err()); + assert!(entry("query_jsonb") + .parse_value(&json!({ "sv": [ { "s": "sel", "hm": "deadbeef" } ] })) + .is_ok()); +} + +/// The published `$id` is the schema's identity URL — `tests/export.rs` +/// injects [`v3::DomainType::schema_id`] into every written file. Pin its +/// shape with independent literals (NOT the helper, which would only test +/// itself): a regressed host, a dropped `v3/`, or a wrong domain segment must +/// turn a test red, not merely shift the freshness diff. +#[test] +fn schema_id_is_canonical() { + let entries = v3::all(); + let id_of = |domain: &str| { + entries + .iter() + .find(|e| e.domain() == domain) + .unwrap_or_else(|| panic!("no domain inventory entry for {domain}")) + .schema_id() + }; + + // Fully-literal anchors — no interpolation, so a typo in the helper's base + // URL or path cannot match. + assert_eq!( + id_of("eql_v3_integer_eq"), + "https://schemas.cipherstash.com/eql/v3/eql_v3_integer_eq.json" + ); + assert_eq!( + id_of("eql_v3_text_search"), + "https://schemas.cipherstash.com/eql/v3/eql_v3_text_search.json" + ); + + // Every domain follows the same canonical pattern. + for entry in &entries { + let id = entry.schema_id(); + let name = entry.domain(); + assert_eq!( + id, + format!("https://schemas.cipherstash.com/eql/v3/{name}.json"), + "{name}: $id must be the canonical eql/v3 URL" + ); + } +} + +/// Every published schema must be *strict*, not just complete: unknown keys +/// rejected at the root and inside the nested `Identifier`, and the `v` +/// property pinned to the `SchemaVersion` definition whose `const` is the +/// wire version. `required` alone (the test above) would stay green if a +/// struct lost `#[serde(deny_unknown_fields)]` or swapped `SchemaVersion` +/// for a bare integer — both regenerate a permissive schema that +/// `types:check` would happily commit as the new baseline. +#[test] +fn schemas_are_strict() { + let entries = v3::all(); + // Iterate the scalar families directly (via the DRY `scalar_families()` + // helper) and resolve each to its inventory entry — rather than iterating + // every entry and reverse-looking-up its Shape with a fail-open default. + // SteVec strictness (Document/Query only) is asserted in `v3_conformance.rs`. + for spec in eql_domains::scalar_families() { + for domain in spec.domains { + let name = spec.domain_name(domain); + let entry = entries + .iter() + .find(|e| e.domain() == name) + .unwrap_or_else(|| panic!("no domain inventory entry for {name}")); + let schema: Value = serde_json::to_value(entry.schema()) + .unwrap_or_else(|e| panic!("{name}: schema does not serialize: {e}")); + + assert_eq!( + schema.pointer("/additionalProperties"), + Some(&json!(false)), + "{name}: schema must set additionalProperties: false \ + (struct lost #[serde(deny_unknown_fields)]?)" + ); + assert_eq!( + schema.pointer("/$defs/Identifier/additionalProperties"), + Some(&json!(false)), + "{name}: Identifier definition must set additionalProperties: false" + ); + assert_eq!( + schema.pointer("/properties/v/$ref"), + Some(&json!("#/$defs/SchemaVersion")), + "{name}: the v property must $ref the SchemaVersion definition \ + (field declared as a bare integer instead of SchemaVersion?)" + ); + assert_eq!( + schema.pointer("/$defs/SchemaVersion/const"), + Some(&json!(EQL_SCHEMA_VERSION)), + "{name}: SchemaVersion must pin const: {EQL_SCHEMA_VERSION}" + ); + } + } +} + +/// The jsonb (SteVec) drift gate: the SteVec families' `terms` are empty (their +/// index capability is structural, not a flat `Term` list), so the scalar gate +/// `schema_required_keys_match_catalog_terms` cannot cover them and skips the +/// family. This pins the published jsonb schemas' `required` sets against the +/// SteVec wire contract — the one link (wire ↔ published JSON Schema) that +/// otherwise has no structural test. +/// +/// KEEP IN SYNC with the canonical `SteVecPayload` +/// (`eql-payload-v2.3.schema.json`) and `is_valid_ste_vec_{document,entry,query}_payload`: +/// - `public.eql_v3_json` requires `v` `k` `i` `sv` (document; `k` = "sv" +/// form discriminator, required by the canonical SteVecPayload and carried on +/// every real payload — the SQL CHECK is laxer and only mandates `v`/`i`/`sv`, +/// but the binding models the real wire, which always carries `k`) +/// - `public.eql_v3_jsonb_entry` requires `s` `c` + exactly one of `hm` XOR `op` +/// - `eql_v3.query_jsonb` requires `sv`; each element `s` + `hm` XOR `op`, no `c` +#[test] +fn jsonb_schema_required_keys_match_the_sql_check_contract() { + let entries = v3::all(); + let schema_of = |domain: &str| -> Value { + let entry = entries + .iter() + .find(|e| e.domain() == domain) + .unwrap_or_else(|| panic!("no inventory entry for {domain}")); + serde_json::to_value(entry.schema()) + .unwrap_or_else(|e| panic!("{domain}: schema does not serialize: {e}")) + }; + let required = |schema: &Value, ptr: &str, ctx: &str| -> BTreeSet { + schema + .pointer(ptr) + .and_then(|v| v.as_array()) + .unwrap_or_else(|| panic!("{ctx}: no required array at {ptr}")) + .iter() + .map(|v| v.as_str().expect("required entry is a string").to_string()) + .collect() + }; + let set = |keys: &[&str]| -> BTreeSet { keys.iter().map(|s| s.to_string()).collect() }; + + // Document: {v, k, i, sv}. No root `c` (a document is not itself a + // ciphertext); `k` is the "sv" form discriminator (SteVecForm-pinned). + let doc = schema_of("eql_v3_json"); + assert_eq!( + required(&doc, "/required", "eql_v3_json"), + set(&["v", "k", "i", "sv"]), + "public.eql_v3_json required keys must match the SteVec document wire contract" + ); + + // Entry: {s, c} + hm XOR op. The XOR is expressed as an untagged `anyOf` + // over {hm} | {op} (serde/schemars cannot express exclusivity; the SQL CHECK + // owns the XOR). Assert both the base required set and that BOTH term + // alternatives are reachable. + let entry = schema_of("eql_v3_jsonb_entry"); + assert_eq!( + required(&entry, "/required", "eql_v3_jsonb_entry"), + set(&["s", "c"]), + "public.eql_v3_jsonb_entry base required keys must be s + c" + ); + let entry_alts = entry + .pointer("/anyOf") + .and_then(|v| v.as_array()) + .expect("jsonb_entry schema must carry an anyOf term union"); + // Assert each arm *independently* — a flat union of required keys would let a + // mixed/invalid arm (e.g. one requiring both `hm` and `op`) slip through. + let entry_alt_required: Vec> = entry_alts + .iter() + .map(|alt| required(alt, "/required", "jsonb_entry anyOf")) + .collect(); + assert!( + entry_alt_required.len() == 2 + && entry_alt_required.contains(&set(&["hm"])) + && entry_alt_required.contains(&set(&["op"])), + "public.eql_v3_jsonb_entry anyOf must offer exactly the hm-only and op-only term \ + alternatives (each arm a singleton), got {entry_alt_required:?}" + ); + + // Query: {sv}. The element (SteVecQueryEntry) requires `s` + hm XOR op and + // carries NO ciphertext `c` — the "queries never carry ciphertext" rule. + let query = schema_of("query_jsonb"); + assert_eq!( + required(&query, "/required", "query_jsonb"), + set(&["sv"]), + "eql_v3.query_jsonb required keys must be sv" + ); + let elem_required = required( + &query, + "/$defs/SteVecQueryEntry/required", + "query_jsonb element", + ); + assert!( + elem_required.contains("s"), + "query_jsonb element must require a selector s, got {elem_required:?}" + ); + assert!( + !elem_required.contains("c"), + "query_jsonb element must NOT require a ciphertext c \ + (is_valid_ste_vec_query_payload forbids it), got {elem_required:?}" + ); + // Same arm-wise check as jsonb_entry: the query element's hm XOR op union must + // be two singleton arms, not a flattened set that could mask a mixed branch. + let query_alts = query + .pointer("/$defs/SteVecQueryEntry/anyOf") + .and_then(|v| v.as_array()) + .expect("query_jsonb element schema must carry an anyOf term union"); + let query_alt_required: Vec> = query_alts + .iter() + .map(|alt| required(alt, "/required", "query_jsonb element anyOf")) + .collect(); + assert!( + query_alt_required.len() == 2 + && query_alt_required.contains(&set(&["hm"])) + && query_alt_required.contains(&set(&["op"])), + "eql_v3.query_jsonb element anyOf must offer exactly the hm-only and \ + op-only term alternatives (each arm a singleton), got {query_alt_required:?}" + ); +} diff --git a/crates/eql-bindings/tests/domain_payload.rs b/crates/eql-bindings/tests/domain_payload.rs new file mode 100644 index 000000000..83696a5d7 --- /dev/null +++ b/crates/eql-bindings/tests/domain_payload.rs @@ -0,0 +1,278 @@ +//! Tests for the catalog-generated [`DomainPayload`] enum and the typed +//! conversion path [`from_v2_typed`]. +//! +//! The load-bearing contract is the byte-identical serialization pin: for +//! every conversion target, `serde_json::to_value(&from_v2_typed(..))` must +//! equal the `Value` the wire-oriented `from_v2` returns — the enum is +//! `#[serde(untagged)]`, so typing a payload can never change the wire. +//! Construction is always from a KNOWN target domain ([`DomainPayload::parse`] +//! / [`from_v2_typed`]) — never inferred from bytes, per the "Why there is no +//! discriminated enum" note in the v3 module docs (cross-token payloads are +//! byte-identical on the wire). + +use eql_bindings::from_v2::{from_v2, from_v2_typed, is_v3_payload, FromV2Error, TargetDomain}; +use eql_bindings::v3::{DomainPayload, DomainType}; +use serde_json::{json, Value}; + +const CIPHERTEXT: &str = "mBbL@V^%dN?0W$;g)1-JP*cmqX%JhW0ZKZ^G?lNn$CfXJH"; +const HEX: &str = "8067db44a848ab32c3056a3dbe4edf16"; +const HEX_LONG: &str = "fbc7a11fc81f2a321553bc06a91f240bb7d8f3a9c6aec445a5ba6793"; +const SELECTOR: &str = "9493d6010fe7845d52149b697729c745"; + +fn ident() -> Value { + json!({ "t": "users", "c": "email" }) +} + +/// A fully-populated v2.3 scalar (`k: "ct"`) payload — every index term, so +/// any scalar target converts (mirrors `tests/from_v2.rs`). +fn v2_ct_full() -> Value { + json!({ + "v": 2, + "k": "ct", + "c": CIPHERTEXT, + "i": ident(), + "hm": HEX, + "bf": [12, 47, 91, 188], + "ob": [HEX, HEX_LONG], + "op": HEX + }) +} + +/// A v2.3 SteVec (`k: "sv"`) payload (mirrors `tests/from_v2.rs`). +fn v2_sv() -> Value { + json!({ + "v": 2, + "k": "sv", + "i": ident(), + "sv": [ + { "s": SELECTOR, "c": CIPHERTEXT, "hm": HEX }, + { "s": SELECTOR, "a": true, "c": CIPHERTEXT, "op": HEX_LONG } + ] + }) +} + +fn target(name: &str) -> TargetDomain { + TargetDomain::parse(name).unwrap_or_else(|e| panic!("target {name} must parse: {e}")) +} + +/// The serialization pin for one conversion: the typed payload must +/// serialize to exactly the `Value` the untyped `from_v2` returns — as a +/// `Value` and as a canonical JSON string — and the direct string form must +/// parse back to the same `Value`. +fn assert_serialization_pin(v2: &Value, t: TargetDomain) -> DomainPayload { + let typed = from_v2_typed(v2, t).expect("typed conversion succeeds"); + let untyped = from_v2(v2, t).expect("untyped conversion succeeds"); + + let typed_value = serde_json::to_value(&typed).expect("typed payload serializes"); + assert_eq!(typed_value, untyped, "to_value must match from_v2 exactly"); + + // String form: canonical (through Value) is byte-identical; the direct + // struct string form differs only in JSON object key order (semantically + // irrelevant, and normalized by jsonb) — pin that it parses back equal. + assert_eq!( + serde_json::to_string(&typed_value).unwrap(), + serde_json::to_string(&untyped).unwrap(), + "canonical string form must be byte-identical" + ); + let direct: Value = + serde_json::from_str(&serde_json::to_string(&typed).unwrap()).expect("direct form parses"); + assert_eq!(direct, untyped, "direct string form must round-trip equal"); + + assert!(is_v3_payload(&typed_value)); + typed +} + +// --------------------------------------------------------------------------- +// from_v2_typed — happy paths per payload shape +// --------------------------------------------------------------------------- + +#[test] +fn typed_scalar_single_term_yields_the_matching_variant() { + let typed = assert_serialization_pin(&v2_ct_full(), target("eql_v3_integer_eq")); + assert_eq!(typed.domain(), "eql_v3_integer_eq"); + assert_eq!(typed.sql_domain(), "public.eql_v3_integer_eq"); + match &typed { + DomainPayload::IntegerEq(p) => { + assert_eq!(p.sql_domain(), "public.eql_v3_integer_eq"); + } + other => panic!("expected IntegerEq, got {other:?}"), + } +} + +#[test] +fn typed_scalar_multi_term_yields_text_search() { + let typed = assert_serialization_pin(&v2_ct_full(), target("eql_v3_text_search")); + assert_eq!(typed.domain(), "eql_v3_text_search"); + match &typed { + DomainPayload::TextSearch(p) => { + // All three terms present — the capability is the type. + assert_eq!( + serde_json::to_value(p).unwrap(), + json!({ + "v": 3, + "i": ident(), + "c": CIPHERTEXT, + "hm": HEX, + "ob": [HEX, HEX_LONG], + "bf": [12, 47, 91, 188] + }) + ); + } + other => panic!("expected TextSearch, got {other:?}"), + } +} + +#[test] +fn typed_ste_vec_document_yields_ste_vec_document() { + let typed = assert_serialization_pin(&v2_sv(), TargetDomain::Json); + assert_eq!(typed.domain(), "eql_v3_json"); + assert_eq!(typed.sql_domain(), "public.eql_v3_json"); + match &typed { + DomainPayload::SteVecDocument(doc) => { + assert_eq!(doc.sv.len(), 2, "entry order/count preserved"); + } + other => panic!("expected SteVecDocument, got {other:?}"), + } +} + +#[test] +fn typed_conversion_pins_serialization_for_every_scalar_domain() { + // Exhaustive over the catalog: every scalar conversion target's typed + // payload serializes to exactly the untyped from_v2 output, so the pin + // cannot drift when the catalog grows. + for family in eql_domains::scalar_families() { + for domain in family.domains { + let name = family.domain_name(domain); + let typed = assert_serialization_pin(&v2_ct_full(), target(&name)); + assert_eq!(typed.domain(), name, "variant reports its domain"); + } + } +} + +// --------------------------------------------------------------------------- +// from_v2_typed — failure parity with from_v2 +// --------------------------------------------------------------------------- + +#[test] +fn typed_missing_term_fails_closed_exactly_like_from_v2() { + let minimal = json!({ "v": 2, "k": "ct", "c": CIPHERTEXT, "i": ident() }); + let typed_err = from_v2_typed(&minimal, target("eql_v3_text_eq")).unwrap_err(); + let untyped_err = from_v2(&minimal, target("eql_v3_text_eq")).unwrap_err(); + for err in [&typed_err, &untyped_err] { + match err { + FromV2Error::MissingTerm { domain, key, entry } => { + assert_eq!(domain, "eql_v3_text_eq"); + assert_eq!(key, "hm"); + assert_eq!(entry, &None); + } + other => panic!("expected MissingTerm, got {other:?}"), + } + } +} + +#[test] +fn typed_rejects_the_same_inputs_as_from_v2() { + // Version, kind, and kind-mismatch failures are shared with from_v2 (one + // conversion path); spot-check each class. + let v3 = json!({ "v": 3, "i": ident(), "c": CIPHERTEXT, "hm": HEX }); + assert!(matches!( + from_v2_typed(&v3, target("eql_v3_text_eq")).unwrap_err(), + FromV2Error::UnsupportedVersion { found: Some(3) } + )); + assert!(matches!( + from_v2_typed(&v2_sv(), target("eql_v3_integer_eq")).unwrap_err(), + FromV2Error::KindMismatch { .. } + )); + // A v2 QUERY payload (no `c`) fails the strict parse — Invalid, exactly + // like from_v2's validate_as. + let query = json!({ "v": 2, "k": "ct", "i": ident(), "hm": HEX }); + assert!(matches!( + from_v2_typed(&query, target("eql_v3_text_eq")).unwrap_err(), + FromV2Error::Invalid(_) + )); +} + +// --------------------------------------------------------------------------- +// DomainPayload::parse — construct-from-known-domain +// --------------------------------------------------------------------------- + +#[test] +fn parse_constructs_every_stored_payload_domain() { + // Every scalar domain plus the SteVec document is parseable by name; the + // constructed variant reports the same domain back. + for family in eql_domains::CATALOG { + for domain in family.domains { + let name = family.domain_name(domain); + let stored = domain.is_scalar() || name == "eql_v3_json"; + let value = if name == "eql_v3_json" { + from_v2(&v2_sv(), TargetDomain::Json).unwrap() + } else if stored { + from_v2(&v2_ct_full(), target(&name)).unwrap() + } else { + // jsonb_entry / query_jsonb: inventory members but not stored + // payloads — no DomainPayload variant, parse returns None. + assert!( + DomainPayload::parse(&name, &json!({})).is_none(), + "{name} must not be a DomainPayload domain" + ); + continue; + }; + let parsed = DomainPayload::parse(&name, &value) + .unwrap_or_else(|| panic!("{name} must be a DomainPayload domain")) + .unwrap_or_else(|e| panic!("{name} strict parse must succeed: {e}")); + assert_eq!(parsed.domain(), name); + assert_eq!(serde_json::to_value(&parsed).unwrap(), value); + } + } +} + +#[test] +fn parse_returns_none_for_unknown_domains() { + for name in [ + "int5", + "public.eql_v3_integer_eq", + "", + "jsonb", + "eql_v3_jsonb_entry", + "query_jsonb", + ] { + assert!( + DomainPayload::parse(name, &json!({})).is_none(), + "{name:?} must not resolve to a DomainPayload variant" + ); + } +} + +#[test] +fn parse_is_strict_exactly_like_the_binding_struct() { + // Unknown keys and wrong envelope versions fail — DomainPayload::parse is + // the binding struct's strict Deserialize, kept instead of discarded. + let mut good = from_v2(&v2_ct_full(), target("eql_v3_integer_eq")).unwrap(); + assert!(DomainPayload::parse("eql_v3_integer_eq", &good) + .unwrap() + .is_ok()); + + good["extra"] = json!(1); + assert!( + DomainPayload::parse("eql_v3_integer_eq", &good) + .unwrap() + .is_err(), + "deny_unknown_fields must reject a stray key" + ); + + let wrong_version = json!({ "v": 2, "i": ident(), "c": CIPHERTEXT, "hm": HEX }); + assert!( + DomainPayload::parse("eql_v3_integer_eq", &wrong_version) + .unwrap() + .is_err(), + "SchemaVersion must reject v: 2" + ); +} + +#[test] +fn as_domain_type_exposes_the_inner_trait_object() { + let typed = from_v2_typed(&v2_ct_full(), target("eql_v3_bigint_ord_ope")).unwrap(); + let dt: &dyn DomainType = typed.as_domain_type(); + assert_eq!(dt.sql_domain(), "public.eql_v3_bigint_ord_ope"); + assert_eq!(dt.domain(), "eql_v3_bigint_ord_ope"); +} diff --git a/crates/eql-bindings/tests/export.rs b/crates/eql-bindings/tests/export.rs new file mode 100644 index 000000000..a79853cf9 --- /dev/null +++ b/crates/eql-bindings/tests/export.rs @@ -0,0 +1,42 @@ +//! JSON Schema export — runs during `cargo test` (alongside ts-rs's own +//! export tests, which write `bindings/`). Output is checked in; freshness +//! is enforced by `mise run types:check`. Schema files are named after the +//! SQL domain — the protocol identity — not the Rust type. +//! +//! Output base defaults to `schema/` (relative to the crate dir, where +//! `cargo test` runs), so a plain `cargo test` regenerates the checked-in +//! tree. `EQL_TYPES_SCHEMA_DIR` overrides it — mirroring ts-rs's +//! `TS_RS_EXPORT_DIR` — so `mise run types:generate` can redirect output to a +//! throwaway temp dir and only swap it into place after a successful build. + +use eql_bindings::v3; + +#[test] +fn dump_v3_json_schemas() { + let base = std::env::var("EQL_TYPES_SCHEMA_DIR").unwrap_or_else(|_| "schema".into()); + let dir = format!("{base}/v3"); + // Clear any prior output first so JSON for a domain that was removed from the + // catalog does not linger as a stale checked-in file. `schema/v3` holds only + // this test's generated `*.json`, so recreating it from scratch is safe. + if std::path::Path::new(&dir).exists() { + std::fs::remove_dir_all(&dir).unwrap(); + } + std::fs::create_dir_all(&dir).unwrap(); + // Both the stored/SteVec inventory and the query-operand twins: query + // domains are a wire shape consumers validate, so they get JSON Schema too + // (parity with the ts-rs export, which picks them up via `#[ts(export)]`). + for entry in v3::all().into_iter().chain(v3::all_query()) { + let mut schema = serde_json::to_value(entry.schema()).unwrap(); + // schemars 0.8 emits no $id; inject the canonical one (the URL format + // lives on DomainType::schema_id, pinned by tests/catalog_parity.rs). + schema + .as_object_mut() + .unwrap() + .insert("$id".into(), entry.schema_id().into()); + std::fs::write( + format!("{dir}/{}.json", entry.domain()), + serde_json::to_string_pretty(&schema).unwrap(), + ) + .unwrap(); + } +} diff --git a/crates/eql-bindings/tests/from_v2.rs b/crates/eql-bindings/tests/from_v2.rs new file mode 100644 index 000000000..0475fc16c --- /dev/null +++ b/crates/eql-bindings/tests/from_v2.rs @@ -0,0 +1,530 @@ +//! Fixture-driven tests for the `from_v2` wire converter: EQL v2.3 payloads +//! (the JSON cipherstash-client emits, per +//! `docs/reference/schema/eql-payload-v2.3.schema.json`) into v3 payloads. +//! No database, no credentials — the v2 fixtures are literal wire shapes +//! modeled on the payload-schema test constants, and every converted output +//! is checked against the exact expected v3 JSON (the binding structs are the +//! contract; schema-file validation lives in +//! `tests/sqlx/tests/payload_schema_tests.rs`). + +use eql_bindings::from_v2::{from_v2, from_v2_query, is_v3_payload, FromV2Error, TargetDomain}; +use serde_json::{json, Value}; + +const CIPHERTEXT: &str = "mBbL@V^%dN?0W$;g)1-JP*cmqX%JhW0ZKZ^G?lNn$CfXJH"; +const HEX: &str = "8067db44a848ab32c3056a3dbe4edf16"; +const HEX_LONG: &str = "fbc7a11fc81f2a321553bc06a91f240bb7d8f3a9c6aec445a5ba6793"; +const SELECTOR: &str = "9493d6010fe7845d52149b697729c745"; + +fn ident() -> Value { + json!({ "t": "users", "c": "email" }) +} + +/// A fully-populated v2.3 scalar (`k: "ct"`) payload: every index term the v2 +/// wire can carry (plus `op`, which cipherstash-client adds for OPE-ordered +/// columns ahead of the v3 envelope), so conversions must both COPY the keys +/// the target requires and DROP the ones it doesn't. +fn v2_ct_full() -> Value { + json!({ + "v": 2, + "k": "ct", + "c": CIPHERTEXT, + "i": ident(), + "hm": HEX, + "bf": [12, 47, 91, 188], + "ob": [HEX, HEX_LONG], + "op": HEX + }) +} + +/// A minimal v2.3 scalar payload: envelope only, no index terms. +fn v2_ct_minimal() -> Value { + json!({ "v": 2, "k": "ct", "c": CIPHERTEXT, "i": ident() }) +} + +/// A v2.3 SteVec (`k: "sv"`) payload: an `hm` root entry first (the +/// decryption root — its `c` is the record ciphertext), then an `op` leaf +/// carrying the optional array marker `a`. +fn v2_sv() -> Value { + json!({ + "v": 2, + "k": "sv", + "i": ident(), + "sv": [ + { "s": SELECTOR, "c": CIPHERTEXT, "hm": HEX }, + { "s": SELECTOR, "a": true, "c": CIPHERTEXT, "op": HEX_LONG } + ] + }) +} + +fn target(name: &str) -> TargetDomain { + TargetDomain::parse(name).unwrap_or_else(|e| panic!("target {name} must parse: {e}")) +} + +// --------------------------------------------------------------------------- +// TargetDomain::parse +// --------------------------------------------------------------------------- + +#[test] +fn parse_resolves_every_catalog_scalar_domain_and_json() { + // Shape-aware catalog resolution: every flat scalar domain name parses to + // Scalar, the SteVec document parses to Json, and the SteVec entry/query + // domains — real inventory members but not conversion targets — are + // rejected, so `parse` can never drift from `eql-domains::CATALOG`. + for family in eql_domains::CATALOG { + for domain in family.domains { + let name = family.domain_name(domain); + let parsed = TargetDomain::parse(&name); + if domain.is_scalar() { + assert!( + matches!(parsed, Ok(TargetDomain::Scalar(_))), + "{name} must parse to Scalar, got {parsed:?}" + ); + } else if name == "eql_v3_json" { + assert_eq!(parsed.unwrap(), TargetDomain::Json); + } else { + assert!( + matches!(parsed, Err(FromV2Error::UnknownDomain { .. })), + "{name} is not a conversion target, got {parsed:?}" + ); + } + } + } +} + +#[test] +fn parse_rejects_unknown_domain_names() { + for name in ["int5", "text_like", "public.eql_v3_integer_eq", "", "jsonb"] { + let parsed = TargetDomain::parse(name); + assert!( + matches!(parsed, Err(FromV2Error::UnknownDomain { .. })), + "{name:?} must be UnknownDomain, got {parsed:?}" + ); + } +} + +#[test] +fn target_domain_is_copy_and_comparable() { + let a = target("eql_v3_integer_eq"); + let b = a; // Copy + assert_eq!(a, b); + assert_ne!(a, target("eql_v3_integer")); + assert_ne!(a, TargetDomain::Json); +} + +// --------------------------------------------------------------------------- +// Scalar conversions (k: "ct") +// --------------------------------------------------------------------------- + +#[test] +fn storage_only_scalar_drops_k_and_all_terms() { + let out = from_v2(&v2_ct_full(), target("eql_v3_integer")).unwrap(); + assert_eq!(out, json!({ "v": 3, "i": ident(), "c": CIPHERTEXT })); + assert!(is_v3_payload(&out)); +} + +#[test] +fn text_eq_copies_hm_and_drops_the_rest() { + let out = from_v2(&v2_ct_full(), target("eql_v3_text_eq")).unwrap(); + assert_eq!( + out, + json!({ "v": 3, "i": ident(), "c": CIPHERTEXT, "hm": HEX }) + ); + assert!(is_v3_payload(&out)); +} + +#[test] +fn integer_ord_ore_copies_ob_verbatim() { + let out = from_v2(&v2_ct_full(), target("eql_v3_integer_ord_ore")).unwrap(); + assert_eq!( + out, + json!({ "v": 3, "i": ident(), "c": CIPHERTEXT, "ob": [HEX, HEX_LONG] }) + ); + assert!(is_v3_payload(&out)); +} + +#[test] +fn integer_ord_ope_copies_op_verbatim() { + let out = from_v2(&v2_ct_full(), target("eql_v3_integer_ord_ope")).unwrap(); + assert_eq!( + out, + json!({ "v": 3, "i": ident(), "c": CIPHERTEXT, "op": HEX }) + ); +} + +#[test] +fn text_ord_ope_requires_both_hm_and_op() { + let out = from_v2(&v2_ct_full(), target("eql_v3_text_ord_ope")).unwrap(); + assert_eq!( + out, + json!({ "v": 3, "i": ident(), "c": CIPHERTEXT, "hm": HEX, "op": HEX }) + ); +} + +#[test] +fn text_search_copies_hm_ob_and_bf() { + let out = from_v2(&v2_ct_full(), target("eql_v3_text_search")).unwrap(); + assert_eq!( + out, + json!({ + "v": 3, + "i": ident(), + "c": CIPHERTEXT, + "hm": HEX, + "ob": [HEX, HEX_LONG], + "bf": [12, 47, 91, 188] + }) + ); + assert!(is_v3_payload(&out)); +} + +#[test] +fn missing_required_term_fails_closed() { + let err = from_v2(&v2_ct_minimal(), target("eql_v3_text_eq")).unwrap_err(); + match err { + FromV2Error::MissingTerm { domain, key, entry } => { + assert_eq!(domain, "eql_v3_text_eq"); + assert_eq!(key, "hm"); + // Scalar payloads have no sv entries to index. + assert_eq!(entry, None); + } + other => panic!("expected MissingTerm, got {other:?}"), + } + // Multi-term domain reports its first absent key. + let err = from_v2(&v2_ct_minimal(), target("eql_v3_text_search")).unwrap_err(); + assert!(matches!(err, FromV2Error::MissingTerm { .. })); +} + +#[test] +fn bloom_filter_upper_half_reinterprets_as_negative_i16() { + // v2 emits unsigned bit positions; the upper half (32768..=65535) of a + // 65536-wide filter wraps to negative i16 — 40000 - 65536 = -25536. + let mut v2 = v2_ct_full(); + v2["bf"] = json!([0, 32767, 32768, 40000, 65535]); + let out = from_v2(&v2, target("eql_v3_text_search")).unwrap(); + assert_eq!(out["bf"], json!([0, 32767, -32768, -25536, -1])); +} + +#[test] +fn bloom_filter_already_signed_values_pass_through() { + // The v2.3 schema also allows already-signed smallint values; they pass + // through unchanged rather than double-wrapping. + let mut v2 = v2_ct_full(); + v2["bf"] = json!([-1, -32768, 12]); + let out = from_v2(&v2, target("eql_v3_text_search")).unwrap(); + assert_eq!(out["bf"], json!([-1, -32768, 12])); +} + +#[test] +fn bloom_filter_element_above_u16_is_out_of_range() { + let mut v2 = v2_ct_full(); + v2["bf"] = json!([12, 70000]); + let err = from_v2(&v2, target("eql_v3_text_search")).unwrap_err(); + match err { + FromV2Error::BloomOutOfRange { index, value } => { + assert_eq!(index, 1); + assert_eq!(value, 70000); + } + other => panic!("expected BloomOutOfRange, got {other:?}"), + } + // Below i16::MIN is equally unrepresentable. + let mut v2 = v2_ct_full(); + v2["bf"] = json!([-32769]); + assert!(matches!( + from_v2(&v2, target("eql_v3_text_search")).unwrap_err(), + FromV2Error::BloomOutOfRange { .. } + )); +} + +#[test] +fn bloom_filter_reinterpretation_is_exhaustively_correct() { + // Exhaustive over EVERY representable input — stronger than a sampled + // property test, and the domain is only ~98k values: the signed range is + // identity, the unsigned upper half wraps two's-complement, and in both + // cases the 16-bit pattern is preserved (`out as u16 == in as u16`, the + // reinterpretation invariant). + let inputs: Vec = (i64::from(i16::MIN)..=i64::from(u16::MAX)).collect(); + let mut v2 = v2_ct_full(); + v2["bf"] = json!(inputs); + let out = from_v2(&v2, target("eql_v3_text_search")).unwrap(); + let out_bf = out["bf"].as_array().unwrap(); + assert_eq!(out_bf.len(), inputs.len()); + for (n, o) in inputs.iter().zip(out_bf) { + let o = o.as_i64().unwrap(); + assert!((i64::from(i16::MIN)..=i64::from(i16::MAX)).contains(&o)); + assert_eq!(o as u16, *n as u16, "bit pattern must be preserved for {n}"); + if *n <= i64::from(i16::MAX) { + assert_eq!(o, *n, "signed range is identity"); + } else { + assert_eq!(o, *n - 65536, "unsigned upper half wraps negative"); + } + } + // The exact first values outside the representable domain are rejected. + for bad in [i64::from(i16::MIN) - 1, i64::from(u16::MAX) + 1] { + let mut v2 = v2_ct_full(); + v2["bf"] = json!([bad]); + assert!(matches!( + from_v2(&v2, target("eql_v3_text_search")).unwrap_err(), + FromV2Error::BloomOutOfRange { index: 0, value } if value == bad + )); + } +} + +#[test] +fn already_v3_input_is_rejected() { + let v3 = json!({ "v": 3, "i": ident(), "c": CIPHERTEXT, "hm": HEX }); + let err = from_v2(&v3, target("eql_v3_text_eq")).unwrap_err(); + assert!( + matches!(err, FromV2Error::UnsupportedVersion { found: Some(3) }), + "got {err:?}" + ); + // Non-envelope inputs (no `v` at all) are also unsupported-version. + let err = from_v2(&json!({ "hello": "world" }), target("eql_v3_text_eq")).unwrap_err(); + assert!(matches!( + err, + FromV2Error::UnsupportedVersion { found: None } + )); + let err = from_v2(&json!("plaintext"), target("eql_v3_text_eq")).unwrap_err(); + assert!(matches!(err, FromV2Error::UnsupportedVersion { .. })); +} + +#[test] +fn unknown_or_missing_kind_is_rejected() { + let mut v2 = v2_ct_full(); + v2["k"] = json!("xx"); + assert!(matches!( + from_v2(&v2, target("eql_v3_text_eq")).unwrap_err(), + FromV2Error::UnknownKind { .. } + )); + let mut v2 = v2_ct_full(); + v2.as_object_mut().unwrap().remove("k"); + assert!(matches!( + from_v2(&v2, target("eql_v3_text_eq")).unwrap_err(), + FromV2Error::UnknownKind { found: None } + )); +} + +#[test] +fn kind_mismatch_is_rejected_in_both_directions() { + // sv payload for a scalar target. + assert!(matches!( + from_v2(&v2_sv(), target("eql_v3_integer_eq")).unwrap_err(), + FromV2Error::KindMismatch { .. } + )); + // ct payload for the Json target. + assert!(matches!( + from_v2(&v2_ct_full(), TargetDomain::Json).unwrap_err(), + FromV2Error::KindMismatch { .. } + )); +} + +#[test] +fn v2_query_payload_without_ciphertext_is_rejected_by_from_v2() { + // A v2 QUERY payload omits `c`; `from_v2` converts STORED payloads only, + // and the final validation through the binding struct fails closed. + let query = json!({ "v": 2, "k": "ct", "i": ident(), "hm": HEX }); + let err = from_v2(&query, target("eql_v3_text_eq")).unwrap_err(); + assert!(matches!(err, FromV2Error::Invalid(_)), "got {err:?}"); +} + +// --------------------------------------------------------------------------- +// SteVec conversions (k: "sv") +// --------------------------------------------------------------------------- + +#[test] +fn ste_vec_document_converts_and_preserves_entry_order() { + // Entry order is the decryption contract: sv[0] is the root entry whose + // `c` is the record ciphertext (upstream `SteVec::into_root_ciphertext`), + // so conversion must copy entries in order, `a` marker included. The root + // `k: "sv"` form discriminator is carried through — the v3 document + // models it (`SteVecDocument.k`, required on the wire). + let out = from_v2(&v2_sv(), TargetDomain::Json).unwrap(); + assert_eq!( + out, + json!({ + "v": 3, + "k": "sv", + "i": ident(), + "sv": [ + { "s": SELECTOR, "c": CIPHERTEXT, "hm": HEX }, + { "s": SELECTOR, "c": CIPHERTEXT, "a": true, "op": HEX_LONG } + ] + }) + ); + assert!(is_v3_payload(&out)); +} + +#[test] +fn ste_vec_entry_with_both_terms_is_ambiguous() { + let mut v2 = v2_sv(); + v2["sv"][1] = json!({ "s": SELECTOR, "c": CIPHERTEXT, "hm": HEX, "op": HEX_LONG }); + let err = from_v2(&v2, TargetDomain::Json).unwrap_err(); + assert!(matches!(err, FromV2Error::AmbiguousTerm { entry: 1 })); +} + +#[test] +fn ste_vec_entry_with_ore_term_is_unconvertible() { + // A CLLW-ORE `oc` entry term has no v3 representation: v3 orders SteVec + // entries by the CLLW-OPE `op` term (native byte order), and ORE + // ciphertext bytes would silently misorder — the converter must fail + // closed and demand re-encryption, never pass `oc` bytes through as `op`. + let mut v2 = v2_sv(); + v2["sv"][1] = json!({ "s": SELECTOR, "c": CIPHERTEXT, "oc": HEX_LONG }); + let err = from_v2(&v2, TargetDomain::Json).unwrap_err(); + assert!(matches!( + err, + FromV2Error::UnconvertibleOreTerm { entry: 1 } + )); + // Even alongside a valid term: `oc` presence alone is disqualifying. + let mut v2 = v2_sv(); + v2["sv"][1] = json!({ "s": SELECTOR, "c": CIPHERTEXT, "hm": HEX, "oc": HEX_LONG }); + let err = from_v2(&v2, TargetDomain::Json).unwrap_err(); + assert!(matches!( + err, + FromV2Error::UnconvertibleOreTerm { entry: 1 } + )); +} + +#[test] +fn ste_vec_entry_with_neither_term_is_missing() { + // Term-less entry at index 1: the error must locate it (mirroring + // AmbiguousTerm) and name the document domain. + let mut v2 = v2_sv(); + v2["sv"][1] = json!({ "s": SELECTOR, "c": CIPHERTEXT }); + let err = from_v2(&v2, TargetDomain::Json).unwrap_err(); + match err { + FromV2Error::MissingTerm { domain, key, entry } => { + assert_eq!(domain, "eql_v3_json"); + assert_eq!(key, "hm|op"); + assert_eq!(entry, Some(1)); + } + other => panic!("expected MissingTerm, got {other:?}"), + } +} + +// --------------------------------------------------------------------------- +// Query payloads +// --------------------------------------------------------------------------- + +#[test] +fn ste_vec_query_converts_to_v3_needle() { + // The v2.3 SteVecQueryPayload is `{sv:[{s, hm|op}]}` — no envelope. + let v2 = json!({ + "sv": [ + { "s": SELECTOR, "hm": HEX }, + { "s": SELECTOR, "op": HEX_LONG } + ] + }); + let out = from_v2_query(&v2, TargetDomain::Json).unwrap(); + assert_eq!(out, v2); +} + +#[test] +fn ste_vec_query_normalizes_c_and_a_away() { + // Mirrors `eql_v3.to_ste_vec_query`: the canonical needle carries only + // `s` + one term, so stray `a` markers (legal on v2 query elements) and + // `c` (a stored-document entry re-used as a needle) are stripped. + let v2 = json!({ + "v": 2, + "k": "sv", + "i": ident(), + "sv": [ { "s": SELECTOR, "a": true, "c": CIPHERTEXT, "hm": HEX } ] + }); + let out = from_v2_query(&v2, TargetDomain::Json).unwrap(); + assert_eq!(out, json!({ "sv": [ { "s": SELECTOR, "hm": HEX } ] })); +} + +#[test] +fn ste_vec_query_entry_term_errors_match_document_rules() { + let both = json!({ "sv": [ { "s": SELECTOR, "hm": HEX, "op": HEX_LONG } ] }); + assert!(matches!( + from_v2_query(&both, TargetDomain::Json).unwrap_err(), + FromV2Error::AmbiguousTerm { entry: 0 } + )); + // The query path names ITS shape (query_jsonb, not json) and locates the + // entry. + let neither = json!({ "sv": [ { "s": SELECTOR, "hm": HEX }, { "s": SELECTOR } ] }); + match from_v2_query(&neither, TargetDomain::Json).unwrap_err() { + FromV2Error::MissingTerm { domain, key, entry } => { + assert_eq!(domain, "query_jsonb"); + assert_eq!(key, "hm|op"); + assert_eq!(entry, Some(1)); + } + other => panic!("expected MissingTerm, got {other:?}"), + } +} + +#[test] +fn scalar_query_hoists_terms_and_storage_only_is_unsupported() { + // CIP-3432: a term-bearing scalar target hoists its terms into the + // enveloped term-only `_query` operand — `{v:3, i, }`, dropping + // the stored `c`/`k`. A storage-only target has no operators, so it stays + // UnsupportedQueryTarget. + let query = json!({ "v": 2, "k": "ct", "i": ident(), "c": CIPHERTEXT, "hm": HEX }); + let out = + from_v2_query(&query, target("eql_v3_text_eq")).expect("text_eq query hoist succeeds"); + assert_eq!( + out, + json!({ "v": 3, "i": ident(), "hm": HEX }), + "hoist keeps v/i + the hm term, drops c/k" + ); + + let err = from_v2_query(&query, target("eql_v3_boolean")).unwrap_err(); + match err { + FromV2Error::UnsupportedQueryTarget { domain } => assert_eq!(domain, "eql_v3_boolean"), + other => panic!("expected UnsupportedQueryTarget for storage-only, got {other:?}"), + } +} + +// --------------------------------------------------------------------------- +// is_v3_payload +// --------------------------------------------------------------------------- + +#[test] +fn is_v3_payload_is_a_lenient_envelope_probe() { + // True: converted outputs (asserted inline above) and hand-built v3 + // envelopes, scalar and SteVec. + assert!(is_v3_payload( + &json!({ "v": 3, "i": ident(), "c": CIPHERTEXT }) + )); + assert!(is_v3_payload(&json!({ "v": 3, "i": ident(), "sv": [] }))); + + // False: v2 payloads (scalar and sv), plaintext JSON, non-objects, and + // fragments missing any probe key. + assert!(!is_v3_payload(&v2_ct_full())); + assert!(!is_v3_payload(&v2_sv())); + assert!(!is_v3_payload(&json!({ "hello": "world", "v": 3 }))); + assert!(!is_v3_payload(&json!({ "v": 3, "c": CIPHERTEXT }))); + assert!(!is_v3_payload( + &json!({ "v": 3, "i": "not-an-object", "c": CIPHERTEXT }) + )); + assert!(!is_v3_payload( + &json!({ "v": "3", "i": ident(), "c": CIPHERTEXT }) + )); + assert!(!is_v3_payload(&json!("plaintext"))); + assert!(!is_v3_payload(&json!(3))); + assert!(!is_v3_payload(&json!(null))); +} + +// --------------------------------------------------------------------------- +// Error type contract +// --------------------------------------------------------------------------- + +#[test] +fn errors_display_and_implement_std_error() { + // Hand-rolled Display/Error (no thiserror): every variant renders a + // non-empty, informative message, and Invalid exposes its serde source. + let err = from_v2(&v2_ct_minimal(), target("eql_v3_text_eq")).unwrap_err(); + let msg = err.to_string(); + assert!( + msg.contains("eql_v3_text_eq") && msg.contains("hm"), + "got {msg:?}" + ); + + let query = json!({ "v": 2, "k": "ct", "i": ident(), "hm": HEX }); + let invalid = from_v2(&query, target("eql_v3_text_eq")).unwrap_err(); + let source = std::error::Error::source(&invalid); + assert!( + source.is_some(), + "Invalid must expose its serde_json source" + ); +} diff --git a/crates/eql-bindings/tests/mod_pins_catalog.rs b/crates/eql-bindings/tests/mod_pins_catalog.rs new file mode 100644 index 000000000..0a5bf26aa --- /dev/null +++ b/crates/eql-bindings/tests/mod_pins_catalog.rs @@ -0,0 +1,41 @@ +//! Permanent guard: the HAND-WRITTEN `src/v3/mod.rs` `pub mod ;` list +//! stays in step with `eql_domains::CATALOG`. `generate_bindings` owns the +//! `.rs` files and `inventory.rs` but deliberately never touches `mod.rs` +//! (it carries the architectural module doc and the non-derivable float-NaN / +//! bool caveats). So adding a family to the catalog writes `.rs` + +//! `inventory.rs` referencing `super::::…`, but if the dev forgets to add +//! `pub mod ;` to `mod.rs` the only symptom is a cryptic `E0433` +//! ("failed to resolve: use of undeclared module") during `cargo test` — and only +//! AFTER the in-place regen has already overwritten committed source. This test +//! converts that into a friendly, catalog-pinned assertion with a fix hint. + +use eql_domains::CATALOG; + +#[test] +fn mod_rs_declares_every_catalog_family() { + let path = format!("{}/src/v3/mod.rs", env!("CARGO_MANIFEST_DIR")); + let src = std::fs::read_to_string(&path).unwrap_or_else(|e| panic!("read {path}: {e}")); + + // A `pub mod ;` declaration, ignoring leading indentation. The list is + // flat and unattributed, so an exact-line match is sufficient and avoids + // false positives from substrings inside doc comments. + let declared: std::collections::BTreeSet<&str> = src + .lines() + .filter_map(|l| { + let l = l.trim(); + l.strip_prefix("pub mod ") + .and_then(|rest| rest.strip_suffix(';')) + }) + .collect(); + + for family in CATALOG { + assert!( + declared.contains(family.name), + "crates/eql-bindings/src/v3/mod.rs is missing `pub mod {0};` for catalog \ + family `{0}`. mod.rs stays hand-written (it carries the architectural \ + module doc + caveats), so generate_bindings cannot add it for you — \ + add the line by hand.", + family.name + ); + } +} diff --git a/crates/eql-bindings/tests/query_payload.rs b/crates/eql-bindings/tests/query_payload.rs new file mode 100644 index 000000000..3c1642879 --- /dev/null +++ b/crates/eql-bindings/tests/query_payload.rs @@ -0,0 +1,265 @@ +//! Tests for the generated [`QueryPayload`] enum and the typed query +//! conversion path [`from_v2_query_typed`]. +//! +//! The load-bearing contract mirrors `tests/domain_payload.rs`: the +//! byte-identical serialization pin — `serde_json::to_value(&from_v2_query_typed(..))` +//! must equal the `Value` the wire-oriented `from_v2_query` returns (the enum +//! is `#[serde(untagged)]`, so typing a query payload can never change the +//! wire) — plus failure parity: both entry points reject the same inputs with +//! the same errors, including [`FromV2Error::UnsupportedQueryTarget`] for +//! STORAGE-ONLY scalar targets (term-bearing scalars now hoist to their +//! `query_` operand — CIP-3432, prefix naming CIP-3442). + +use eql_bindings::from_v2::{from_v2_query, from_v2_query_typed, FromV2Error, TargetDomain}; +use eql_bindings::v3::{DomainType, QueryPayload}; +use serde_json::{json, Value}; + +const CIPHERTEXT: &str = "mBbL@V^%dN?0W$;g)1-JP*cmqX%JhW0ZKZ^G?lNn$CfXJH"; +const HEX: &str = "8067db44a848ab32c3056a3dbe4edf16"; +const HEX_LONG: &str = "fbc7a11fc81f2a321553bc06a91f240bb7d8f3a9c6aec445a5ba6793"; +const SELECTOR: &str = "9493d6010fe7845d52149b697729c745"; + +fn ident() -> Value { + json!({ "t": "users", "c": "email" }) +} + +fn target(name: &str) -> TargetDomain { + TargetDomain::parse(name).unwrap_or_else(|e| panic!("target {name} must parse: {e}")) +} + +/// The serialization pin for one query conversion: the typed payload must +/// serialize to exactly the `Value` the untyped `from_v2_query` returns — as +/// a `Value` and as a canonical JSON string (mirrors +/// `tests/domain_payload.rs::assert_serialization_pin`). +fn assert_serialization_pin(v2: &Value) -> QueryPayload { + let typed = from_v2_query_typed(v2, TargetDomain::Json).expect("typed conversion succeeds"); + let untyped = from_v2_query(v2, TargetDomain::Json).expect("untyped conversion succeeds"); + + let typed_value = serde_json::to_value(&typed).expect("typed payload serializes"); + assert_eq!( + typed_value, untyped, + "to_value must match from_v2_query exactly" + ); + + assert_eq!( + serde_json::to_string(&typed_value).unwrap(), + serde_json::to_string(&untyped).unwrap(), + "canonical string form must be byte-identical" + ); + let direct: Value = + serde_json::from_str(&serde_json::to_string(&typed).unwrap()).expect("direct form parses"); + assert_eq!(direct, untyped, "direct string form must round-trip equal"); + + typed +} + +// --------------------------------------------------------------------------- +// from_v2_query_typed — happy path (the jsonb containment needle) +// --------------------------------------------------------------------------- + +#[test] +fn typed_needle_yields_the_ste_vec_variant() { + // The v2.3 SteVecQueryPayload is `{sv:[{s, hm|op}]}` — no envelope. + let v2 = json!({ + "sv": [ + { "s": SELECTOR, "hm": HEX }, + { "s": SELECTOR, "op": HEX_LONG } + ] + }); + let typed = assert_serialization_pin(&v2); + assert_eq!(typed.domain(), "query_jsonb"); + assert_eq!(typed.sql_domain(), "eql_v3.query_jsonb"); + match &typed { + QueryPayload::SteVec(q) => { + assert_eq!(q.sv.len(), 2, "entry order/count preserved"); + assert_eq!(q.sql_domain(), "eql_v3.query_jsonb"); + } + other => panic!("a jsonb target must yield the SteVec needle, got {other:?}"), + } +} + +#[test] +fn typed_needle_normalizes_exactly_like_from_v2_query() { + // A stored-document payload used as a needle: the envelope is dropped and + // entries normalize to `s` + one term (`a`/`c` stripped) — pinned equal + // to from_v2_query byte-for-byte. + let v2 = json!({ + "v": 2, + "k": "sv", + "i": ident(), + "sv": [ { "s": SELECTOR, "a": true, "c": CIPHERTEXT, "hm": HEX } ] + }); + let typed = assert_serialization_pin(&v2); + assert_eq!( + serde_json::to_value(&typed).unwrap(), + json!({ "sv": [ { "s": SELECTOR, "hm": HEX } ] }) + ); +} + +// --------------------------------------------------------------------------- +// from_v2_query_typed — failure parity with from_v2_query +// --------------------------------------------------------------------------- + +/// A v2 `k:"ct"` scalar payload carrying representative values for `term_keys` +/// PLUS a stray `c` (which a query hoist must drop). Empty `term_keys` → just +/// the `{v,k,i,c}` envelope. +fn v2_scalar_query(term_keys: &[&str]) -> Value { + let mut obj = json!({ "v": 2, "k": "ct", "i": ident(), "c": CIPHERTEXT }); + let map = obj.as_object_mut().unwrap(); + for &k in term_keys { + let term = match k { + "hm" | "op" => json!(HEX), + "ob" => json!([HEX, HEX]), + "bf" => json!([1, 2, 3]), + other => panic!("unhandled term key {other}"), + }; + map.insert(k.into(), term); + } + obj +} + +#[test] +fn scalar_query_hoist_and_storage_only_unsupported() { + // CIP-3432: a term-bearing scalar target hoists the v2 payload's required + // terms into the enveloped term-only operand `{v:3, i, }` for its + // `query_` domain (dropping `c`/`k`); a storage-only scalar target + // (no operators) still fails closed with UnsupportedQueryTarget. Exhaustive + // over the catalog, both entry points, with the typed==untyped pin. + for family in eql_domains::scalar_families() { + for domain in family.domains { + let name = family.domain_name(domain); + let t = target(&name); + let term_keys: Vec<&str> = eql_domains::Term::term_json_keys(domain.terms); + let v2 = v2_scalar_query(&term_keys); + + if term_keys.is_empty() { + for err in [ + from_v2_query_typed(&v2, t).unwrap_err(), + from_v2_query(&v2, t).unwrap_err(), + ] { + match err { + FromV2Error::UnsupportedQueryTarget { domain } => assert_eq!(domain, name), + other => { + panic!("expected UnsupportedQueryTarget for {name}, got {other:?}") + } + } + } + continue; + } + + let out = + from_v2_query(&v2, t).unwrap_or_else(|e| panic!("{name} hoist failed: {e:?}")); + let obj = out.as_object().unwrap(); + assert_eq!(obj.get("v").and_then(Value::as_u64), Some(3), "{name} v:3"); + assert!(obj.contains_key("i"), "{name} keeps i"); + assert!(!obj.contains_key("c"), "{name} query drops c"); + assert!(!obj.contains_key("k"), "{name} query drops k"); + for k in &term_keys { + assert!(obj.contains_key(*k), "{name} keeps term {k}"); + } + assert_eq!( + obj.len(), + 2 + term_keys.len(), + "{name} is exactly v+i+terms" + ); + + let typed = + from_v2_query_typed(&v2, t).unwrap_or_else(|e| panic!("{name} typed hoist: {e:?}")); + // The query twin joins `query_` to the BARE name: the stored + // domain's `eql_v3_` version prefix (CIP-3472) never applies to + // query operands (the `eql_v3` schema already versions them). + let query_name = domain.query_name(family.name); + assert_eq!(typed.domain(), query_name, "{name} domain"); + assert_eq!(typed.sql_domain(), format!("eql_v3.{query_name}")); + assert_eq!( + serde_json::to_value(&typed).unwrap(), + out, + "{name}: typed to_value must equal from_v2_query" + ); + } + } +} + +#[test] +fn typed_entry_term_errors_match_from_v2_query() { + let both = json!({ "sv": [ { "s": SELECTOR, "hm": HEX, "op": HEX_LONG } ] }); + assert!(matches!( + from_v2_query_typed(&both, TargetDomain::Json).unwrap_err(), + FromV2Error::AmbiguousTerm { entry: 0 } + )); + let neither = json!({ "sv": [ { "s": SELECTOR, "hm": HEX }, { "s": SELECTOR } ] }); + match from_v2_query_typed(&neither, TargetDomain::Json).unwrap_err() { + FromV2Error::MissingTerm { domain, key, entry } => { + assert_eq!(domain, "query_jsonb"); + assert_eq!(key, "hm|op"); + assert_eq!(entry, Some(1)); + } + other => panic!("expected MissingTerm, got {other:?}"), + } +} + +#[test] +fn typed_rejects_the_same_envelopes_as_from_v2_query() { + // A versioned input must be v2, and a kind-discriminated one must be sv — + // shared conversion path, so both entry points agree. + let v3 = json!({ "v": 3, "sv": [ { "s": SELECTOR, "hm": HEX } ] }); + for err in [ + from_v2_query_typed(&v3, TargetDomain::Json).unwrap_err(), + from_v2_query(&v3, TargetDomain::Json).unwrap_err(), + ] { + assert!(matches!( + err, + FromV2Error::UnsupportedVersion { found: Some(3) } + )); + } + let ct = json!({ "k": "ct", "sv": [ { "s": SELECTOR, "hm": HEX } ] }); + for err in [ + from_v2_query_typed(&ct, TargetDomain::Json).unwrap_err(), + from_v2_query(&ct, TargetDomain::Json).unwrap_err(), + ] { + assert!(matches!(err, FromV2Error::KindMismatch { .. })); + } +} + +// --------------------------------------------------------------------------- +// QueryPayload::parse — construct-from-known-domain +// --------------------------------------------------------------------------- + +#[test] +fn parse_constructs_the_needle_from_its_domain_name() { + let needle = json!({ "sv": [ { "s": SELECTOR, "hm": HEX } ] }); + let parsed = QueryPayload::parse("query_jsonb", &needle) + .expect("query_jsonb must be a QueryPayload domain") + .expect("strict parse must succeed"); + assert_eq!(parsed.domain(), "query_jsonb"); + assert_eq!(serde_json::to_value(&parsed).unwrap(), needle); +} + +#[test] +fn parse_is_strict_exactly_like_the_binding_struct() { + // SteVecQuery is `deny_unknown_fields` at the root — a stray root key + // fails, exactly as the untyped path's validate_as does. + let stray = json!({ "sv": [ { "s": SELECTOR, "hm": HEX } ], "extra": 1 }); + assert!( + QueryPayload::parse("query_jsonb", &stray).unwrap().is_err(), + "deny_unknown_fields must reject a stray root key" + ); +} + +#[test] +fn parse_returns_none_for_non_query_domains() { + // Stored-payload domains (DomainPayload territory), the entry shape, and + // unknown names are not query payloads. + for name in [ + "eql_v3_json", + "eql_v3_jsonb_entry", + "eql_v3_integer_eq", + "eql_v3.query_jsonb", + "", + ] { + assert!( + QueryPayload::parse(name, &json!({})).is_none(), + "{name:?} must not resolve to a QueryPayload variant" + ); + } +} diff --git a/crates/eql-bindings/tests/ts_property_order.rs b/crates/eql-bindings/tests/ts_property_order.rs new file mode 100644 index 000000000..fa7382d1b --- /dev/null +++ b/crates/eql-bindings/tests/ts_property_order.rs @@ -0,0 +1,77 @@ +//! Permanent guard: the emitted TypeScript property order for every domain is +//! envelope (`v`, `i`, `c`) then one property per term in `Term::term_json_keys` +//! order. ts-rs carries struct-declaration order into the `.ts`, and that order +//! is the load-bearing wire contract consumers read. Nothing else pins it: +//! `v3_conformance` compares `serde_json::Value` (a `BTreeMap`, no +//! `preserve_order`) so it is order-INSENSITIVE; `catalog_parity` compares a +//! `BTreeSet`; and `types:check` is regenerate-then-diff, which keeps committed +//! `.ts` in step with the *current* generator but cannot catch a generator order +//! regression that is regenerated + committed self-consistently. + +use eql_domains::{Term, CATALOG}; + +/// Property identifiers, in declared order, from a ts-rs `export type X = { … }` +/// file. Layout-independent: ts-rs emits the body on a single line when fields +/// carry no doc comments (the doc-less generated structs) and across multiple +/// lines when they do, so we scope to the `export type` declaration's brace +/// body and split it on `,` rather than scanning per line. Each property is a +/// `name: Type` segment; the leading `ident:` token is the property name. +fn ts_property_order(ts: &str) -> Vec { + let decl = ts + .find("export type") + .expect("ts-rs file has an `export type` declaration"); + let after = &ts[decl..]; + let open = after.find('{').expect("export type has a brace body"); + let close = after.rfind('}').expect("export type closes its brace body"); + let body = &after[open + 1..close]; + body.split(',') + .filter_map(|seg| { + let (head, _) = seg.split_once(':')?; + let id = head.trim(); + if id.is_empty() || !id.chars().all(|c| c.is_ascii_alphanumeric() || c == '_') { + return None; + } + Some(id.to_string()) + }) + .collect() +} + +/// Base directory ts-rs exported the `.ts` files into. `mise run types:generate` +/// redirects generation to a throwaway tree via `TS_RS_EXPORT_DIR` (mirroring +/// ts-rs itself), so the guard must read the FRESHLY generated files there, not +/// the committed `bindings/`. Falls back to the committed `bindings/` dir (next +/// to the crate manifest) for a plain `cargo test`. +fn ts_export_base() -> String { + match std::env::var("TS_RS_EXPORT_DIR") { + Ok(dir) if !dir.is_empty() => dir, + _ => format!("{}/bindings", env!("CARGO_MANIFEST_DIR")), + } +} + +#[test] +fn every_ts_export_has_envelope_then_term_property_order() { + let base = ts_export_base(); + for family in CATALOG { + for domain in family.domains { + if !domain.is_scalar() { + continue; + } + let stem = domain.struct_ident(family.name); + let path = format!("{base}/v3/{stem}.ts"); + let ts = std::fs::read_to_string(&path).unwrap_or_else(|e| panic!("read {path}: {e}")); + + let mut expected = vec!["v".to_string(), "i".to_string(), "c".to_string()]; + expected.extend( + Term::term_json_keys(domain.terms) + .iter() + .map(|s| s.to_string()), + ); + + assert_eq!( + ts_property_order(&ts), + expected, + "TS property order mismatch for {stem} ({path})" + ); + } + } +} diff --git a/crates/eql-bindings/tests/v3_conformance.rs b/crates/eql-bindings/tests/v3_conformance.rs new file mode 100644 index 000000000..db0bc7a90 --- /dev/null +++ b/crates/eql-bindings/tests/v3_conformance.rs @@ -0,0 +1,602 @@ +//! Conformance for the v3 tier: explicit, readable tests for the reference +//! token (`integer`) plus the term shapes it doesn't carry. The exhaustive +//! catalog-driven sweep (every domain, every required key) lives in +//! `catalog_parity.rs`. + +use eql_bindings::v3::integer::{Integer, IntegerEq, IntegerOrd, IntegerOrdOpe, IntegerOrdOre}; +use eql_bindings::v3::text::TextMatch; +use eql_bindings::v3::DomainType; +use serde_json::json; + +#[test] +fn integer_storage_round_trips() { + let wire = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext" + }); + let parsed: Integer = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!(Integer::sql_domain_static(), "public.eql_v3_integer"); +} + +#[test] +fn integer_eq_round_trips() { + let wire = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "hm": "deadbeef" + }); + let parsed: IntegerEq = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!(IntegerEq::sql_domain_static(), "public.eql_v3_integer_eq"); +} + +#[test] +fn integer_ord_round_trips() { + let wire = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "ob": ["ore_block_0", "ore_block_1"] + }); + let parsed: IntegerOrd = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + // `_ord_ore` is the same shape under the scheme-explicit domain name. + let parsed: IntegerOrdOre = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!( + IntegerOrdOre::sql_domain_static(), + "public.eql_v3_integer_ord_ore" + ); +} + +#[test] +fn integer_ord_ope_round_trips() { + // `_ord_ope` carries the CLLW-OPE term: `op` is a single hex string (not + // an array like `ob`), natively bytea-sortable after hex-decode. + let wire = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "op": "00ffab" + }); + let parsed: IntegerOrdOpe = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!( + IntegerOrdOpe::sql_domain_static(), + "public.eql_v3_integer_ord_ope" + ); +} + +#[test] +fn integer_ord_ope_rejects_missing_ope_term() { + // Only the base fields, so the sole cause of failure is the absent `op`. + let no_op = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext" + }); + let result: Result = serde_json::from_value(no_op); + assert!( + result.is_err(), + "IntegerOrdOpe must reject a payload with no op" + ); +} + +#[test] +fn integer_eq_rejects_missing_hmac() { + // The capability is type-enforced: an `integer_eq` payload with no `hm` is + // not representable. This is the bug class — a search term missing its + // index term — closed at the type boundary, before any consumer runs. + let no_hm = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext" + }); + let result: Result = serde_json::from_value(no_hm); + assert!( + result.is_err(), + "IntegerEq must reject a payload with no hm" + ); +} + +#[test] +fn rejects_missing_envelope_keys() { + // v/i/c are the shared envelope contract every domain CHECK asserts. The + // missing-term negatives cover hm/ob/bf; these cover the envelope itself — + // dropping the version, identifier, or ciphertext fails at the type + // boundary, the Rust analogue of the CHECK's NOT NULL envelope columns. + let base = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "hm": "deadbeef" + }); + for key in ["v", "i", "c"] { + let mut wire = base.clone(); + wire.as_object_mut().unwrap().remove(key); + let result: Result = serde_json::from_value(wire); + assert!( + result.is_err(), + "IntegerEq must reject a payload with no {key}" + ); + } +} + +#[test] +fn rejects_wrong_envelope_version() { + // The SchemaVersion field is the Rust analogue of the domain CHECK's + // `VALUE->>'v' = '3'`: any other version — the legacy 2, and a string + // "3", which the CHECK's `->>` coercion would accept — fails at the type + // boundary instead of at INSERT. + for v in [json!(1), json!(2), json!("3")] { + let wire = json!({ + "v": v, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "hm": "deadbeef" + }); + let result: Result = serde_json::from_value(wire); + assert!(result.is_err(), "IntegerEq must reject v = {v}"); + } +} + +#[test] +fn rejects_unknown_keys() { + // deny_unknown_fields: a payload carrying keys outside the domain's set + // is not silently accepted-and-stripped — a pass-through consumer must + // not lose data it didn't know about. + let wire = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext", + "hm": "deadbeef", + "ob": ["ore_block_0"] + }); + let result: Result = serde_json::from_value(wire); + assert!( + result.is_err(), + "IntegerEq must reject a payload carrying keys beyond its domain (here: ob)" + ); +} + +#[test] +fn integer_ord_rejects_missing_ore_term() { + // Omit `hm`: it is not an IntegerOrd field, so leaving it in would trip + // deny_unknown_fields and the rejection could pass for the wrong reason. + // This payload carries only the base fields, so the sole cause of failure + // is the absent `ob`. + let no_ob = json!({ + "v": 3, + "i": { "t": "users", "c": "age" }, + "c": "mp_base85_ciphertext" + }); + let result: Result = serde_json::from_value(no_ob); + assert!( + result.is_err(), + "IntegerOrd must reject a payload with no ob" + ); +} + +#[test] +fn text_match_round_trips_signed_bloom_filter() { + // `bf` is signed i16 (smallint[]): filters sized above 32768 emit + // upper-half bit positions as negative values. + let wire = json!({ + "v": 3, + "i": { "t": "users", "c": "email" }, + "c": "mp_base85_ciphertext", + "bf": [-1, -32768, 32767, 0] + }); + let parsed: TextMatch = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + + let no_bf = json!({ + "v": 3, + "i": { "t": "users", "c": "email" }, + "c": "mp_base85_ciphertext" + }); + let result: Result = serde_json::from_value(no_bf); + assert!( + result.is_err(), + "TextMatch must reject a payload with no bf" + ); +} + +#[test] +fn non_integer_tokens_round_trip_every_domain() { + // integer is exercised exhaustively above; the other ordered tokens carry the + // *same* wire field names but were serialized by no test, so a copy-paste + // field typo (e.g. `hm` -> `hmm` in `bigint.rs`) would ship green — + // `catalog_parity.rs` checks domain *names* only, never the wire shape. + // This sweep roundtrips every non-integer domain and pins its catalog name, + // failing the instant a token drifts from the shared envelope/term contract. + use eql_bindings::v3::{ + bigint::*, boolean::*, date::*, double::*, numeric::*, real::*, smallint::*, text::*, + }; + + // Wire builders for the shapes the ordered tokens share. + let storage = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct" }); + let eq = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct", "hm": "deadbeef" }); + let ord = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct", "ob": ["b0", "b1"] }); + // `_ord_ope` carries the CLLW-OPE hex string `op` (not an array). + let ope = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct", "op": "00ffab" }); + // Text routes equality through `hm`, so its ordered domains carry both `hm` + // and the ordering term (`[Hm, Ore]` / `[Hm, Ope]`); `text_search` adds the + // Bloom-filter match term. + let text_ord = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct", "hm": "deadbeef", "ob": ["b0", "b1"] }); + let text_ope = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct", "hm": "deadbeef", "op": "00ffab" }); + let text_search = |t: &str| json!({ "v": 3, "i": { "t": t, "c": "x" }, "c": "ct", "hm": "deadbeef", "ob": ["b0", "b1"], "bf": [1, 2, 3] }); + + // Roundtrip a payload byte-for-byte, then confirm the catalog domain name. + macro_rules! round_trip { + ($ty:ty, $wire:expr, $domain:expr) => {{ + let wire = $wire; + let parsed: $ty = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!(<$ty>::sql_domain_static(), $domain); + }}; + } + + round_trip!(Smallint, storage("a"), "public.eql_v3_smallint"); + round_trip!(SmallintEq, eq("a"), "public.eql_v3_smallint_eq"); + round_trip!(SmallintOrd, ord("a"), "public.eql_v3_smallint_ord"); + round_trip!(SmallintOrdOre, ord("a"), "public.eql_v3_smallint_ord_ore"); + round_trip!(SmallintOrdOpe, ope("a"), "public.eql_v3_smallint_ord_ope"); + + round_trip!(Bigint, storage("a"), "public.eql_v3_bigint"); + round_trip!(BigintEq, eq("a"), "public.eql_v3_bigint_eq"); + round_trip!(BigintOrd, ord("a"), "public.eql_v3_bigint_ord"); + round_trip!(BigintOrdOre, ord("a"), "public.eql_v3_bigint_ord_ore"); + round_trip!(BigintOrdOpe, ope("a"), "public.eql_v3_bigint_ord_ope"); + + round_trip!(Date, storage("a"), "public.eql_v3_date"); + round_trip!(DateEq, eq("a"), "public.eql_v3_date_eq"); + round_trip!(DateOrd, ord("a"), "public.eql_v3_date_ord"); + round_trip!(DateOrdOre, ord("a"), "public.eql_v3_date_ord_ore"); + round_trip!(DateOrdOpe, ope("a"), "public.eql_v3_date_ord_ope"); + + // numeric is the first scalar whose native ORE term exceeds 8 blocks (14); + // the wire shape is identical, so the same `ord` builder applies. + round_trip!(Numeric, storage("a"), "public.eql_v3_numeric"); + round_trip!(NumericEq, eq("a"), "public.eql_v3_numeric_eq"); + round_trip!(NumericOrd, ord("a"), "public.eql_v3_numeric_ord"); + round_trip!(NumericOrdOre, ord("a"), "public.eql_v3_numeric_ord_ore"); + round_trip!(NumericOrdOpe, ope("a"), "public.eql_v3_numeric_ord_ope"); + + // real/double are the float scalars (renamed from float4/float8); they carry + // the same ordered-token wire shape as the int scalars (`hm` eq, `ob` ord). + round_trip!(Real, storage("a"), "public.eql_v3_real"); + round_trip!(RealEq, eq("a"), "public.eql_v3_real_eq"); + round_trip!(RealOrd, ord("a"), "public.eql_v3_real_ord"); + round_trip!(RealOrdOre, ord("a"), "public.eql_v3_real_ord_ore"); + + round_trip!(Double, storage("a"), "public.eql_v3_double"); + round_trip!(DoubleEq, eq("a"), "public.eql_v3_double_eq"); + round_trip!(DoubleOrd, ord("a"), "public.eql_v3_double_ord"); + round_trip!(DoubleOrdOre, ord("a"), "public.eql_v3_double_ord_ore"); + + // boolean is storage-only (no eq/ord term) — just the shared envelope. + round_trip!(Boolean, storage("a"), "public.eql_v3_boolean"); + + // text_match is covered by `text_match_round_trips_signed_bloom_filter`. + round_trip!(Text, storage("a"), "public.eql_v3_text"); + round_trip!(TextEq, eq("a"), "public.eql_v3_text_eq"); + round_trip!(TextOrd, text_ord("a"), "public.eql_v3_text_ord"); + round_trip!(TextOrdOre, text_ord("a"), "public.eql_v3_text_ord_ore"); + round_trip!(TextOrdOpe, text_ope("a"), "public.eql_v3_text_ord_ope"); + round_trip!(TextSearch, text_search("a"), "public.eql_v3_text_search"); +} + +#[test] +fn timestamp_round_trips_and_enforces_term_capabilities() { + // timestamp is an ordered token (12-block ORE) — it carries the full + // storage/`_eq`/`_ord`/`_ord_ore` shape, the same as the int scalars. The + // integer template was copy-pasted to produce it, so a dropped `hm`/`ob` or a + // field typo would pass `catalog_parity` (domain names only) but is caught + // here. (Was equality-only while the ORE comparator was hardcoded to 8 + // blocks; promoted once `eql_v3.ore_block_256` generalized to any width.) + use eql_bindings::v3::timestamp::{ + Timestamp, TimestampEq, TimestampOrd, TimestampOrdOpe, TimestampOrdOre, + }; + + // Storage-only: envelope, no term. + let storage = json!({ + "v": 3, + "i": { "t": "events", "c": "occurred_at" }, + "c": "mp_base85_ciphertext" + }); + let parsed: Timestamp = serde_json::from_value(storage.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), storage); + assert_eq!(Timestamp::sql_domain_static(), "public.eql_v3_timestamp"); + + // Equality: envelope + hm. + let with_hm = json!({ + "v": 3, + "i": { "t": "events", "c": "occurred_at" }, + "c": "mp_base85_ciphertext", + "hm": "deadbeef" + }); + let parsed: TimestampEq = serde_json::from_value(with_hm.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), with_hm); + assert_eq!( + TimestampEq::sql_domain_static(), + "public.eql_v3_timestamp_eq" + ); + + // Ordered: envelope + ob (a 12-block array on the wire; shape is the same). + let with_ob = json!({ + "v": 3, + "i": { "t": "events", "c": "occurred_at" }, + "c": "mp_base85_ciphertext", + "ob": ["b0", "b1"] + }); + let parsed: TimestampOrd = serde_json::from_value(with_ob.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), with_ob); + assert_eq!( + TimestampOrd::sql_domain_static(), + "public.eql_v3_timestamp_ord" + ); + let parsed: TimestampOrdOre = serde_json::from_value(with_ob.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), with_ob); + assert_eq!( + TimestampOrdOre::sql_domain_static(), + "public.eql_v3_timestamp_ord_ore" + ); + + // OPE ordered: envelope + op (a single CLLW-OPE hex string). + let with_op = json!({ + "v": 3, + "i": { "t": "events", "c": "occurred_at" }, + "c": "mp_base85_ciphertext", + "op": "00ffab" + }); + let parsed: TimestampOrdOpe = serde_json::from_value(with_op.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), with_op); + assert_eq!( + TimestampOrdOpe::sql_domain_static(), + "public.eql_v3_timestamp_ord_ope" + ); + + // The searchable domains cannot let their term silently become optional. + let no_hm = json!({ + "v": 3, + "i": { "t": "events", "c": "occurred_at" }, + "c": "mp_base85_ciphertext" + }); + let result: Result = serde_json::from_value(no_hm.clone()); + assert!( + result.is_err(), + "TimestampEq must reject a payload with no hm" + ); + let result: Result = serde_json::from_value(no_hm); + assert!( + result.is_err(), + "TimestampOrd must reject a payload with no ob" + ); +} + +#[test] +fn stevec_document_round_trips_and_enforces_envelope() { + use eql_bindings::v3::jsonb::SteVecDocument; + use eql_bindings::v3::DomainType; + // The real cipherstash SteVec document envelope carries the `k` form + // discriminator (`"sv"`), required by the canonical eql-payload-v2.3 + // `SteVecPayload` (`required: [v,k,i,sv]`) and emitted on every real payload. + // The document struct is strict, so it must MODEL `k` — omitting it would + // reject the real wire (the bug this test's real-crypto sibling caught). + let wire = json!({ + "v": 3, + "k": "sv", + "i": { "t": "users", "c": "profile" }, + "sv": [ + { "s": "sel_root", "c": "ct_root", "hm": "deadbeef" }, + { "s": "sel_age", "c": "ct_age", "a": true, "op": "cllw_ope" } + ] + }); + let parsed: SteVecDocument = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!(SteVecDocument::sql_domain_static(), "public.eql_v3_json"); + + // Envelope negatives (parity with the scalar integer tests) — now including `k`. + for missing in ["v", "k", "i", "sv"] { + let mut w = wire.clone(); + w.as_object_mut().unwrap().remove(missing); + assert!( + serde_json::from_value::(w).is_err(), + "missing {missing} must fail" + ); + } + // Wrong version (the legacy 2 is rejected now the tier carries v: 3). + let mut wrong_v = wire.clone(); + wrong_v["v"] = json!(2); + assert!(serde_json::from_value::(wrong_v).is_err()); + // Wrong form discriminator: `k` is pinned to "sv" (like `v` is pinned to 3), + // so a scalar-ciphertext (`k:"ct"`) payload can't be read back as a document. + let mut wrong_k = wire.clone(); + wrong_k["k"] = json!("ct"); + assert!( + serde_json::from_value::(wrong_k).is_err(), + "k other than \"sv\" must fail" + ); + // Unknown top-level key (deny_unknown_fields; no flatten on the document). + let mut extra = wire.clone(); + extra + .as_object_mut() + .unwrap() + .insert("bogus".into(), json!(1)); + assert!(serde_json::from_value::(extra).is_err()); +} + +#[test] +fn stevec_entry_untagged_term_and_neither_term_rejected() { + use eql_bindings::v3::jsonb::{SteVecEntry, SteVecTerm}; + // hm arm. + let hm: SteVecEntry = + serde_json::from_value(json!({ "s": "sel", "c": "ct", "hm": "deadbeef" })).unwrap(); + assert!(matches!(hm.term, SteVecTerm::Hmac { .. })); + // op arm. + let op: SteVecEntry = + serde_json::from_value(json!({ "s": "sel", "c": "ct", "op": "cllw" })).unwrap(); + assert!(matches!(op.term, SteVecTerm::OpeCllw { .. })); + // Lax: tolerates root i/v merged in by `->`. + let merged: SteVecEntry = serde_json::from_value( + json!({ "s": "sel", "c": "ct", "hm": "x", "i": {"t":"a","c":"b"}, "v": 3 }), + ) + .unwrap(); + assert!(matches!(merged.term, SteVecTerm::Hmac { .. })); + // MARQUEE NEGATIVE: neither hm nor op must fail (untagged enum has no matching arm). + assert!( + serde_json::from_value::(json!({ "s": "sel", "c": "ct" })).is_err(), + "an entry with neither hm nor op must be rejected" + ); +} + +#[test] +fn stevec_entry_both_terms_present_resolves_to_first_untagged_arm() { + // The inverse of the "neither" negative above. On the wire an entry carries + // exactly one of `hm` XOR `oc` (enforced by the SQL CHECK, NOT client-side — + // `#[serde(untagged)]` cannot express XOR). If a malformed payload somehow + // carries BOTH, serde's untagged enum resolves to the FIRST matching arm in + // declaration order — `SteVecTerm::Hmac` (the `hm` arm is declared first) — + // rather than erroring. This pins that resolution so a reorder of the + // `SteVecTerm` variants (which would silently flip the winner to `oc`) is a + // test failure, and documents that client-side parsing does not enforce XOR. + use eql_bindings::v3::jsonb::{SteVecEntry, SteVecTerm}; + let both: SteVecEntry = + serde_json::from_value(json!({ "s": "sel", "c": "ct", "hm": "deadbeef", "oc": "cllw" })) + .expect( + "an entry with both hm and oc parses (XOR is a SQL-CHECK invariant, not serde)", + ); + assert!( + matches!(both.term, SteVecTerm::Hmac { .. }), + "with both hm and oc present, the untagged enum must resolve to the first \ + arm (Hmac); a flip means the SteVecTerm variant order changed" + ); +} + +#[test] +fn stevec_query_round_trips() { + use eql_bindings::v3::jsonb::SteVecQuery; + use eql_bindings::v3::DomainType; + let wire = json!({ "sv": [ { "s": "sel", "hm": "deadbeef" } ] }); + let parsed: SteVecQuery = serde_json::from_value(wire.clone()).unwrap(); + assert_eq!(serde_json::to_value(&parsed).unwrap(), wire); + assert_eq!(SteVecQuery::sql_domain_static(), "eql_v3.query_jsonb"); + // Unknown top-level key rejected (SteVecQuery has no flatten field). + assert!(serde_json::from_value::(json!({ "sv": [], "bogus": 1 })).is_err()); + // NOTE: a query ELEMENT carrying `c` is NOT rejected here — SteVecQueryEntry + // has a flattened term, so deny_unknown_fields is inert. The "no ciphertext" + // rule is enforced by the SQL CHECK (is_valid_ste_vec_query_payload) and + // exercised in the real-crypto test (v3_ste_vec). +} + +#[test] +fn stevec_document_and_query_schemas_are_strict() { + use eql_bindings::v3::jsonb::{SteVecDocument, SteVecForm, SteVecQuery}; + use eql_bindings::v3::DomainType; + use eql_bindings::{Identifier, SchemaVersion}; + let doc = SteVecDocument { + v: SchemaVersion::CURRENT, + k: SteVecForm::SV, + i: Identifier { + t: "x".into(), + c: "y".into(), + }, + sv: vec![], + }; + let sdoc = serde_json::to_value(doc.schema()).unwrap(); + assert_eq!(sdoc.pointer("/additionalProperties"), Some(&json!(false))); + assert_eq!( + sdoc.pointer("/properties/v/$ref"), + Some(&json!("#/$defs/SchemaVersion")) + ); + assert_eq!( + sdoc.pointer("/$defs/SchemaVersion/const"), + Some(&json!(eql_bindings::EQL_SCHEMA_VERSION)) + ); + // `k` is pinned to the const "sv" via SteVecForm, exactly like `v`/SchemaVersion. + assert_eq!( + sdoc.pointer("/properties/k/$ref"), + Some(&json!("#/$defs/SteVecForm")) + ); + assert_eq!(sdoc.pointer("/$defs/SteVecForm/const"), Some(&json!("sv"))); + let q = SteVecQuery { sv: vec![] }; + let sq = serde_json::to_value(q.schema()).unwrap(); + assert_eq!(sq.pointer("/additionalProperties"), Some(&json!(false))); + // SteVecDocument/Query domain names. + assert_eq!(SteVecDocument::sql_domain_static(), "public.eql_v3_json"); + assert_eq!(SteVecQuery::sql_domain_static(), "eql_v3.query_jsonb"); +} + +#[test] +fn stevec_ts_exports_have_expected_shape() { + // The ts-rs flatten/untagged risk: pin the emitted .ts STRUCTURALLY so a + // regression is a test failure, not a human-inspection miss. Assertions match + // against the `export type = ...;` BODY LINE — never loose single-char + // `contains` over the whole file, which the generated header / imports / doc + // comment satisfy trivially (a dropped field would still pass). During + // `types:check`, read the freshly exported TS_RS_EXPORT_DIR output; plain + // `cargo test` falls back to committed bindings next to the crate manifest. + let base = match std::env::var("TS_RS_EXPORT_DIR") { + Ok(dir) if !dir.is_empty() => format!("{dir}/v3"), + _ => format!("{}/bindings/v3", env!("CARGO_MANIFEST_DIR")), + }; + + // The single `export type = ...;` body line, isolated from the header, + // imports, and doc comment so substring checks pin the emitted TYPE, not prose. + let export_line = |file: &str, name: &str| -> String { + let text = std::fs::read_to_string(format!("{base}/{file}")).unwrap(); + text.lines() + .find(|l| l.trim_start().starts_with(&format!("export type {name} "))) + .unwrap_or_else(|| panic!("{file}: no `export type {name}` line")) + .to_string() + }; + + // SteVecTerm: the untagged `{ hm } | { op }` union — both arms present, joined. + let term = export_line("SteVecTerm.ts", "SteVecTerm"); + assert!( + term.contains("{ hm: Hmac256, }") + && term.contains("{ op: OpeCllw, }") + && term.contains('|'), + "SteVecTerm.ts must be the `{{ hm }} | {{ op }}` union, got: {term}" + ); + + // SteVecEntry: direct fields s/c, the flattened hm|op term union, and the + // OPTIONAL nullable array marker `a`. `a?: boolean | null` (not `a: boolean | + // null`) pins ts-rs optionality so the TS binding agrees with the JSON Schema, + // which excludes `a` from `required` — the drift a bare `Option` without + // `#[ts(optional = nullable)]` silently reintroduces. + let entry = export_line("SteVecEntry.ts", "SteVecEntry"); + for needle in [ + "s: Selector", + "c: Ciphertext", + "a?: boolean | null", + "{ hm: Hmac256, }", + "{ op: OpeCllw, }", + ] { + assert!( + entry.contains(needle), + "SteVecEntry.ts body must contain `{needle}`, got: {entry}" + ); + } + + // Property ORDER pin. The generic `ts_property_order.rs` guard structurally + // skips non-scalar (jsonb) domains, so the SteVec property order has no other + // regression guard. Assert the exact ordered field prefix so a field reorder + // in `jsonb.rs` (which changes the wire/consumer contract) fails here rather + // than escaping to a manual diff. + assert!( + entry.contains("{ s: Selector, c: Ciphertext, a?: boolean | null, }"), + "SteVecEntry.ts field order must be s, c, a (then the flattened term union), got: {entry}" + ); + let document = export_line("SteVecDocument.ts", "SteVecDocument"); + assert!( + document.contains( + "{ v: SchemaVersion, k: SteVecForm, i: Identifier, sv: Array, }" + ), + "SteVecDocument.ts field order must be v, k, i, sv, got: {document}" + ); +} diff --git a/crates/eql-codegen/Cargo.toml b/crates/eql-codegen/Cargo.toml new file mode 100644 index 000000000..b245640ca --- /dev/null +++ b/crates/eql-codegen/Cargo.toml @@ -0,0 +1,27 @@ +[package] +name = "eql-codegen" +version = "0.1.0" +edition = "2021" +publish = false + +[dependencies] +eql-domains = { path = "../eql-domains" } +minijinja = "2" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +thiserror = "2" +quote = "1" +proc-macro2 = "1" +syn = { version = "2", features = ["full"] } +prettyplease = "=0.2.37" + +[[bin]] +name = "eql-codegen" +path = "src/main.rs" + +[lib] +name = "eql_codegen" +path = "src/lib.rs" + +[lints] +workspace = true diff --git a/crates/eql-codegen/src/bindings.rs b/crates/eql-codegen/src/bindings.rs new file mode 100644 index 000000000..eee51f44b --- /dev/null +++ b/crates/eql-codegen/src/bindings.rs @@ -0,0 +1,1223 @@ +//! The Rust payload-bindings emitter: renders `eql_domains::CATALOG` to the +//! committed `crates/eql-bindings/src/v3/.rs` structs + `DomainType` +//! impls and the generated `inventory.rs` (`all()`), the same generate-to- +//! committed-source mechanism `generate.rs` uses for SQL. Token stream via +//! `quote!`, formatted by `prettyplease::unparse` then the repo's stable +//! `rustfmt` (prettyplease is rustfmt-clean but not rustfmt-identical), with +//! the `// @generated` ownership marker prepended as line 1. + +use std::path::{Path, PathBuf}; + +use proc_macro2::TokenStream; +use quote::{format_ident, quote}; + +use eql_domains::{Domain, DomainFamily, Term, CATALOG, ENVELOPE_KEYS}; + +use crate::consts::RUST_GENERATED_MARKER; +use crate::writer::{ + ensure_generated_paths_writable, normalized_set, remove_generated_orphans, + write_generated_file, GeneratedKind, WriteError, +}; + +/// Format a token stream into committed Rust source. `prettyplease::unparse` +/// gives deterministic, parseable output; the `@generated` marker is prepended +/// as line 1 (syn/prettyplease drop free-standing line comments, so it cannot +/// live inside the token stream); then the whole file is run through `rustfmt` +/// so it is byte-for-byte what `cargo fmt --check` (`mise run test:crates`) +/// expects. +pub fn format_rs(tokens: TokenStream) -> String { + let file: syn::File = syn::parse2(tokens).expect("emit syntactically valid Rust"); + let body = prettyplease::unparse(&file); + let with_marker = format!("{RUST_GENERATED_MARKER}\n{body}"); + rustfmt(&with_marker) +} + +/// Pipe Rust source through the repo's `rustfmt` (stdin → stdout). Fails loudly: +/// codegen is a dev-time tool and `rustfmt` is always present where `cargo fmt` +/// runs. `rustfmt` preserves the leading `// @generated` line comment, so the +/// marker stays exactly line 1. +fn rustfmt(src: &str) -> String { + use std::io::Write; + use std::process::{Command, Stdio}; + + let mut child = Command::new("rustfmt") + .args(["--edition", "2021"]) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .expect("spawn rustfmt (is the Rust toolchain on PATH?)"); + child + .stdin + .take() + .expect("rustfmt stdin") + .write_all(src.as_bytes()) + .expect("write to rustfmt"); + let out = child.wait_with_output().expect("wait for rustfmt"); + assert!( + out.status.success(), + "rustfmt failed: {}", + String::from_utf8_lossy(&out.stderr) + ); + String::from_utf8(out.stdout).expect("rustfmt output is UTF-8") +} + +/// Capability label for a domain's single catalog-derived doc line, keyed on +/// the bare domain name. The match is keyed on the `&str` bare name (finer than +/// the typed [`eql_domains::Role`], which collapses `match`/`search` into +/// `Ord`), so it cannot be made exhaustive at the type level. Instead the +/// catch-all `panic!`s: an unmapped bare-domain name aborts codegen loudly, +/// forcing a deliberate label choice rather than silently emitting generic-but- +/// wrong doc text — preserving the "compile-checked catalog" guarantee. +fn capability_label(domain_name: &str) -> &'static str { + match domain_name { + "" => "storage-only domain", + "eq" => "equality domain", + "ord" | "ord_ore" | "ord_ope" => "ordering domain", + "match" => "match domain", + "search" => "search domain", + other => panic!( + "unmapped bare domain name {other:?} — add it to capability_label \ + in crates/eql-codegen/src/bindings.rs" + ), + } +} + +/// Render the catalog-derived struct doc lines for a domain: a summary line +/// (`` `public.eql_v3_` —