Commit c42ed8ee authored by kevin's avatar kevin

Merge branch 'update_link' into 'master'

update link in readme

See merge request santetis/open-source/database_interface!8
parents a6385619 07171698
Pipeline #35127959 passed with stage
in 1 minute and 44 seconds
[![pipeline status](https://gitlab.com/santetis/database_interface/badges/master/pipeline.svg)](https://gitlab.com/santetis/database_interface/commits/master)
[![coverage report](https://gitlab.com/santetis/database_interface/badges/master/coverage.svg)](https://gitlab.com/santetis/database_interface/commits/master)
[![pipeline status](https://gitlab.com/santetis/open-source/database_interface/badges/master/pipeline.svg)](https://gitlab.com/santetis/open-source/database_interface/commits/master)
[![coverage report](https://gitlab.com/santetis/open-source/database_interface/badges/master/coverage.svg)](https://gitlab.com/santetis/open-source/database_interface/commits/master)
# 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](https://gitlab.com/santetis/database_interface/blob/master/lib/src/no_sql_interfaces.dart#L58) that allow you to do do action at differents step of the life of your database.
For the Database we provide a [NoSqlDatabaseInterface](https://gitlab.com/santetis/open-source/database_interface/blob/master/lib/src/no_sql_interfaces.dart#L58) 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](https://gitlab.com/santetis/database_interface/blob/master/test/src/fake_no_sql_database.dart#L28)
You can find a fake no sql database [here](https://gitlab.com/santetis/open-source/database_interface/blob/master/test/src/fake_no_sql_database.dart#L28)
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](https://gitlab.com/santetis/database_interface/blob/master/lib/src/no_sql_interfaces.dart#L7) that allow you to do things on your collection like insert entry, update entry, etc
For the Collection we provide a [CollectionInterface](https://gitlab.com/santetis/open-source/database_interface/blob/master/lib/src/no_sql_interfaces.dart#L7) that allow you to do things on your collection like insert entry, update entry, etc
You can find a fake no sql collection [here](https://gitlab.com/santetis/database_interface/blob/master/test/src/fake_no_sql_database.dart#L5) that interface does nothing but you get the idea.
You can find a fake no sql collection [here](https://gitlab.com/santetis/open-source/database_interface/blob/master/test/src/fake_no_sql_database.dart#L5) 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](https://gitlab.com/santetis/database_interface/blob/master/lib/src/no_sql_interfaces.dart#L35) just wrap a String where you can store the id of the specific database.
This class is [DatabaseId](https://gitlab.com/santetis/open-source/database_interface/blob/master/lib/src/no_sql_interfaces.dart#L35) just wrap a String where you can store the id of the specific database.
......@@ -2,7 +2,7 @@ name: database_interface
description: A package that provide interface to create/wrap database.
version: 1.0.0-dev.0
author: Kevin Segaud <segaud.kevin@gmail.com>
homepage: https://gitlab.com/rushio-consulting/database_interface
homepage: https://gitlab.com/santetis/open-source/database_interface
environment:
sdk: '>=2.0.0 <3.0.0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment