Dart交互/访问数据库 [英] Dart interaction / access to database

查看:189
本文介绍了Dart交互/访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Dart(运行服务器端)如何访问数据库?



我可以直接执行SQL语句或使用某种ORM吗?

解决方案

目前没有针对Dart的数据库API与ODBC / JDBC相媲美,据我所知还没有ORM。将来肯定会有这样的事情,Dart SDK最终还是允许你绑定本地代码,使它更容易通过链接到现有的数据库库来提供数据库访问。



我自己目前在Dart使用 Riak 它的REST接口,它适用于小型应用程序,但对于更严重的情况,我们将等待更好的SDK支持。



注意数据库(如IndexDB和WebSQL)正在添加< a>立即 dart:html



更新:现在有一个 MongoDB 驱动程序,我们正在工作亚马逊DynamoDB



更新2:的驱动程序现在可用于 mysql postgresql 。 p>

How can Dart (running server side) access a database ?

Can I execute SQL-Statements directly or can I use some kind of ORM?

解决方案

Currently there is no Database API for Dart that rivals ODBC/JDBC, also to my knowledge there is no ORM. There will definitely be such a thing in the future, also the Dart SDK will eventually allow you to bind native code against it making it easier to provide database access by linking against existing database libraries.

I am myself currently using Riak on Dart via its REST interface, which works well for small applications but for something more serious we will have to await better SDK support.

Note: client side databases such as IndexDB and WebSQL are in the process of being added to dart:html right now.

Update: There is now a MongoDB driver and we are working on a driver for Amazon's DynamoDB

Update 2: Drivers are now available for mysql and postgresql.

这篇关于Dart交互/访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆