by couchand · 12y ago · 0 comments
The shared global state (see here: https://github.com/typicode/lowdb/blob/481cf43d6b0a52c1cb996...) means that attempting to use more than one collection will cause issues but it will silently succeed. The synchronous file I/O will grind your process to a halt.
If you are serving a mock API for the purpose of local development you might be fine. If you're trying to build any web application at all, this isn't the right choice.
My somewhat ignorant inclination is to suggest that maildir fits this description.
I don't believe maildir would be described as a flat file.
You must go via the actual sqlite process.
On the other hand maildir, composed of multiple ascii compatible text files, can be read by any email client- provided it follows the protocol for reading and writing of files in the maildir spec.
Flat files doesn't mean neither text file, nor human-readable. Text format, human-readable format is a terrible one to store data, esp. numbers.
http://sqlite.1065341.n5.nabble.com/think-I-need-better-erro...
You handle the result codes you know what to do with, and everything that remains means your program should explode immediately.
https://en.wikipedia.org/wiki/Flat_file_database#Contemporar...
If you want a full serialization of the memory to the 'flat' file - then no. It just makes no sense. Yet, a single file databases that's multi-user, mulch-threaded and mult-transaction is all viable.