alexiusacademia / electron-db

Electron module that acts as database management and uses flat file database (json file) to store tables.
MIT License
87 stars 24 forks source link

How would you remove a database item? #5

Closed LauraWebdev closed 6 years ago

LauraWebdev commented 6 years ago

Hey, very good library so far, I really like the simplicity!

What I was not able to get working so far though is removing items from the database. The documentation does not include an example for that either.

alexiusacademia commented 6 years ago

Hi there. The library doesn't include the delete row functionality until now. Thanks for opening the issue. You can now use this functionality using


const db = require('electron-db');
const electron = require('electron');

db.deleteRow('customers', {'id': 1508419374272}, (succ, msg) => {
  console.log(msg);
});