dart_mongo_lite

Creator: coderz1093

Last updated:

0 purchases

dart_mongo_lite Image
dart_mongo_lite Images

Languages

Categories

Add to Cart

Description:

dart mongo lite

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);
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.