# tower-query

> Query anything, anywhere.

Latest version **0.1.1** (published 2013-09-12) · 0 weekly downloads

## Install

```sh
npm install tower-query
pnpm add tower-query
yarn add tower-query
bun add tower-query
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2013-09-12 |
| First published | 2013-06-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | viatropos |
| Keywords | sql, orm, query, database, mvc |

## Links

- npm: https://www.npmjs.com/package/tower-query
- Repository: http://github.com/tower/query
- Issues: https://github.com/tower/query/issues
- npm.io page: https://npm.io/package/tower-query

## Dependencies (4)

- [part-is-array](https://npm.io/package/part-is-array.md) *
- [tower-program](https://npm.io/package/tower-program.md) ~0.1.0
- [part-each-array](https://npm.io/package/part-each-array.md) *
- [tower-validator](https://npm.io/package/tower-validator.md) ~0.1.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2013-09-12
- 0.1.0 — 2013-06-24
- 0.1.0pre — 2013-06-02

## README

# Tower Query API

Query anything, anywhere.

## Installation

node.js:

```bash
$ npm install tower-query
```

browser:

```bash
$ component install tower/query
```

## Examples

Select records:

```js
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):

```js
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:

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

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

## License

MIT

---
_Source: https://npm.io/package/tower-query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
