Skip to content

order by with raw SQL #311

Description

@ghazel

Very similar to #304 , it would be nice to be able to order by some raw (but properly escaped) SQL. My case is:

    cities.find().order("ST_Distance(geopoint, ?)", [point]).limit(1);

Two problems with this; first, it doesn't take ? and a list. Second, even a properly formed query gets quoted like it's an identifier.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions