database_interface 1.0.0-dev.0

pipeline status coverage report

Use this package to write compatible no sql database #

You will need to implement two class in order to have a compatible no sql database

The NoSqlDatabaseInterface #

For the Database we provide a NoSqlDatabaseInterface that allow you to do do action at differents step of the life of your database.

  • when a user open your database with the open() method
  • when a user close your database with the close() method
  • when a user want to open a collection with the collection('my_collection') method

You can find a fake no sql database here by it self this database does nothing. It just implement all the necessary method to be a valid database.

The CollectionInterface #

For the Collection we provide a CollectionInterface that allow you to do things on your collection like insert entry, update entry, etc

You can find a fake no sql collection here that interface does nothing but you get the idea.

How to deal with id #

Database has specific id to handle that we provide a class that must be used by the end user so it never deal with a database specific id. This class is DatabaseId just wrap a String where you can store the id of the specific database.

Use this package as a library

1. Depend on it

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

  database_interface: ^1.0.0-dev.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:database_interface/database_interface.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 Mar 31, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.6

Health suggestions

Fix lib/src/no_sql_interfaces.dart. (-1 points)

Analysis of lib/src/no_sql_interfaces.dart reported 2 hints:

line 64 col 23: Use = to separate a named parameter from its default value.

line 64 col 44: Use = to separate a named parameter from its default value.

Maintenance issues and suggestions

Provide a file named (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Package is getting outdated. (-47.40 points)

The package was last published 76 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and database_interface.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

Package is pre-release. (-5 points)

Pre-release versions should be used with caution; their API can change in breaking ways.

The package description is too short. (-3 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
conn_pool ^2.1.8 2.1.9
quiver ^2.0.0+1 2.1.3
Transitive dependencies
matcher 0.12.6
meta 1.1.8
path 1.6.4
stack_trace 1.9.3
Dev dependencies
test ^1.0.0