简体   繁体   中英

How to connect Dart to SQLite?

My old application used web2py with SQLite as the database. Now I want to try porting this app to Dart and again use SQLite as the database.

I can't find any documentation on how to use it. I just found out how to use MySQL with sqljocky.

I've tried to read the web_sql and indexed_db APIs, but I can't find a way to connect to SQLite. How can I use SQLite from Dart?

As far as I can tell, dart-sqlite is the only public attempt at SQLite bindings for Dart, but it's out of date. My guess is that it would actually be pretty easy to update the code and get it up-and-running.

web_sql and indexed_db are both for use in the browser, which, as far as I can tell from your question, isn't what you're looking for.

Update: I updated dart-sqlite so that all the tests now pass, at least on my machine. You're definitely venturing into uncharted territory if you use it, but it's a start.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM