Enhanced.DB
You can help us by joining our Discord Server! This package workd good with Typescript too...
Docs: https://enhanceddb.science.repl.co/
const db = // Set Optionsconst options = clearOnStart: false filename: 'kek.sqlite'// Setting clearOnStart true will clear the whole enhanced.sqlite. That would be false by default so if you dont need of that option no need of using options parameter!// You can setup ur own custom file directory or location! But must be perfect for Sqlite Environment! It would be default to enhanced.sqlite! // Will apply options to the default database tabledboptionsoptions
Now here comes some easy database methods!
db // Will set valuedb // Will return bardb // Will return truedbtype'foo' // Will return stringdb // Will return true dball // Will return all datadb // Will send you the array of the data which key's starts with f dbdb // Value would be 3 db // Value would be 2 db // Will delete key 'f'db // Will clear whole database! This will work only for default database table! If you are using custom table make sure that you use db.deleteTable() dbdb // Will push value to the array!db // Will return true
Import Quick.DB data!
For those who wants to use this package but your Quick.DB has some important data! This is for you:
// Import quick.dbconst quick = // Create db in enhanced.dbconst db = db // Will console.log you *Finished Exporting*
Creating Tables
Create a custom table name which will be apart from the default database table
const db = const table = 'myTable' options// 'myTable' is your table name// Options is same as you saw in the first 'clearOnStart' and 'filename' table // Will set valuetable // Will return bartable // Will return truetabletype'foo' // Will return stringtable // Will return true tableall // Will return all datatable // Will send you the array of the data which key's starts with f tabletable // Value would be 3table // Value would be 2 table // Will delete key 'f'table // Will clear whole database! This will work only for custom table! tabletable // Will push value to the array!table // Will return true
Some Utility
const db = dbversion // Returns current version of the package
Read EDB Sqlite files
Using this class you can read edb sqlite files and use import to import data!
// Import Read Constructorconst Read = // Set options if neededconst options = table: 'myCustomTable'// Setting table will read that table of that file else it will read the default database one! const data = filename options// FIlename would be the name of the file to read console// Will you return the the data selected as your options selected!