moor_ffi 0.1.0-dev.1 copy "moor_ffi: ^0.1.0-dev.1" to clipboard
moor_ffi: ^0.1.0-dev.1 copied to clipboard

discontinued
outdated

Provides sqlite bindings using dart:ffi, including a moor executor

example/main.dart

import 'package:moor_ffi/database.dart';

const _createTable = r''' 
CREATE TABLE frameworks (
  id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  name VARCHAR NOT NULL
);
''';

void main() {
  final db = Database.memory();
  db.execute(_createTable);

  final insertStmt = db.prepare('INSERT INTO frameworks(name) VALUES (?)');
  insertStmt.execute(['Flutter']);
  insertStmt.execute(['AngularDart']);
  insertStmt.close();

  final selectStmt = db.prepare('SELECT * FROM frameworks ORDER BY name');
  final result = selectStmt.select();
  for (var row in result) {
    print('${row['id']}: ${row['name']}');
  }

  selectStmt.close();
  db.close();
}
29
likes
0
pub points
72%
popularity

Publisher

verified publishersimonbinder.eu

Provides sqlite bindings using dart:ffi, including a moor executor

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection, ffi, moor

More

Packages that depend on moor_ffi