[英]How to connect Dart to SQLite?
My old application used web2py with SQLite as the database. 我的旧应用程序使用带有SQLite的web2py作为数据库。 Now I want to try porting this app to Dart and again use SQLite as the database.
现在我想尝试将此应用程序移植到Dart并再次使用SQLite作为数据库。
I can't find any documentation on how to use it. 我找不到任何关于如何使用它的文档。 I just found out how to use MySQL with sqljocky.
我刚刚发现了如何使用MySQL和sqljocky。
I've tried to read the web_sql and indexed_db APIs, but I can't find a way to connect to SQLite. 我试图读取web_sql和indexed_db API,但我找不到连接到SQLite的方法。 How can I use SQLite from Dart?
我怎样才能使用Dart的SQLite?
As far as I can tell, dart-sqlite is the only public attempt at SQLite bindings for Dart, but it's out of date. 据我所知, dart-sqlite是针对Dart的SQLite绑定的唯一公开尝试,但它已经过时了。 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. web_sql
和indexed_db
都可以在浏览器中使用,据我所知,从你的问题来看,这不是你想要的。
Update: I updated dart-sqlite so that all the tests now pass, at least on my machine. 更新:我更新了dart-sqlite,以便所有测试现在都通过,至少在我的机器上。 You're definitely venturing into uncharted territory if you use it, but it's a start.
如果你使用它,你肯定冒险进入未知领域,但这是一个开始。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.