Skip to content

Commit 6795a8c

Browse files
committed
docs(sql): standardize JSONB parameter descriptions
Update all JSONB parameter descriptions to use consistent format: - Change from 'JSONB Raw encrypted value' or 'JSONB Encrypted data payload' - Change to 'jsonb containing encrypted EQL payload' Changes: - Use lowercase 'jsonb' (correct PostgreSQL type convention) - Use consistent phrase 'containing encrypted EQL payload' - Updated 19 parameters across 8 files (Phase 2 + Phase 3) Files modified: - src/encrypted/functions.sql - src/blake3/functions.sql - src/hmac_256/functions.sql - src/bloom_filter/functions.sql - src/ore_block_u64_8_256/functions.sql - src/ore_cllw_u64_8/functions.sql - src/ore_cllw_var_8/functions.sql - src/ste_vec/functions.sql
1 parent 41a3cc9 commit 6795a8c

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/blake3/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
--! Extracts the Blake3 hash value from the 'b3' field of an encrypted
66
--! data payload. Used internally for exact-match comparisons.
77
--!
8-
--! @param val JSONB Encrypted data payload containing index terms
8+
--! @param val jsonb containing encrypted EQL payload
99
--! @return eql_v2.blake3 Blake3 hash value, or NULL if not present
1010
--! @throws Exception if 'b3' field is missing when blake3 index is expected
1111
--!
@@ -57,7 +57,7 @@ $$ LANGUAGE plpgsql;
5757
--! Tests whether the encrypted data payload includes a 'b3' field,
5858
--! indicating a Blake3 hash is available for exact-match queries.
5959
--!
60-
--! @param val JSONB Encrypted data payload
60+
--! @param val jsonb containing encrypted EQL payload
6161
--! @return Boolean True if 'b3' field is present and non-null
6262
--!
6363
--! @see eql_v2.blake3

src/bloom_filter/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--! Extracts the Bloom filter array from the 'bf' field of an encrypted
77
--! data payload. Used internally for pattern-match queries (LIKE operator).
88
--!
9-
--! @param val JSONB Encrypted data payload containing index terms
9+
--! @param val jsonb containing encrypted EQL payload
1010
--! @return eql_v2.bloom_filter Bloom filter as smallint array
1111
--! @throws Exception if 'bf' field is missing when bloom_filter index is expected
1212
--!
@@ -54,7 +54,7 @@ $$ LANGUAGE plpgsql;
5454
--! Tests whether the encrypted data payload includes a 'bf' field,
5555
--! indicating a Bloom filter is available for pattern-match queries.
5656
--!
57-
--! @param val JSONB Encrypted data payload
57+
--! @param val jsonb containing encrypted EQL payload
5858
--! @return Boolean True if 'bf' field is present and non-null
5959
--!
6060
--! @see eql_v2.bloom_filter

src/encrypted/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
--! Extracts the ciphertext (c field) from a raw JSONB encrypted value.
99
--! The ciphertext is the base64-encoded encrypted data.
1010
--!
11-
--! @param val JSONB Raw encrypted value containing 'c' field
11+
--! @param val jsonb containing encrypted EQL payload
1212
--! @return Text Base64-encoded ciphertext string
1313
--! @throws Exception if 'c' field is not present in JSONB
1414
--!
@@ -155,7 +155,7 @@ $$ LANGUAGE plpgsql;
155155
--! Extracts index terms (i) and version (v) from a raw JSONB encrypted value.
156156
--! Returns metadata object containing searchable index terms without ciphertext.
157157
--!
158-
--! @param val JSONB Raw encrypted value
158+
--! @param val jsonb containing encrypted EQL payload
159159
--! @return JSONB Metadata object with 'i' (index terms) and 'v' (version) fields
160160
--!
161161
--! @example

src/hmac_256/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
--! Extracts the HMAC-SHA256 hash value from the 'hm' field of an encrypted
77
--! data payload. Used internally for exact-match comparisons.
88
--!
9-
--! @param val JSONB Encrypted data payload containing index terms
9+
--! @param val jsonb containing encrypted EQL payload
1010
--! @return eql_v2.hmac_256 HMAC-SHA256 hash value
1111
--! @throws Exception if 'hm' field is missing when hmac_256 index is expected
1212
--!
@@ -34,7 +34,7 @@ $$ LANGUAGE plpgsql;
3434
--! Tests whether the encrypted data payload includes an 'hm' field,
3535
--! indicating an HMAC-SHA256 hash is available for exact-match queries.
3636
--!
37-
--! @param val JSONB Encrypted data payload
37+
--! @param val jsonb containing encrypted EQL payload
3838
--! @return Boolean True if 'hm' field is present and non-null
3939
--!
4040
--! @see eql_v2.hmac_256

src/ore_block_u64_8_256/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $$ LANGUAGE plpgsql;
3838
--! Extracts the ORE block array from the 'ob' field of an encrypted
3939
--! data payload. Used internally for range query comparisons.
4040
--!
41-
--! @param val JSONB Encrypted data payload containing index terms
41+
--! @param val jsonb containing encrypted EQL payload
4242
--! @return eql_v2.ore_block_u64_8_256 ORE block index term
4343
--! @throws Exception if 'ob' field is missing when ore index is expected
4444
--!
@@ -85,7 +85,7 @@ $$ LANGUAGE plpgsql;
8585
--! Tests whether the encrypted data payload includes an 'ob' field,
8686
--! indicating an ORE block is available for range queries.
8787
--!
88-
--! @param val JSONB Encrypted data payload
88+
--! @param val jsonb containing encrypted EQL payload
8989
--! @return Boolean True if 'ob' field is present and non-null
9090
--!
9191
--! @see eql_v2.ore_block_u64_8_256

src/ore_cllw_u64_8/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
--! Extracts the CLLW ORE ciphertext from the 'ocf' field of an encrypted
99
--! data payload. Used internally for range query comparisons.
1010
--!
11-
--! @param val JSONB Encrypted data payload containing index terms
11+
--! @param val jsonb containing encrypted EQL payload
1212
--! @return eql_v2.ore_cllw_u64_8 CLLW ORE ciphertext
1313
--! @throws Exception if 'ocf' field is missing when ore index is expected
1414
--!
@@ -56,7 +56,7 @@ $$ LANGUAGE plpgsql;
5656
--! Tests whether the encrypted data payload includes an 'ocf' field,
5757
--! indicating a CLLW ORE ciphertext is available for range queries.
5858
--!
59-
--! @param val JSONB Encrypted data payload
59+
--! @param val jsonb containing encrypted EQL payload
6060
--! @return Boolean True if 'ocf' field is present and non-null
6161
--!
6262
--! @see eql_v2.ore_cllw_u64_8

src/ore_cllw_var_8/functions.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
--! Extracts the variable-width CLLW ORE ciphertext from the 'ocv' field of an encrypted
1010
--! data payload. Used internally for range query comparisons.
1111
--!
12-
--! @param val JSONB Encrypted data payload containing index terms
12+
--! @param val jsonb containing encrypted EQL payload
1313
--! @return eql_v2.ore_cllw_var_8 Variable-width CLLW ORE ciphertext
1414
--! @throws Exception if 'ocv' field is missing when ore index is expected
1515
--!
@@ -58,7 +58,7 @@ $$ LANGUAGE plpgsql;
5858
--! Tests whether the encrypted data payload includes an 'ocv' field,
5959
--! indicating a variable-width CLLW ORE ciphertext is available for range queries.
6060
--!
61-
--! @param val JSONB Encrypted data payload
61+
--! @param val jsonb containing encrypted EQL payload
6262
--! @return Boolean True if 'ocv' field is present and non-null
6363
--!
6464
--! @see eql_v2.ore_cllw_var_8

src/ste_vec/functions.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
--! containment queries (@>, <@). If no 'sv' field exists, wraps the entire payload
1212
--! as a single-element array.
1313
--!
14-
--! @param val JSONB Encrypted data payload containing index terms
14+
--! @param val jsonb containing encrypted EQL payload
1515
--! @return eql_v2_encrypted[] Array of encrypted STE vector elements
1616
--!
1717
--! @see eql_v2.ste_vec(eql_v2_encrypted)
@@ -63,7 +63,7 @@ $$ LANGUAGE plpgsql;
6363
--! Tests whether the encrypted data payload contains an 'sv' field with exactly
6464
--! one element. Single-element STE vectors can be treated as regular encrypted values.
6565
--!
66-
--! @param val JSONB Encrypted data payload
66+
--! @param val jsonb containing encrypted EQL payload
6767
--! @return Boolean True if 'sv' field exists with exactly one element
6868
--!
6969
--! @see eql_v2.to_ste_vec_value
@@ -104,7 +104,7 @@ $$ LANGUAGE plpgsql;
104104
--! as a regular encrypted value, preserving metadata. If the input is not a
105105
--! single-element STE vector, returns it unchanged.
106106
--!
107-
--! @param val JSONB Encrypted data payload
107+
--! @param val jsonb containing encrypted EQL payload
108108
--! @return eql_v2_encrypted Regular encrypted value (unwrapped if single-element STE vector)
109109
--!
110110
--! @see eql_v2.is_ste_vec_value
@@ -156,7 +156,7 @@ $$ LANGUAGE plpgsql;
156156
--! Extracts the selector ('s') field from an encrypted data payload.
157157
--! Selectors are used to match STE vector elements during containment queries.
158158
--!
159-
--! @param val JSONB Encrypted data payload
159+
--! @param val jsonb containing encrypted EQL payload
160160
--! @return Text The selector value
161161
--! @throws Exception if 's' field is missing
162162
--!
@@ -203,7 +203,7 @@ $$ LANGUAGE plpgsql;
203203
--! Tests whether the encrypted data payload has the 'a' (array) flag set to true,
204204
--! indicating it represents an array for STE vector operations.
205205
--!
206-
--! @param val JSONB Encrypted data payload
206+
--! @param val jsonb containing encrypted EQL payload
207207
--! @return Boolean True if 'a' field is present and true
208208
--!
209209
--! @see eql_v2.ste_vec

0 commit comments

Comments
 (0)