0.1.3-build • Published 6 years ago

quick.db-plus v0.1.3-build

Weekly downloads
25
License
MIT
Repository
-
Last release
6 years ago

Quick.db Plus

Quick.db plus is a module that adds on to the existing Quick.db made by TrueXPixels (Thanks!) Installing is easy! Using NPM:

npm i quick.db-plus

Using Yarn:

yarn add quick.db-plus

Initialising the database

To initialise the database you need to do:

const Quick = require('quick.db-plus');

let db = new Quick.db('my_database'); // -> Creates file ./my_database.sqlite

// Getting and setting with quick.db-plus
db.set('foo', 'bar');
let foo = b.get('foo');
console.log(foo) // -> 'bar'

Quick integration with Discord.js

const Discord = require('discord.js'); // Discord.js package
const Quick = require('quick.db-plus'); // Quick.db plus package
const client = new Discord.Client(); // Creates Discord client to interact with api
const guildDb = new Quick.db('guilds'); // Creates ./guilds.sqlite file for "guilds"
client.settings = guildDb; // Sets the client.settings prop to our db.

// Ready event which will log everything in our database using client.settings
client.on('ready', () => { console.log('Ready!'); console.log(client.settings.all()) });

s Quick#db (class) methods: add, all, delete, get, find, has, push, set, sub, type

API Reference: Comming Soon

0.1.3-build

6 years ago

0.1.3

6 years ago

0.1.2-b6

6 years ago

0.1.2-b5

6 years ago

0.1.2-b4

6 years ago

0.1.2-b3

6 years ago

0.1.2-b2

6 years ago

0.1.2-b1

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago