1.0.1 • Published 4 years ago

safronoose v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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 1. Install: XCode 2. Run: npm i -g node-gyp in terminal 3. Run: node-gyp --python /path/to/python2.7 (skip this step if you didn't install python 3.x) 4. Run: npm i safronoose --save

1.0.1

4 years ago

1.0.0

4 years ago