scientisst_db 0.0.1
scientisst_db: ^0.0.1 copied to clipboard
Simple and powerful NoSQL document-based local database.
scientisst_db #
Open source Flutter plugin that implements a NoSQL document-based local database. The syntax of this package is similar to others well-known databases, organizing its data in collections and documents.
Made by the ScientISST team.
Installation #
dependencies:
flutter:
sdk: flutter
scientisst_db: ^0.0.1
Architecture #
, which are stored in a folder inside the collections directory under the parent collection directory. This folder has the same filename as the document ObjectId and it follows the same collection structure.
Examples #
See the full example here. Some basic examples:
Add a document to a collection:
DocumentReference doc = await ScientISSTdb.instance.collection("movies").add(
{
"title": "Eternal Sunshine of the Spotless Mind",
"year": 2004,
"characters": [
"Joel",
"Clementine",
],
},
);
Update a document:
await doc.update(
{
"title": "Hello world",
},
);
Delete a document:
await ScientISSTdb.instance.collection("movies").document("507f1f77bcf86cd7994ca120").delete();
Get all documents from a collection:
await ScientISSTdb.instance.collection("movies").getDocuments();
Order documents by field value:
await ScientISSTdb.instance
.collection("movies")
.orderBy("year", ascending: false)
.getDocuments();
Future #
- Add parallel "database" for storing
Files; - Add
StreamofList<DocumentSnapshot>tocollectionso the user can watch for changes in the collectiondocuments; - Add a
Queryto limit thecollectionto the first N elements; - Improve the
Exceptionsthrown.
If you have any suggestion or problem, let us know and we'll try to improve or fix it.
License #
GNU General Public License v3.0, see the LICENSE.md file for details.