Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

incorrect sql for limit + count (DM 1.0) #8

@solnic

Description

@solnic

In DM 1.0, the expression Foo.all(:limit=>2).count
produces the query
SELECT COUNT(*) FROM foos LIMIT 2
which is incorrect, as the precedence of LIMIT applies to the one row
returned by count.
This is a big deal with many pagination plugins.


Created by Gary Yngve - 2010-06-23 04:55:07 UTC

Original Lighthouse ticket: http://datamapper.lighthouseapp.com/projects/20609/tickets/1334

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions