dartivity_database 1.0.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 40

dartivity_database #

This package provides the database component of the Dartivity suite of IOT monitoring and control packages.

The database component consists of both Dartivity entity definition classes and the database classes which use them. This allows the database classes to be specialised for any particular usage such as the resource database class which provides general database facilities for the Dartivity resource class.

Underlying the database classes are database driver classes that perform the function of interfacing with a specific database. Currently only one database driver is supported, for CouchDb. CouchDb gives an efficient, scalable NoSql database solution that supports full redundancy and replication facilities. This allows historic data such as events etc. to be handled seperately from current live data giving better access to such data.

This structure allows different database architectures to be used should future requirements call for this, for example Googles Cloud Datastore or even a traditional SQL database such as MariaDb.

The database component can be used anywhere in the Dartivity suite, by Dartivity clients for discovered resource handling and event handling and by the Dartivity Control front end web application for access to resource parameters, events etc.

Note that in this release only resource handling is supported, please refer to the individual class descriptions for more specific details and the test suite for usage examples.

1.0.0 #

1.0.0, Dart 2.0 updates

0.3.0 #

Add a bulk insert method to the cache

0.2.0 #

Issue 1 and cache class method additions

0.1.0 #

  • Initial version


 * Package : dartivity_database
 * Author : S. Hamblett <steve.hamblett@linux.com>
 * Date   : 04/09/2018
 * Copyright :  S.Hamblett 2018

/// This package is a plugin/support package for the Dartivity IOT suite,
/// as such it has no specific standalone usage examples. See the test
/// suite for instantiation details.
int main() {
  return 0;

Use this package as a library

1. Depend on it

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

  dartivity_database: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:dartivity_database/dartivity_database.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 9, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21

Health suggestions

Fix lib/src/databases/dartivity_resource_database.dart. (-7.71 points)

Analysis of lib/src/databases/dartivity_resource_database.dart reported 16 hints, including:

line 17 col 8: Don't explicitly initialize variables to null.

line 17 col 32: Don't explicitly initialize variables to null.

line 18 col 11: Unnecessary new keyword.

line 40 col 9: Unnecessary new keyword.

line 45 col 37: Unnecessary new keyword.

Fix lib/src/drivers/dartivity_database_couchdb.dart. (-6.78 points)

Analysis of lib/src/drivers/dartivity_database_couchdb.dart reported 14 hints, including:

line 18 col 8: Don't explicitly initialize variables to null.

line 18 col 32: Don't explicitly initialize variables to null.

line 19 col 13: Unnecessary new keyword.

line 23 col 7: DO use curly braces for all flow control structures.

line 25 col 17: Unnecessary new keyword.

Fix lib/src/entities/dartivity_resource.dart. (-1.99 points)

Analysis of lib/src/entities/dartivity_resource.dart reported 4 hints:

line 31 col 15: Unnecessary new keyword.

line 40 col 17: Unnecessary new keyword.

line 41 col 15: Unnecessary new keyword.

line 85 col 25: Unnecessary new keyword.

Fix lib/src/entities/dartivity_iotivity_resource.dart. (-1 points)

Analysis of lib/src/entities/dartivity_iotivity_resource.dart reported 2 hints:

line 93 col 44: Unnecessary new keyword.

line 113 col 12: Unnecessary new keyword.

Fix lib/src/databases/dartivity_cache.dart. (-0.50 points)

Analysis of lib/src/databases/dartivity_cache.dart reported 1 hint:

line 19 col 14: Unnecessary new keyword.

Maintenance suggestions

Package is getting outdated. (-26.30 points)

The package was last published 65 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
crypto >=2.0.1 <3.0.0 2.1.4
json_object_lite ^2.0.0 2.1.0
wilt >=4.0.0 <=5.0.0 4.0.3
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
http 0.12.0+2
http_parser 3.1.3
meta 1.1.8
path 1.6.4
pedantic 1.9.0
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner ^0.10.0
build_test ^0.10.2
build_web_compilers ^0.4.0
coverage ^0.12.2
dart_style ^1.1.3
dartdoc ^0.20.3
test ^1.3.0