jaguar_docstore 0.0.1

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

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);
  }
}

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

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_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

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]
0 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
50

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:jaguar_docstore/jaguar_docstore.dart.

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.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.8.0 <2.0.0
fixnum >=0.9.0 <2.0.0 0.10.6
more >=1.3.2 <2.0.0 1.8.1
multibtree >=0.0.1 <0.1.0 0.0.3
quiver_check >=1.0.0 <1.1.0 1.0.0
quiver_collection >=1.0.0 <1.1.0 1.0.0
tuple >=0.4.0 <0.5.0 0.4.0 1.0.1
Transitive dependencies
collection 1.14.5
meta 1.1.2
quiver_iterables 1.0.1
Dev dependencies
test >=0.12.0 <0.13.0