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

FromField instance for TSVector #271

Open
delanoe opened this issue Dec 8, 2018 · 0 comments
Open

FromField instance for TSVector #271

delanoe opened this issue Dec 8, 2018 · 0 comments

Comments

@delanoe
Copy link

delanoe commented Dec 8, 2018

Hello,
TSVector type of Postgres is the following:
https://www.postgresql.org/docs/8.3/datatype-textsearch.html
Example of tsvector: "'cat':2 'dog:5 'animal':10"

To add the FromField instance we need a parser.
Do you have an example of implementation that could help to parser for the TSVector FromField instances ?

Specifications would be the following:
type TSVector = [Vector]
data Vector = Vector { text :: Text
, position :: Int
}

Many thanks for your help

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

No branches or pull requests

1 participant