Socket
Socket
Sign inDemoInstall

waterline-query-builder

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    waterline-query-builder

Generate waterline queries using simple functions


Version published
Maintainers
1
Created

Readme

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

FAQs

Last updated on 26 Jul 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc