toolsdb
v3.1.1
Published
A simple sqlite wrapper that helps you use Basic sql Commands/Codes
Downloads
42
Readme
ToolsDB
A simple sqlite wrapper that helps you use Basic sql Commands/Codes
Requirements
- NodeJS 8+
- Any Javascript Code that you want to Use databases on!
Examples
pushTools:
const tools = require('toolsdb');
tools.pushTools('userID', 500).then(i => { // Adds 500 to an assigned User ID
console.log(i) // { ID: 'user', value: 500, text: '' }
console.log(i.value) // Returns 500
});
/*
We can also make it remove an amount!
*/
tools.pushTools('userID', -500).then(i => { // Removes 500 to an assigned User ID
console.log(i) // { ID: 'user', value: -500, text: '' }
console.log(i.value) // Returns -500
});
getTools:
const tools = require('toolsdb');
tools.getTools('userID').then(i => { // Fetches values from ID user, then forwards it to i
console.log(i) // { ID: 'user', value: 0, text: '' }
console.log(i.value) // Returns 0
});
pushField:
const tools = require('toolsdb');
tools.pushField('user', 'This is a stored string!').then(i => { // Fetches values from ID user, updates text
console.log(i) // { ID: 'user', value: 0, text: 'This is a stored string!' }
console.log(i.text) // 'This is a stored string!'
});
getObject:
const tools = require('toolsdb');
var my_obj = {
user: 'Wolfie',
age: '16'
};
tools.getObject(my_obj).then(c => { // Gets the Defined Object
console.log(c) // { user: 'Wolfie', age: '16' }
console.log(c.user) // 'Wolfie'
console.log(c.age) // '16'
});
Updates
- Removed the useless fetcharray function, as it bugged the system.
- Fixed package completely.
Credits
- Project transfered from Kevlar(Discord: Kevlar#9411)
- Updates are now configured / built by Wolfie(Discord: Wolfie#4288)
Aspect Discord Bot
Aspects Official Chat
Link: Here!