Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dharmesh-hemaram/jdb
jDB front end database (indexeddb) wrapper
https://github.com/dharmesh-hemaram/jdb
database es6 es6-javascript indexeddb indexeddb-api indexeddb-components indexeddb-like indexeddb-sql indexeddb-tools indexeddb-wrapper javascript javascript-library javascript-plugin jdb wrapper
Last synced: 14 days ago
JSON representation
jDB front end database (indexeddb) wrapper
- Host: GitHub
- URL: https://github.com/dharmesh-hemaram/jdb
- Owner: dharmesh-hemaram
- License: apache-2.0
- Created: 2017-08-30T10:45:28.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T10:33:03.000Z (8 months ago)
- Last Synced: 2024-04-14T10:55:02.267Z (7 months ago)
- Topics: database, es6, es6-javascript, indexeddb, indexeddb-api, indexeddb-components, indexeddb-like, indexeddb-sql, indexeddb-tools, indexeddb-wrapper, javascript, javascript-library, javascript-plugin, jdb, wrapper
- Language: JavaScript
- Homepage: https://dharmesh-hemaram.github.io/jDB/
- Size: 1.25 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DB
[![NPM version][npm-image]][npm-url]## About
DB is javascript library / wrapper used to communicate with IndexedDB efficiently. DB have set of predefined function which helps developers ease in writing object oriented code for storing, manipulating and retrieving data in indexedDB.## Versions
**Changes in 1.0.2:**
- Updated code to remove unwanted methods and variables.## Install
### In Browser
```html```
### npm
```
npm i --save DB;
```
### In Node
```javascript
// ES2015
import {DB} from '@dharmesh-hemaram/DB';//require JS
let DB = require('@dharmesh-hemaram/DB').DB;//AMD
define(['@dharmesh-hemaram/DB'], function (package) {
let DB = package.DB;
});```
## Getting started
### Configuration
create database configuration file db_confog.json
```JSON
{
"databaseName":"testDB",
"version":1,
"tables":[
{
"name":"customers",
"keyPath":"customerId",
"autoIncrement":false,
"columns":[
{
"name":"customerName",
"nullable":false,
"type":"string"
},{}
]
},{}
]
}
```
### Setup
```javascript
import {DB} from '@dharmesh-hemaram/DB';DB.setup(databaseJSON).then(dbInst => console.log(dbInst));
```
### Serve
```javascript
DB.getInst().databaseName.tableName.get().then(result).catch(error);
```### [Query](https://github.com/dharmesh-hemaram/DB/wiki/Query)
### Usefull Stuff:
* [E-Mail]([email protected])
* [Wiki](https://github.com/dharmesh-hemaram/DB/wiki/)
* [Test](https://dharmesh-hemaram.github.io/DB/test.html)
If this project help you reduce time to develop, you can give me a cup of coffee :)
[![PayPal](https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png)](https://paypal.me/DharmeshH/25?_ga=1.267642062.1305492970.1507529951)## Licensing
[The code in this project is licensed under Apache 2.0 license.](LICENSE)