-
Notifications
You must be signed in to change notification settings - Fork 0
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
Expression based cursor #4
Conversation
# Here we build the rank_value for each returned row | ||
schema, :rank_value -> | ||
{:ok, %{rows: [[rank_value]]}} = | ||
Repo.query("SELECT ts_rank($1, plainto_tsquery('simple', $2))", [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardrissanen does this execute a new query per row?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That example does but I am sticking with our function based solution. However, there is a select merge that is required with this solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonbirke0927 ^^^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@richardrissanen got it. I think given the fact that this is a PR against the existing repo, and seems others have used it w success, I'm much less worried about the change
Found this solution via the repos issues here: duffelhq#173