Skip to content

Commit

Permalink
Add function websearch_to_tsquery
Browse files Browse the repository at this point in the history
Seems to be commonly used for searches - returns ts_query type that is a text type
Tested locally with

`
SELECT *
FROM Recipes WHERE search @@ websearch_to_tsquery('english', ?);
`
  • Loading branch information
griffio committed Apr 1, 2024
1 parent ec64b1f commit f71d95a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class PostgreSqlTypeResolver(private val parentResolver: TypeResolver) : TypeRes
"to_tsquery" -> IntermediateType(TEXT)
"to_tsvector" -> IntermediateType(PostgreSqlType.TSVECTOR)
"ts_rank" -> encapsulatingType(exprList, REAL, TEXT)
"websearch_to_tsquery" -> IntermediateType(TEXT)
else -> null
}

Expand Down

0 comments on commit f71d95a

Please sign in to comment.