Skip to content

Commit 896c2bb

Browse files
committed
fix(docs): correct Doxygen parameter documentation format
When Doxygen parses SQL files as C++, it misinterprets function signatures. For CREATE FUNCTION foo(val type), Doxygen sees 'type' as the parameter name, not 'val'. Changed @param documentation from: @param val eql_v2_encrypted Description To: @param eql_v2_encrypted Description This fix applies only to functions with unique parameter types. Functions with duplicate parameter types (e.g., compare functions with two eql_v2_encrypted params) still generate warnings and need a different approach. Results: - Fixed 88 @param lines across 20 SQL files - Reduced parameter warnings from ~64 to 44 (-31%)
1 parent fab1b00 commit 896c2bb

File tree

20 files changed

+88
-88
lines changed

20 files changed

+88
-88
lines changed

src/blake3/functions.sql

Lines changed: 4 additions & 4 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 containing encrypted EQL payload
8+
--! @param 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
--!
@@ -38,7 +38,7 @@ $$ LANGUAGE plpgsql;
3838
--! Extracts the Blake3 hash from an encrypted column value by accessing
3939
--! its underlying JSONB data field.
4040
--!
41-
--! @param val eql_v2_encrypted Encrypted column value
41+
--! @param eql_v2_encrypted Encrypted column value
4242
--! @return eql_v2.blake3 Blake3 hash value, or NULL if not present
4343
--!
4444
--! @see eql_v2.blake3(jsonb)
@@ -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 containing encrypted EQL payload
60+
--! @param jsonb containing encrypted EQL payload
6161
--! @return Boolean True if 'b3' field is present and non-null
6262
--!
6363
--! @see eql_v2.blake3
@@ -76,7 +76,7 @@ $$ LANGUAGE plpgsql;
7676
--! Tests whether an encrypted column value includes a Blake3 hash
7777
--! by checking its underlying JSONB data field.
7878
--!
79-
--! @param val eql_v2_encrypted Encrypted column value
79+
--! @param eql_v2_encrypted Encrypted column value
8080
--! @return Boolean True if Blake3 hash is present
8181
--!
8282
--! @see eql_v2.has_blake3(jsonb)

src/bloom_filter/functions.sql

Lines changed: 4 additions & 4 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 containing encrypted EQL payload
9+
--! @param 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
--!
@@ -35,7 +35,7 @@ $$ LANGUAGE plpgsql;
3535
--! Extracts the Bloom filter from an encrypted column value by accessing
3636
--! its underlying JSONB data field.
3737
--!
38-
--! @param val eql_v2_encrypted Encrypted column value
38+
--! @param eql_v2_encrypted Encrypted column value
3939
--! @return eql_v2.bloom_filter Bloom filter as smallint array
4040
--!
4141
--! @see eql_v2.bloom_filter(jsonb)
@@ -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 containing encrypted EQL payload
57+
--! @param jsonb containing encrypted EQL payload
5858
--! @return Boolean True if 'bf' field is present and non-null
5959
--!
6060
--! @see eql_v2.bloom_filter
@@ -73,7 +73,7 @@ $$ LANGUAGE plpgsql;
7373
--! Tests whether an encrypted column value includes a Bloom filter
7474
--! by checking its underlying JSONB data field.
7575
--!
76-
--! @param val eql_v2_encrypted Encrypted column value
76+
--! @param eql_v2_encrypted Encrypted column value
7777
--! @return Boolean True if Bloom filter is present
7878
--!
7979
--! @see eql_v2.has_bloom_filter(jsonb)

src/common.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ $$ LANGUAGE plpgsql;
5353
--! Converts a JSONB array of hex-encoded strings into a PostgreSQL bytea array.
5454
--! Used for deserializing binary data (like ORE terms) from JSONB storage.
5555
--!
56-
--! @param val jsonb JSONB array of hex-encoded strings
56+
--! @param jsonb JSONB array of hex-encoded strings
5757
--! @return bytea[] Array of decoded binary values
5858
--!
5959
--! @note Returns NULL if input is JSON null
@@ -81,7 +81,7 @@ $$ LANGUAGE plpgsql;
8181
--! Convenience function to emit log messages during testing and debugging.
8282
--! Uses RAISE NOTICE to output messages to PostgreSQL logs.
8383
--!
84-
--! @param s text Message to log
84+
--! @param text Message to log
8585
--!
8686
--! @note Primarily used in tests and development
8787
--! @see eql_v2.log(text, text) for contextual logging

src/config/constraints.sql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
--! Helper function that extracts all index type names from the configuration's
1717
--! 'indexes' sections across all tables and columns.
1818
--!
19-
--! @param val jsonb Configuration data to extract from
19+
--! @param jsonb Configuration data to extract from
2020
--! @return SETOF text Index type names (e.g., 'match', 'ore', 'unique', 'ste_vec')
2121
--!
2222
--! @note Used by config_check_indexes for validation
@@ -35,7 +35,7 @@ END;
3535
--! Checks that all index types specified in the configuration are valid.
3636
--! Valid index types are: match, ore, unique, ste_vec.
3737
--!
38-
--! @param val jsonb Configuration data to validate
38+
--! @param jsonb Configuration data to validate
3939
--! @return boolean True if all index types are valid
4040
--! @throws Exception if any invalid index type found
4141
--!
@@ -64,7 +64,7 @@ $$ LANGUAGE plpgsql;
6464
--! Checks that all 'cast_as' types specified in the configuration are valid.
6565
--! Valid cast types are: text, int, small_int, big_int, real, double, boolean, date, jsonb.
6666
--!
67-
--! @param val jsonb Configuration data to validate
67+
--! @param jsonb Configuration data to validate
6868
--! @return boolean True if all cast types are valid or no cast types specified
6969
--! @throws Exception if any invalid cast type found
7070
--!
@@ -95,7 +95,7 @@ $$ LANGUAGE plpgsql;
9595
--! Ensures the configuration has a 'tables' field, which is required
9696
--! to specify which database tables contain encrypted columns.
9797
--!
98-
--! @param val jsonb Configuration data to validate
98+
--! @param jsonb Configuration data to validate
9999
--! @return boolean True if 'tables' field exists
100100
--! @throws Exception if 'tables' field is missing
101101
--!
@@ -118,7 +118,7 @@ $$ LANGUAGE plpgsql;
118118
--! Ensures the configuration has a 'v' (version) field, which tracks
119119
--! the configuration format version.
120120
--!
121-
--! @param val jsonb Configuration data to validate
121+
--! @param jsonb Configuration data to validate
122122
--! @return boolean True if 'v' field exists
123123
--! @throws Exception if 'v' field is missing
124124
--!

src/encrypted/casts.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
--! Wraps a JSONB encrypted payload into the eql_v2_encrypted composite type.
88
--! Used internally for type conversions and operator implementations.
99
--!
10-
--! @param data jsonb JSONB encrypted payload with structure: {"c": "...", "i": {...}, "k": "...", "v": "2"}
10+
--! @param jsonb JSONB encrypted payload with structure: {"c": "...", "i": {...}, "k": "...", "v": "2"}
1111
--! @return eql_v2_encrypted Encrypted value wrapped in composite type
1212
--!
1313
--! @note This is primarily used for implicit casts in operator expressions
@@ -41,7 +41,7 @@ CREATE CAST (jsonb AS public.eql_v2_encrypted)
4141
--! Parses a text representation of encrypted JSONB payload and wraps it
4242
--! in the eql_v2_encrypted composite type.
4343
--!
44-
--! @param data text Text representation of JSONB encrypted payload
44+
--! @param text Text representation of JSONB encrypted payload
4545
--! @return eql_v2_encrypted Encrypted value wrapped in composite type
4646
--!
4747
--! @note Delegates to eql_v2.to_encrypted(jsonb) after parsing text as JSON

src/encrypted/constraints.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
--! Checks that the encrypted JSONB payload contains the required 'i' (ident) field.
1010
--! The ident field tracks which table and column the encrypted value belongs to.
1111
--!
12-
--! @param val jsonb Encrypted payload to validate
12+
--! @param jsonb Encrypted payload to validate
1313
--! @return Boolean True if 'i' field is present
1414
--! @throws Exception if 'i' field is missing
1515
--!
@@ -33,7 +33,7 @@ $$ LANGUAGE plpgsql;
3333
--! Checks that the 'i' (ident) field contains both 't' (table) and 'c' (column)
3434
--! subfields, which identify the origin of the encrypted value.
3535
--!
36-
--! @param val jsonb Encrypted payload to validate
36+
--! @param jsonb Encrypted payload to validate
3737
--! @return Boolean True if both 't' and 'c' subfields are present
3838
--! @throws Exception if 't' or 'c' subfields are missing
3939
--!
@@ -56,7 +56,7 @@ $$ LANGUAGE plpgsql;
5656
--! Checks that the encrypted payload has version field 'v' set to '2',
5757
--! the current EQL v2 payload version.
5858
--!
59-
--! @param val jsonb Encrypted payload to validate
59+
--! @param jsonb Encrypted payload to validate
6060
--! @return Boolean True if 'v' field is present and equals '2'
6161
--! @throws Exception if 'v' field is missing or not '2'
6262
--!
@@ -86,7 +86,7 @@ $$ LANGUAGE plpgsql;
8686
--! Checks that the encrypted payload contains the required 'c' (ciphertext) field
8787
--! which stores the encrypted data.
8888
--!
89-
--! @param val jsonb Encrypted payload to validate
89+
--! @param jsonb Encrypted payload to validate
9090
--! @return Boolean True if 'c' field is present
9191
--! @throws Exception if 'c' field is missing
9292
--!
@@ -113,7 +113,7 @@ $$ LANGUAGE plpgsql;
113113
--! This function is used in CHECK constraints to ensure encrypted column
114114
--! data integrity at the database level.
115115
--!
116-
--! @param val jsonb Encrypted payload to validate
116+
--! @param jsonb Encrypted payload to validate
117117
--! @return Boolean True if all structure checks pass
118118
--! @throws Exception if any required field is missing or invalid
119119
--!
@@ -144,7 +144,7 @@ END;
144144
--! Validates an eql_v2_encrypted composite type by checking its underlying
145145
--! JSONB payload. Delegates to eql_v2.check_encrypted(jsonb).
146146
--!
147-
--! @param val eql_v2_encrypted Encrypted value to validate
147+
--! @param eql_v2_encrypted Encrypted value to validate
148148
--! @return Boolean True if structure is valid
149149
--! @throws Exception if any required field is missing or invalid
150150
--!

src/encrypted/functions.sql

Lines changed: 4 additions & 4 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 containing encrypted EQL payload
11+
--! @param jsonb containing encrypted EQL payload
1212
--! @return Text Base64-encoded ciphertext string
1313
--! @throws Exception if 'c' field is not present in JSONB
1414
--!
@@ -35,7 +35,7 @@ $$ LANGUAGE plpgsql;
3535
--! Extracts the ciphertext from an encrypted column value. Convenience
3636
--! overload that unwraps eql_v2_encrypted type and delegates to JSONB version.
3737
--!
38-
--! @param val eql_v2_encrypted Encrypted column value
38+
--! @param eql_v2_encrypted Encrypted column value
3939
--! @return Text Base64-encoded ciphertext string
4040
--! @throws Exception if encrypted value is malformed
4141
--!
@@ -159,7 +159,7 @@ $$ LANGUAGE plpgsql;
159159
--! Extracts index terms (i) and version (v) from a raw JSONB encrypted value.
160160
--! Returns metadata object containing searchable index terms without ciphertext.
161161
--!
162-
--! @param val jsonb containing encrypted EQL payload
162+
--! @param jsonb containing encrypted EQL payload
163163
--! @return JSONB Metadata object with 'i' (index terms) and 'v' (version) fields
164164
--!
165165
--! @example
@@ -187,7 +187,7 @@ $$ LANGUAGE plpgsql;
187187
--! Convenience overload that unwraps eql_v2_encrypted type and
188188
--! delegates to JSONB version.
189189
--!
190-
--! @param val eql_v2_encrypted Encrypted column value
190+
--! @param eql_v2_encrypted Encrypted column value
191191
--! @return JSONB Metadata object with 'i' (index terms) and 'v' (version) fields
192192
--!
193193
--! @example

src/hmac_256/functions.sql

Lines changed: 4 additions & 4 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 containing encrypted EQL payload
9+
--! @param 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 containing encrypted EQL payload
37+
--! @param jsonb containing encrypted EQL payload
3838
--! @return Boolean True if 'hm' field is present and non-null
3939
--!
4040
--! @see eql_v2.hmac_256
@@ -53,7 +53,7 @@ $$ LANGUAGE plpgsql;
5353
--! Tests whether an encrypted column value includes an HMAC-SHA256 hash
5454
--! by checking its underlying JSONB data field.
5555
--!
56-
--! @param val eql_v2_encrypted Encrypted column value
56+
--! @param eql_v2_encrypted Encrypted column value
5757
--! @return Boolean True if HMAC-SHA256 hash is present
5858
--!
5959
--! @see eql_v2.has_hmac_256(jsonb)
@@ -73,7 +73,7 @@ $$ LANGUAGE plpgsql;
7373
--! Extracts the HMAC-SHA256 hash from an encrypted column value by accessing
7474
--! its underlying JSONB data field.
7575
--!
76-
--! @param val eql_v2_encrypted Encrypted column value
76+
--! @param eql_v2_encrypted Encrypted column value
7777
--! @return eql_v2.hmac_256 HMAC-SHA256 hash value
7878
--!
7979
--! @see eql_v2.hmac_256(jsonb)

src/jsonb/functions.sql

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
--! the given selector path. Returns all matching encrypted elements. If multiple
2121
--! matches form an array, they are wrapped with array metadata.
2222
--!
23-
--! @param val jsonb Encrypted JSONB payload containing STE vector ('sv')
24-
--! @param selector text Path selector to match against encrypted elements
23+
--! @param jsonb Encrypted JSONB payload containing STE vector ('sv')
24+
--! @param text Path selector to match against encrypted elements
2525
--! @return SETOF eql_v2_encrypted Matching encrypted elements (may return multiple rows)
2626
--!
2727
--! @note Returns empty set if selector is not found (does not throw exception)
@@ -109,8 +109,8 @@ $$ LANGUAGE plpgsql;
109109
--! Overload that accepts encrypted JSONB value and text selector,
110110
--! extracting the JSONB payload before querying.
111111
--!
112-
--! @param val eql_v2_encrypted Encrypted JSONB value to query
113-
--! @param selector text Path selector to match against
112+
--! @param eql_v2_encrypted Encrypted JSONB value to query
113+
--! @param text Path selector to match against
114114
--! @return SETOF eql_v2_encrypted Matching encrypted elements
115115
--!
116116
--! @example
@@ -137,8 +137,8 @@ $$ LANGUAGE plpgsql;
137137
--! Tests whether any encrypted elements match the given selector path.
138138
--! More efficient than jsonb_path_query when only existence check is needed.
139139
--!
140-
--! @param val jsonb Encrypted JSONB payload to check
141-
--! @param selector text Path selector to test
140+
--! @param jsonb Encrypted JSONB payload to check
141+
--! @param text Path selector to test
142142
--! @return boolean True if matching element exists, false otherwise
143143
--!
144144
--! @see eql_v2.jsonb_path_query(jsonb, text)
@@ -180,8 +180,8 @@ $$ LANGUAGE plpgsql;
180180
--!
181181
--! Overload that accepts encrypted JSONB value and text selector.
182182
--!
183-
--! @param val eql_v2_encrypted Encrypted JSONB value to check
184-
--! @param selector text Path selector to test
183+
--! @param eql_v2_encrypted Encrypted JSONB value to check
184+
--! @param text Path selector to test
185185
--! @return boolean True if path exists
186186
--!
187187
--! @example
@@ -210,8 +210,8 @@ $$ LANGUAGE plpgsql;
210210
--! or NULL if no match found. More efficient than jsonb_path_query when
211211
--! only one result is needed.
212212
--!
213-
--! @param val jsonb Encrypted JSONB payload to query
214-
--! @param selector text Path selector to match
213+
--! @param jsonb Encrypted JSONB payload to query
214+
--! @param text Path selector to match
215215
--! @return eql_v2_encrypted First matching element or NULL
216216
--!
217217
--! @note Uses LIMIT 1 internally for efficiency
@@ -258,8 +258,8 @@ $$ LANGUAGE plpgsql;
258258
--!
259259
--! Overload that accepts encrypted JSONB value and text selector.
260260
--!
261-
--! @param val eql_v2_encrypted Encrypted JSONB value to query
262-
--! @param selector text Path selector to match
261+
--! @param eql_v2_encrypted Encrypted JSONB value to query
262+
--! @param text Path selector to match
263263
--! @return eql_v2_encrypted First matching element or NULL
264264
--!
265265
--! @example
@@ -291,7 +291,7 @@ $$ LANGUAGE plpgsql;
291291
--! elements in the STE vector ('sv'). The encrypted value must have the
292292
--! array flag ('a') set to true.
293293
--!
294-
--! @param val jsonb Encrypted JSONB payload representing an array
294+
--! @param jsonb Encrypted JSONB payload representing an array
295295
--! @return integer Number of elements in the array
296296
--! @throws Exception 'cannot get array length of a non-array' if 'a' flag is missing or not true
297297
--!
@@ -325,7 +325,7 @@ $$ LANGUAGE plpgsql;
325325
--! Overload that accepts encrypted composite type and extracts the
326326
--! JSONB payload before computing array length.
327327
--!
328-
--! @param val eql_v2_encrypted Encrypted array value
328+
--! @param eql_v2_encrypted Encrypted array value
329329
--! @return integer Number of elements in the array
330330
--! @throws Exception if value is not an array
331331
--!
@@ -354,7 +354,7 @@ $$ LANGUAGE plpgsql;
354354
--! Each element is returned as an eql_v2_encrypted value with metadata
355355
--! preserved from the parent array.
356356
--!
357-
--! @param val jsonb Encrypted JSONB payload representing an array
357+
--! @param jsonb Encrypted JSONB payload representing an array
358358
--! @return SETOF eql_v2_encrypted One row per array element
359359
--! @throws Exception if value is not an array (missing 'a' flag)
360360
--!
@@ -395,7 +395,7 @@ $$ LANGUAGE plpgsql;
395395
--! Overload that accepts encrypted composite type and extracts each
396396
--! array element as a separate row.
397397
--!
398-
--! @param val eql_v2_encrypted Encrypted array value
398+
--! @param eql_v2_encrypted Encrypted array value
399399
--! @return SETOF eql_v2_encrypted One row per array element
400400
--! @throws Exception if value is not an array
401401
--!
@@ -422,7 +422,7 @@ $$ LANGUAGE plpgsql;
422422
--! value (text representation). Unlike jsonb_array_elements, this returns
423423
--! only the ciphertext 'c' field without metadata.
424424
--!
425-
--! @param val jsonb Encrypted JSONB payload representing an array
425+
--! @param jsonb Encrypted JSONB payload representing an array
426426
--! @return SETOF text One ciphertext string per array element
427427
--! @throws Exception if value is not an array (missing 'a' flag)
428428
--!
@@ -456,7 +456,7 @@ $$ LANGUAGE plpgsql;
456456
--! Overload that accepts encrypted composite type and extracts each
457457
--! array element's ciphertext as text.
458458
--!
459-
--! @param val eql_v2_encrypted Encrypted array value
459+
--! @param eql_v2_encrypted Encrypted array value
460460
--! @return SETOF text One ciphertext string per array element
461461
--! @throws Exception if value is not an array
462462
--!

0 commit comments

Comments
 (0)