box 0.3.3+1
box: ^0.3.3+1 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});
}
3
likes
110
pub points
62%
popularity

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