sqlectron / sqlectron-core

Home Page:https://sqlectron.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for Sqlite

arkhan opened this issue · comments

Hello, great work,

It's posible to add Support to SQLite data bases

Thanks

It is, should be quite easy actually. After finding right Node module for SQLite, rest of the work is implementing API which should be very similar to SQL Server implementation I guess. So more or less copy and rewrite :)

I don't have time for this right now, so if you want feel free to contribute! Pull request is welcome!

(Else, if it remains unresolved I'll implement this when I catch some more time.)

Would this module be ok as a base? https://www.npmjs.com/package/sqlite

Maybe is better use the original package https://github.com/mapbox/node-sqlite3

The reason I opted for the sqlite module instead of the sqlite3 module was more to ensure a standard programming style. Yes it is an additional layer of dependency, but using the wrapper ensures that the client can take advantage of es6 and be written in a similar manner as the rest of the clients. I felt that it would make maintaining the codebase easier.

Yeah makes sense. But most of the DB clients we use today are using callback instead of Promise. And we wrap them with Promise inside the sqlectron-core:

My only concern of using the original package is maintainability and have full support of the available functions. In case the API of the original package change or they fix something, we do not depend on this other package to get the latest version.

Ok, I'll use the original sqlite3 package instead for this PR.

+1

There aren't any great cross-platform SQLite GUIs. I'd really appreciate the feature so I've posted a bounty of $15.

@thisispiers thanks for the incentive :)

Anyone interested in this feature. Please tests your queries (simple and complex) here and let me know if there is any bug. We need to use that because the sqlite module does not have a single function that is able to return results and return the inserted/affected rows at same time. With this package we are able to break down the queries and distinguish its type so we know what function use for each query.

Finished.
Commit 770b06c

Wow! Thanks Max.

Good job Max!!!