safronoose
v1.0.1
Published
Database using QOL SQlite
Downloads
2
Readme
Safronoose (QOL)
Safronoose is a SQlite npm that uses the self-developed QOL entity. This database offers so many vantages, like persistent storage and so much more. Any issue contact me from Discord: Aidak#0001
Example
const db = require('safronosejs');
// Set an object
db.insertObject('key', 'value') // returns -> value
// Pushing an element to an array (that doesn't exist yet) in an object:
db.insertMany('userInfo.items', 'Sword')
// -> { difficulty: 'Easy', items: ['Sword'] }
// Adding to a number (that doesn't exist yet) in an object:
db.addValue('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword'], balance: 500 }
// Repeating previous examples:
db.insertMany('userInfo.items', 'Watch')
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }
db.addValue('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }
// Fetching individual properties
db.findOne('userInfo.balance') // -> 1000
db.get('userInfo.items') // ['Sword', 'Watch']
Installation
If you're having troubles installing, please follow this troubleshooting guide.
Linux & Windows
npm i safronoose --save
Note: Windows users may need to do additional steps listed here.
Mac
- Install: XCode
- Run:
npm i -g node-gyp
in terminal - Run:
node-gyp --python /path/to/python2.7
(skip this step if you didn't install python 3.x) - Run:
npm i safronoose --save