https://github.com/bytespider/pipeline
Pipeline is a client-side, open source, document-oriented storage database.
https://github.com/bytespider/pipeline
Last synced: about 1 year ago
JSON representation
Pipeline is a client-side, open source, document-oriented storage database.
- Host: GitHub
- URL: https://github.com/bytespider/pipeline
- Owner: bytespider
- License: mit
- Created: 2011-02-18T09:49:55.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-02-24T16:11:50.000Z (over 15 years ago)
- Last Synced: 2025-02-11T15:59:35.029Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 113 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pipeline
A client-side, open source, JSON document-oriented database.
## Features
Released under the MIT. Please see LICENSE in the project root folder for more
information.
- Dynamic document-orientated schemas with JSON documents.
- Rich queries utilising familier javascript function definitions.
## Usage
###Instantiating
var db = new Pipeline();
db.createCollection('users'); // db is now and instance of a Pipeline db
###Inserting
Insert function takes any number of documents insert(document1, document2, ... documentN)
db.users.insert({
name: 'Darth Vader',
age: 43
}, {
name: 'Luke Skywalker',
age: 21
});
###Searching / finding results
This example shows a simple query simpilar to SQL's `WHERE age = 21`
More keys are appended like an `AND`
i.e. {age: 21, name: 'Darth Vader'} == `WHERE age = 21 AND name = 'Darth Vader'`
var results = db.users.find({age: 21});
This example shows more complicated queries uing the functional syntax
The function is called on each document within the collection to determine a match.
Functions *MUST* return a boolean, `TRUE` meaning a positive match
var results2 = db.users.find(function (){return name.indexOf('v') > -1});
## Authors
* Rob Griffiths (rob AT bytespider DOT eu)