https://github.com/arcath/sodb
Single Object Database
https://github.com/arcath/sodb
database javascript library nosql
Last synced: about 1 year ago
JSON representation
Single Object Database
- Host: GitHub
- URL: https://github.com/arcath/sodb
- Owner: Arcath
- Created: 2015-06-18T08:51:35.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2023-10-27T14:01:52.000Z (over 2 years ago)
- Last Synced: 2025-04-14T14:09:12.330Z (about 1 year ago)
- Topics: database, javascript, library, nosql
- Language: TypeScript
- Size: 1.16 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 13
-
Metadata Files:
- Readme: Readme.markdown
Awesome Lists containing this project
README
# SODB
[](https://travis-ci.org/Arcath/sodb) [](https://coveralls.io/r/Arcath/sodb)
Single Object Data Base
## Install
```
npm install sodb --save
```
## Usage
```typescript
import db from 'sodb'
interface Record{
name: string
gender: string
}
const {add, findOne} = db()
add({name: 'bob', gender: 'm'})
const bob = findOne({name: 'bob'})
bob.gender // m
```
- [Creating a Database](docs/creating_a_database.markdown)
- [Finding Data](docs/finding_data.markdown)
- [Working with Results](docs/working_with_results.markdown)
- [Updating and Removing Data](docs/updating_and_removing_data.markdown)
- [Indexing](docs/indexing.markdown)
- [Caching](docs/caching.markdown)
## Contributing
Feel free to fork this repo and submit changes!
Run `npm install` to install all the modules. Once that finishes run `grunt test` to run the tests and `grunt testDocs` to test that the code examples in the docs work.
Please add/amend the documentation to reflect your changes and add any code you put into the documentation to `src/db.docs.spec.ts`
When you fork sodb please:
1. Create your feature branch (`git checkout -b my-new-feature`)
2. Commit your changes (`git commit -am 'Add some feature'`)
3. Push to the branch (`git push origin my-new-feature`)
4. Create new Pull Request