database_interface 1.0.0-dev.0

  • README.md
  • Installing
  • Versions
  • 42

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:


dependencies:
  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 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:database_interface/database_interface.dart';
  
Version Uploaded Documentation Archive
1.0.0-dev.0 Oct 9, 2018 Go to the documentation of database_interface 1.0.0-dev.0 Download database_interface 1.0.0-dev.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
62
Overall:
Weighted score of the above. [more]
42
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, web, other

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

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 CHANGELOG.md. (-20 points)

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

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/README.md.

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.

Dependencies

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.0.1
Transitive dependencies
matcher 0.12.4
meta 1.1.7
path 1.6.2
stack_trace 1.9.3
Dev dependencies
test ^1.0.0