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

Limit query does not work correctly #11

Open
llxff opened this issue Jan 15, 2019 · 0 comments
Open

Limit query does not work correctly #11

llxff opened this issue Jan 15, 2019 · 0 comments

Comments

@llxff
Copy link
Contributor

llxff commented Jan 15, 2019

Hi, I found that limit and offset queries don't work properly with parameters because of different order in parameters list and ClickHouse LIMIT ?, ? query.

Simple example:

Such query

Schema |> limit(^limit) |> offset(^offset) |> Repo.all()

generates such sql:

SELECT ... FROM "schema" LIMIT ?, ?

with parameters: [limit, offset] and final query will be like this SELECT ... FROM "schema" LIMIT #{limit}, #{offset}, but should be SELECT ... FROM "schema" LIMIT #{offset}, #{limit}

I think this is regression of #7 PR.

@llxff llxff changed the title Limit query does now work correctly Limit query does not work correctly Jan 15, 2019
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