Skip to content

Limit query does not work correctly #11

Description

@llxff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions