Skip to content

BETWEEN queries #19

Closed
Closed

Description

@Gamaroff

Is it possible to do BETWEEN queries with the current code or would I need to develop new code to do this?

Activity

  1. dresende commented on Jan 10, 2013

    @dresende
    Owner

    It's not possible, you need to develop code for now.

  2. dresende commented on Jan 10, 2013

    @dresende
    Owner

    I just checked all 3 drivers and the syntax is the same so it is a good addition. I just don't know yet the best syntax for this.

  3. dresende commented on Jan 10, 2013

    @dresende
    Owner

    I'm thinking about exposing some "special" functions to create "special" objects to use in conditions.

    Person.find({ age: orm.between(20, 30) }, ....);

    This.between() would return a common object with a non-enumerable function that would tell the sql builder what thing it is.. this could be used for other things:

    Person.find({ age: orm.greater(20) }, ...);
  4. Gamaroff commented on Jan 10, 2013

    @Gamaroff
    CollaboratorAuthor

    That sounds great. Very powerful indeed.

  5. added a commit that references this issue on Jan 10, 2013
    1ed3dc5
  6. added a commit that references this issue on Sep 19, 2017
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions