-
Notifications
You must be signed in to change notification settings - Fork 115
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
PGTSVector #363
Comments
I suspect it would be quite similar to adding any other type and its operations, i.e. generally quite simple. Do you want to give it a go? |
Yes, thanks. I have found a way for now. Maybe make a PR if more useful work for others. |
In fact, the type of the TSVector is like this: In others words: How would you type/parse it ? Thanks for the help. |
Do you mean how would you create a literal of type |
yes |
You can add a function to do that to |
Thanks. But I need the "@@" too that is not in the Internal operators. I have found how it would be done with Haskelldb: https://chrisdone.com/posts/haskelldb-tutorial
Do you think it could be added to Opaleye ? |
Suppose I add (.@@.) operator to data BinOp in PrimQuery.hs (or Operators.hs?), I do not get how it is translated to the right sql query. |
These instruction should see you through.
I think that's it! Try it and let me know how you get on. [EDIT: Posting this as a new comment since I made too many mistakes in the last one] |
Hello, sorry for the late answer. I have added the operator, ok. The point is I am trying to mimic this kind of query: SELECT field from table WHERE table.tsvector @@ (?::tsquery) Do you have a suggestion to do it properly ? |
Here are the types created for this: |
I'm not sure what you mean. Opaleye doesn't have that type of parametrised query. Instead you just write a function! |
Ok, I have created the Types. Last step for joins, I need the NullMaker instance for joins: No instance for (Default NullMaker (Column PGTSVector) (Column PGTSVector)) I do not see how to create this. |
That instance doesn't make sense. |
thanks, I have found it Do you have an idea how I could parse tsvector ? |
Have you used |
No, I have not used TSVector with postgresql-simple before. I have created it since it did not exist already indeed. Yes, we can open an issue for that. I can do it and help if needed. Just I do not understand how to start with the parser. |
I have just created the issue: lpsmith/postgresql-simple#271 |
Closing as stale. Feel free to reopen if necessary. |
There are plans for adding PGTSVector Column type ?
Have you tried already ?
Do you need help ?
The text was updated successfully, but these errors were encountered: