box 0.3.7 copy "box: ^0.3.7" to clipboard
box: ^0.3.7 copied to clipboard

A fluent Dart persistence API inspired by SQL that supports PostgreSQL, MongoDB, simple file and in-memory storage.

example/example.dart

import 'package:box/box.dart';

part 'example.g.dart';

void main() async {
  var registry = Registry()..register(User$BoxSupport());
  var box = FileBox('.box/test', registry);

  var users = await box
      .selectFrom<User>()
      .where('name')
      .like('C%')
      .orderBy('name')
      .ascending()
      .list();

  users.forEach((user) => print(user.name));
}

@entity
class User {
  @key
  final String id;
  final String name;
  final String email;

  User({required this.id, required this.name, required this.email});
}
11
likes
110
pub points
65%
popularity

Publisher

unverified uploader

A fluent Dart persistence API inspired by SQL that supports PostgreSQL, MongoDB, simple file and in-memory storage.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

collection, googleapis_auth, http, io, meta, mongo_dart, postgres, recase

More

Packages that depend on box