database_interface 1.0.0-dev.0
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 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';
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]
|
46
|
Overall:
Weighted score of the above.
[more]
|
39
|
We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.6.1
- pana: 0.12.21
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
.
Package is getting outdated. (-15.89 points)
The package was last published 60 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/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.