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

DB Supports Querying with a Filter Function #379

Merged
merged 1 commit into from Nov 7, 2015

Conversation

Projects
None yet
7 participants
@jherdman
Copy link
Contributor

jherdman commented Nov 6, 2015

Querying can now be done with a function in case you want to do super
spicy things with Mirage! Peep this example:

let legalDrinkersInCanada = db.users.where(function(user) {
  return user.age > 19;
});

Boom! Resolves #365

DB Supports Querying with a Filter Function
Querying can now be done with a function in case you want to do super
spicy things with Mirage! Peep this example:

    let legalDrinkersInCanada = db.users.where(function(user) {
      return user.age > 19;
    });

Boom! Resolves #365
@samselikoff

This comment has been minimized.

Copy link
Owner

samselikoff commented Nov 7, 2015

💥

this is awesome--thank you!

samselikoff added a commit that referenced this pull request Nov 7, 2015

Merge pull request #379 from jherdman/filter-functions
DB Supports Querying with a Filter Function

@samselikoff samselikoff merged commit 070b7f5 into samselikoff:master Nov 7, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jherdman jherdman deleted the jherdman:filter-functions branch Dec 20, 2015

@xamoom-pali

This comment has been minimized.

Copy link

xamoom-pali commented Oct 7, 2016

Amazing!

@OakBehringer

This comment has been minimized.

Copy link

OakBehringer commented Mar 14, 2017

NOTE: This also works for model.where - docs don't state this; might not be obvious to new users.

@tumentumurchudur

This comment has been minimized.

Copy link

tumentumurchudur commented Apr 19, 2017

This made my day. Thank you.

@KeranChen

This comment has been minimized.

Copy link

KeranChen commented Nov 13, 2017

This is great!

@gbl3

This comment has been minimized.

Copy link

gbl3 commented Jan 29, 2018

Excelent solution, thanks!

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