Skip to content

Commit 8d66a7b

Browse files
committed
operator: add regepx and tsquery ops
1 parent e103c8c commit 8d66a7b

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

deta-doc/deta.scrbl

+3
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ queries.
645645
@defop[jsonb (display (select _ (jsonb "{}")))]
646646
@defop[like (display (select _ (like "a" "%a%")))]
647647
@defop[position (display (select _ (position "om" "Thomas")))]
648+
@defop[regexp-match? (display (select _ (regexp-match? "a" "[a-z]")))]
649+
@defop[regexp-match?* (display (select _ (regexp-match?* "A" "[a-z]")))]
650+
@defop[tsquery-match? (display (select _ (tsquery-match? (to_tsvector "a") (to_tsquery "A"))))]
648651
@defop[similar-to (display (select _ (similar-to "a" "abc")))]
649652
@defop[string-concat (display (select _ (string-concat "a" "bc" "def")))]
650653
@defop[subquery (display (select _ (as (subquery (select _ 1)) x)))]

deta-lib/info.rkt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#lang info
22

33
(define license 'BSD-3-Clause)
4-
(define version "0.16")
4+
(define version "0.16.1")
55
(define collection "deta")
66

77
(define deps '("base"

deta-lib/private/dialect/operator.rkt

+3
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
[json-superset? "@>"]
6666
[like]
6767
[position]
68+
[regexp-match? "~"]
69+
[regexp-match?* "~*"]
70+
[tsquery-match? "@@"]
6871
[similar-to "SIMILAR TO"])
6972

7073
(define-ops ternary

0 commit comments

Comments
 (0)