dart_mongo_lite 0.0.3+3

Dart native
Flutter Android iOS

Dart MongoLite a library to use mongo, without a server.

A library for Dart developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage #

A simple usage example:

void main() {
  var db = Database('resources/db');

  var dialogsCollection = db['dialogs'];
  var triggersCollection = db['triggers'];

  print('Dropped ${dialogsCollection.drop()} dialogs');
  print('Dropped ${triggersCollection.drop()} triggers');

  dialogsCollection.insertMany([
    {'dialog': 'Ciao!'},
    {'dialog': 'Salve!'}
  ]);
  triggersCollection.insertMany([
    {'trigger': 'Ciao'},
    {'trigger': 'Salve'}
  ]);

  var dialog = dialogsCollection.findOneAs((d) => Dialog.fromJson(d), filter: {'dialog': 'Ciao!'});
  print(dialog.dialog);

  var trigger = triggersCollection.findOneAs((t) => Trigger.fromJson(t), filter: {'trigger': 'Salve'});
  print(trigger.trigger);
}
4
likes
70
pub points
51%
popularity

Dart MongoLite a library to use mongo, without a server.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

kaikyu.lotus@gmail.com

License

BSD (LICENSE)

More

Packages that depend on dart_mongo_lite