jaguar_serializer_mongo 0.2.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 72

Build Status

jaguar_serializer_mongo

Mongo serializer helpers for jaguar_serializer

Simple example

import 'package:mongo_dart/mongo_dart.dart';
import '../models/player/player.dart';

main() async {
  Db db = new Db('mongodb://localhost/jaguar_mongo_test');
  await db.open();

  try {
    DbCollection coll = db.collection('one');
    ObjectId id = new ObjectId();
    ObjectId allianceId = new ObjectId();

    Player player = new Player()
      ..id = id.toHexString()
      ..allianceId = allianceId.toHexString()
      ..name = 'KnightsOT'
      ..email = 'knightsot@example.com'
      ..age = 27
      ..score = 500000
      ..emailConfirmed = true;

    await coll.insert(Player.serializer.toMap(player));

    Map result = await coll.findOne(where.id(id));
    print(result);

    Player decoded = Player.serializer.fromMap(result);
    print(decoded);
  } finally {
    await db.drop();
    await db.close();
  }
}

Changelog

0.2.0

  • Moved to jaguar_serializer 0.5.x

0.1.0

  • Moved to jaguar_serializer 0.4.x

0.0.4

  • Added MgoAccess

0.0.3

  • Upgraded to jaguar_serializer 0.3.x

0.0.1

  • Initial version, created by Stagehand

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  jaguar_serializer_mongo: "^0.2.0"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:jaguar_serializer_mongo/jaguar_serializer_mongo.dart';
        
Version Uploaded Documentation Archive
0.2.0 Nov 3, 2017 Go to the documentation of jaguar_serializer_mongo 0.2.0 Download jaguar_serializer_mongo 0.2.0 archive
0.1.0 Sep 15, 2017 Go to the documentation of jaguar_serializer_mongo 0.1.0 Download jaguar_serializer_mongo 0.1.0 archive
0.0.5 Jun 6, 2017 Go to the documentation of jaguar_serializer_mongo 0.0.5 Download jaguar_serializer_mongo 0.0.5 archive
0.0.4 May 26, 2017 Go to the documentation of jaguar_serializer_mongo 0.0.4 Download jaguar_serializer_mongo 0.0.4 archive
0.0.3 May 4, 2017 Go to the documentation of jaguar_serializer_mongo 0.0.3 Download jaguar_serializer_mongo 0.0.3 archive
0.0.2 Mar 4, 2017 Go to the documentation of jaguar_serializer_mongo 0.0.2 Download jaguar_serializer_mongo 0.0.2 archive
0.0.1 Dec 23, 2016 Go to the documentation of jaguar_serializer_mongo 0.0.1 Download jaguar_serializer_mongo 0.0.1 archive

Analysis

This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • completed on Feb 3, 2018
  • Dart: 2.0.0-dev.20.0
  • pana: 0.10.1

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
44 / 100
Health:
Code health derived from static analysis. [more]
100 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
72

Platforms

Detected platforms: Flutter, other

Primary library: package:jaguar_serializer_mongo/jaguar_serializer_mongo.dart with components: io.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use jaguar_serializer_mongo.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.20.0 <2.0.0
jaguar_serializer ^0.5.1 0.5.1 1.0.0-dev1
mongo_dart ^0.3.0 0.3.1
Transitive dependencies
async 2.0.3
bson 0.3.0
charcode 1.1.1
collection 1.14.5
convert 2.0.1
crypto 2.0.2+1
fixnum 0.10.6
intl 0.15.2
logging 0.11.3+1
meta 1.1.2
mongo_dart_query 0.3.0
more 1.8.1
path 1.5.1
pool 1.3.4
quiver_iterables 1.0.1
source_span 1.4.0
stack_trace 1.9.1
string_scanner 1.0.2
typed_data 1.1.5
uuid 0.5.3
yaml 2.1.13
yamlicious 0.0.5
Dev dependencies
test >=0.12.0 <0.13.0