You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

waterline-query-builder

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waterline-query-builder

Generate waterline queries using simple functions

0.0.0
latest
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Waterline Query Object Builder

Build waterline query objects using declarative functions.

Installation

npm install waterline-query-string-builder

or

jspm install npm:waterline-query-string-builder

Usage

Before you start it is best to read more about what waterline is.

So now that you know that pairs are represented as simple javascript objects, we can continue to look at an example.

example that uses the builder function.


  let w = require('waterline-query-builder');

  let personQuery = w.builder(person => {

    return keyPairs(
      w.equals({eyes: person.eye_color}),
      w.greaterThanOrEqual({age: person.age}),
      w.lessThan({age: 100})
    );

  });

Api

keyPairs(...pairs) => object

It takes multiple objects and returns a single object that contains the properties of the other objects.

TODO

Keywords

waterline

FAQs

Package last updated on 26 Jul 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts