New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

tower-query

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tower-query

Query anything, anywhere.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

Tower Query API

Query anything, anywhere.

Installation

node.js:

$ npm install tower-query

browser:

$ component install tower/query

Examples

Select records:

var query = require('tower-query');

query()
  .use('memory')
  .select('post')
  .where('likeCount').gte(10)
  .where('likeCount').lte(200)
  .all(function(err, posts){

  });

Create record(s):

query()
  .use('memory')
  .select('post')
  .create({ title: 'Foo' }, function(err, post){

  });

Other actions update and remove work similarly.

The query delegates to adapters for these actions, which should return a stream-compatible API, such as a node.js stream, tower-stream, tower-program, or tower-topology. This is how .find looks at a lower level:

query()
  .use('mongodb')
  .select('post')
  .action('find')
  .exec()
  .on('data', function(posts){

  })
  .on('end', function(){
    console.log('done querying');
  });

License

MIT

Keywords

sql

FAQs

Package last updated on 12 Sep 2013

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