3 ms·
I'm not the author but I'll attempt to clear up the confusion based on what I've read. Total.js's specific usage of "embedded" in this case means it includes 3
by jasode 10y ago
I'm not the author but I'll attempt to clear up the confusion based on what I've read.
Total.js's specific usage of "embedded" in this case means it includes 3000 lines[1] of pure Javascript that embeds the entire db engine source code into the project.
As for SQLite... as far as I can tell with Googling, there is no port of SQLite's C code to pure Javascript code that's maintained with popular support. (I found an old 2014 project[2][3] but it doesn't appear to be up-to-date.) Yes, there is a Javascript API[4] to SQLite but that's different from the SQLite engine itself being converted to 100% Javascript.
That's the nuance of "embedded" in Total.js' context. Yes, SQLite is an embedded db but nosql.js is even "more embedded" than that.
That said, whether Total.js embedded js db engine is as high performance and error-free compared to SQLite is unknown.
[1] https://github.com/totaljs/framework/blob/master/nosql.js https://github.com/totaljs/framework/blob/master/nosql.js
[2] 100% Javascript translated from SQLite C source --> https://github.com/lovasoa/sql.js https://github.com/lovasoa/sql.js
[3] http://stackoverflow.com/questions/15415076/sql-js-in-javascript http://stackoverflow.com/questions/15415076/sql-js-in-javasc...
[4] some Javascript driving a SQLite C Language compiled binary --> https://www.npmjs.com/package/sqlite3 https://www.npmjs.com/package/sqlite3
- cmrx64 10y agoOk, that's a lot more interesting than just "links to leveldb"!