jaguar_docstore 0.0.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 0

jaguar_docstore

In-memory document store for Dart

Usage

A simple usage example:

TODO

  • [ ] Insert
  • [ ] Query equal
  • [ ] Query relational
  • [ ] Query logical
  • [ ] Delete
  • [ ] Update
  • [ ] Sub documents
  • [ ] Arrays

Features and bugs

Please file feature requests and bugs at the issue tracker.

Changelog

0.0.1

  • Initial version, created by Stagehand

example/jaguar_docstore_example.dart

// Copyright (c) 2017, Ravi Teja Gudapati. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:jaguar_docstore/jaguar_docstore.dart';

class Player {
  String id;

  String name;

  String email;

  int hitpoints;

  Map<String, dynamic> toMap() => {
        'name': name,
        'email': email,
        'hitpoints': hitpoints,
      };
}

main() async {
  final Collection players = new CollectionInMem();
  players.ensureIndex([new IndexSetting('email')]);

  String plId1;
  String plId2;
  {
    Player pl1 = new Player()
      ..name = 'player1'
      ..email = 'player1@example.com'
      ..hitpoints = 99;
    plId1 = await players.insert(pl1.toMap());
    print(plId1);
  }

  {
    Player pl2 = new Player()
      ..name = 'player2'
      ..email = 'player2@example.com'
      ..hitpoints = 50;
    plId2 = await players.insert(pl2.toMap());
    print(plId2);
  }

  {
    final Map<String, dynamic> got = await players.findById(plId1);
    print(got);
  }

  {
    final Map<String, dynamic> got = await players
        .findOne(new RelationalCondition('email', 'player2@example.com'));
    print(got);
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  jaguar_docstore: ^0.0.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:jaguar_docstore/jaguar_docstore.dart';
  
Version Uploaded Documentation Archive
0.0.1 Feb 13, 2017 Go to the documentation of jaguar_docstore 0.0.1 Download jaguar_docstore 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
0
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0