npm.io
1.0.2 • Published 3 years ago

simpledb-database

Licence
ISC
Version
1.0.2
Deps
1
Size
9 kB
Vulns
1
Weekly
0

simpleDB.read('databaseFile.db') //Read contents of database

simpleDB.write('databaseFile.db', "databaseName", [JSON.stringify({example:"example",example2:"example2"})]) //Write to database

simpleDB.createDB('databaseFile') //Create a database file

simpleDB.deleteRows('databaseFile.db', "RowName") //Delete a row in database where name is RowName

simpleDB.deleteTable('databaseFile.db', "tableName") //Delete a table in database where name is tableName

simpleDB.readRowWhere('databaseFile.db', 'Name') //Read a row in database where name is rowName

simpleDB.readTableWhere('databaseFile.db', "tableName") //Read a table in database where name is tableName

simpleDB.updateTable('databaseFile.db', 'tableName', "newTableName", [JSON.stringify({Name:"content",Age:"int"})]) //Update a table in database where name is tableName and new name is newTableName

simpleDB.updateRowWhere('database.db', "RowName", "RowItem", "NewRowItem") //Update a row-item in row where rowname is RowName and where row-item is RowItem and new row-item is NewRowItem