Skip to content

Commit

Permalink
operator: add regepx and tsquery ops
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdanp committed Dec 27, 2024
1 parent e103c8c commit 8d66a7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions deta-doc/deta.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ queries.
@defop[jsonb (display (select _ (jsonb "{}")))]
@defop[like (display (select _ (like "a" "%a%")))]
@defop[position (display (select _ (position "om" "Thomas")))]
@defop[regexp-match? (display (select _ (regexp-match? "a" "[a-z]")))]
@defop[regexp-match?* (display (select _ (regexp-match?* "A" "[a-z]")))]
@defop[tsquery-match? (display (select _ (tsquery-match? (to_tsvector "a") (to_tsquery "A"))))]
@defop[similar-to (display (select _ (similar-to "a" "abc")))]
@defop[string-concat (display (select _ (string-concat "a" "bc" "def")))]
@defop[subquery (display (select _ (as (subquery (select _ 1)) x)))]
Expand Down
2 changes: 1 addition & 1 deletion deta-lib/info.rkt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#lang info

(define license 'BSD-3-Clause)
(define version "0.16")
(define version "0.16.1")
(define collection "deta")

(define deps '("base"
Expand Down
3 changes: 3 additions & 0 deletions deta-lib/private/dialect/operator.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@
[json-superset? "@>"]
[like]
[position]
[regexp-match? "~"]
[regexp-match?* "~*"]
[tsquery-match? "@@"]
[similar-to "SIMILAR TO"])

(define-ops ternary
Expand Down

0 comments on commit 8d66a7b

Please sign in to comment.