Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 5082 tsvector #5104

Merged
merged 4 commits into from
Apr 4, 2024
Merged

Fixes 5082 tsvector #5104

merged 4 commits into from
Apr 4, 2024

Conversation

griffio
Copy link
Contributor

@griffio griffio commented Apr 1, 2024

fixes #5082

Added TSVECTOR type and updated @@ match operator to work with JSONB and TSVECTOR
Added several text search functions for now - as there are many more functions that could be added to a custom dialect for advanced uses.
Added integration tests

🧪 Tested snapshot with local project https://github.com/griffio/sqldelight-postgres-textsearch

Shared with Jsonb and TsVector type
Add MatchOperatorExpressionMixin for SqlExp and annotations
Add PostgreSqlTypeResolver matchOperatorExpression boolean result types

Operator resolver type

e.g || concat
Integration tests for TsVector
|| concat test
Useful text search function

ts_rank returns a REAL type
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', ?);
`
@hfhbd hfhbd merged commit 5628209 into cashapp:master Apr 4, 2024
12 checks passed
@griffio griffio deleted the fixes-5082-tsvector branch April 4, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PostgreSql TSVector Column type
2 participants