jaguar_docstore 0.0.1

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

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

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter 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

We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

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]
59 / 100
Overall score:
Weighted score of the above. [more]
41
Learn more about scoring.

Platforms

Detected platforms: Flutter, web, other

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

Suggestions

  • Homepage does not exists.

    We were unable to access https://github.com/Jaguar-dart/jaguar_docstore at the time of the analysis.

  • Package is getting outdated.

    The package was released 70 weeks ago.

  • 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.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 3 hints.

    Run dartfmt to format lib/src/expression.dart.

    Strong-mode analysis of lib/src/id.dart gave the following hint:

    line: 43 col: 19
    'UTF8' is deprecated and shouldn't be used.

    Similar analysis of the following files failed:

    • lib/src/index/index.dart (hint)
  • 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.7
more >=1.3.2 <2.0.0 1.9.0
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.10
meta 1.1.5
quiver_iterables 1.0.1
Dev dependencies
test >=0.12.0 <0.13.0