Dart语言的数据库ORM框架:DartORM

jopen 10年前

DartORM是一个易于使用和易于安装的Dart语言的数据库ORM框架。

查找记录

Package dart_orm/orm.dart has two classes for finding records: Find and FindOne.

Constructors receives a class that extends OrmModel.

// Find and FindOne classes are here  import 'package:dart_orm/orm.dart';  // Sql construction helpers such as EqualsSQL are here  import 'package:dart_orm/sql.dart';    Find f = new Find(User)    ..where(new LowerThanSQL('id', 3)      .and(new EqualsSQL('givenName', 'Sergey')        .or(new EqualsSQL('familyName', 'Ustimenko'))      )    )    ..orderBy('id', 'DESC')    ..limit(10);      return f.execute(); // returns Future<OrmModel>

项目主页:http://www.open-open.com/lib/view/home/1418373560355