-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add similar to for psql ref #1391
- Loading branch information
pallam
committed
Jun 25, 2024
1 parent
4b7da0d
commit 9014766
Showing
2 changed files
with
6 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
drivers/sqlboiler-psql/driver/override/main/23_similarto.go.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{{- define "where_similarto_override" -}} | ||
{{$name := printf "whereHelper%s" (goVarname .Type)}} | ||
func (w {{$name}}) SIMILAR(x {{.Type}}) qm.QueryMod { return qm.Where(w.field+" SIMILAR TO ?", x) } | ||
func (w {{$name}}) NSIMILAR(x {{.Type}}) qm.QueryMod { return qm.Where(w.field+" NOT SIMILAR TO ?", x) } | ||
{{- end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters