Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart interaction / access to database

Tags:

html

dart

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

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

like image 441
Gero Avatar asked Mar 04 '12 19:03

Gero


1 Answers

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.

like image 144
Lars Tackmann Avatar answered Oct 13 '22 00:10

Lars Tackmann