Skip to content

Commit b4d6b4d

Browse files
committed
docs(sql): fix documentation validation errors
- Add missing @brief, @param, @return tags to operators - src/operators/~~.sql: Add function documentation for LIKE operator - src/operators/<>.sql: Add @param and @return tags - Fix validate-required-tags.sh to handle longer comment blocks - Increased tail from 20 to 100 lines to capture complete comments - Previous limit was truncating @brief tags in longer documentation blocks - Fixes false positive errors for well-documented functions All validation now passes with 0 errors and 0 warnings.
1 parent b97fd6f commit b4d6b4d

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/operators/<>.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ CREATE OPERATOR <> (
8383
);
8484

8585
--! @brief <> operator for JSONB and encrypted value
86+
--!
87+
--! @param a jsonb Plain JSONB value
88+
--! @param b eql_v2_encrypted Encrypted value
89+
--! @return boolean True if values are not equal
90+
--!
8691
--! @see eql_v2."<>"(eql_v2_encrypted, eql_v2_encrypted)
8792
CREATE FUNCTION eql_v2."<>"(a jsonb, b eql_v2_encrypted)
8893
RETURNS boolean

src/operators/~~.sql

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ $$ LANGUAGE SQL;
6363
--! SELECT * FROM customers
6464
--! WHERE encrypted_name ~~ 'John%'::text::eql_v2_encrypted;
6565
--!
66+
--! @brief SQL LIKE operator (~~ operator) for encrypted text pattern matching
67+
--!
68+
--! @param a eql_v2_encrypted Left operand (encrypted value)
69+
--! @param b eql_v2_encrypted Right operand (encrypted pattern)
70+
--! @return boolean True if pattern matches
71+
--!
6672
--! @note Requires match index: eql_v2.add_search_config(table, column, 'match')
6773
--! @see eql_v2.like
6874
--! @see eql_v2.add_search_config

tasks/validate-required-tags.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ for file in $(find src -name "*.sql" -not -name "*_test.sql"); do
2121
start=$((line_no - 50))
2222
[ "$start" -lt 1 ] && start=1
2323

24-
comment_block=$(sed -n "${start},${line_no}p" "$file" | grep "^--!" | tail -20)
24+
comment_block=$(sed -n "${start},${line_no}p" "$file" | grep "^--!" | tail -100)
2525

2626
function_sig=$(sed -n "${line_no}p" "$file")
2727
# Extract function name (compatible with BSD sed/grep)
@@ -60,7 +60,7 @@ for file in $(find src -name "*.template"); do
6060
start=$((line_no - 50))
6161
[ "$start" -lt 1 ] && start=1
6262

63-
comment_block=$(sed -n "${start},${line_no}p" "$file" | grep "^--!" | tail -20)
63+
comment_block=$(sed -n "${start},${line_no}p" "$file" | grep "^--!" | tail -100)
6464

6565
function_sig=$(sed -n "${line_no}p" "$file")
6666
# Extract function name (compatible with BSD sed/grep)

0 commit comments

Comments
 (0)