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

getAll return false #11

Closed ducaiwei closed 5 years ago

ducaiwei commented 5 years ago

when I insert table success, I getAll data immediately, but getAll return false. db.insertTableContent(obj).then(res => { db.getAll('tables') // return false })

alexiusacademia commented 5 years ago

Hi there. You should call db.getAll in a separate statement to reflect the actual result. To shed more light, can you please post the actual or similar code u used with sample data for it to be confirmed? Thanks

ducaiwei commented 5 years ago

Thanks. It work for me. Reference this question: #10 . Handle an async task before getAll.