odd-storage
odd-storage is JavaScript library that has two interfaces (sql and sync) for store data in node.js and browsers.
Example
let storage = prefix: '...'
API
- Abstract
- Mixes
- ready-mixin
- Methods
- Inheritance
- Mixes
- AbstractSQL
- Methods
- Inheritance
- AbstractSync
Abstract
open
Open storage and set ready state for current instance.
return: Promise
withLock
If you want immutable data between related queries than run all queries in withLock.
function
fn
return: Promise
AbstractSQL
executeSQL
Execute sql queries with arguments args.
string
sqlArray.<*>
args
return: Promise.<Array>
AbstractSync
set
string
keystring
value
return: Promise
get
string
key
return: Promise.<?string>
remove
string
key
return: Promise
entries
return: Promise<Iterable<{key: string, value: string}>>
clear
string
key
return: Promise
Alternatives
License
This software is licensed under the MIT License.