dart_sql 0.0.7 copy "dart_sql: ^0.0.7" to clipboard
dart_sql: ^0.0.7 copied to clipboard

A declarative front end for SQL libries like moor:ffi that enables you to construct SQL queries using Dart syntax.

example/main.dart

import 'package:dart_sql/dart_sql.dart';

void main() {
  // SELECT * FROM aircraft
  SQL.select().from('aircraft').toString();

  // SELECT id, model, year FROM aircraft
  SQL.select(['id', 'model', 'year']).from('aircraft').toString();

  // INSERT INTO aircraft (model, year) VALUES ("SR22", "2014")
  Map<String, dynamic> values = {"model": "SR22", "year": "2014"};
  SQL.insert().into('aircraft').values(values).toString();

  // DELETE FROM aircraft WHERE model = "SR22"'
  SQL.delete().from('aircraft').where('model').eq("SR22").toString();
}
19
likes
30
pub points
0%
popularity

Publisher

verified publisheraeyrium.com

A declarative front end for SQL libries like moor:ffi that enables you to construct SQL queries using Dart syntax.

Homepage

License

MIT (license)

More

Packages that depend on dart_sql