objectdb 0.1.2 copy "objectdb: ^0.1.2" to clipboard
objectdb: ^0.1.2 copied to clipboard

outdatedDart 1 only

Persistent embedded document-oriented NoSQL database for Dart and Flutter. 100% Dart.

example/main.dart

import 'dart:io';
import 'package:objectdb/objectdb.dart';

void main() async {
  // open db
  var db = ObjectDB('/some/path/to/file.db');
  db.open();

  // insert documents
  var ids = await db.insertMany([
    {
      "name": {"first": "Maria", "last": "Smith"},
      "age": 20,
      "active": false
    },
    {
      "name": {"first": "James", "last": "Jones"},
      "age": 32,
      "active": false
    },
  ]);

  // update documents
  db.update({"name.first": "Maria"}, {"active": true});

  // remove documents
  db.remove({
    Op.inList: {
      "name.last": ["Jones", "Miller", "Wilson"]
    },
    "active": false,
  });

  // find documents
  print(await db.find({
    Op.lte: {"age": 30}
  }));

  // close db
  await db.close();
}
112
likes
0
pub points
85%
popularity

Publisher

unverified uploader

Persistent embedded document-oriented NoSQL database for Dart and Flutter. 100% Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

bson_objectid, execution_queue

More

Packages that depend on objectdb