Simple way to manage database.

Overview

database_manager (Developer Preview)

pub package Donate

Simple way to manage database. Version control and application's database schema. Simplify CRUD operations.

Installing

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

dependencies:
  database_manager: "^0.0.4"

Sqlite, Path and Path Provider dependencies must be installed.

Available features

  • Migration - version control and application's database schema
  • ORM - simplify CRUD operations

Simple usage

Migration

import 'package:database_manager/database_manager.dart';

class Table implements Migration {
  @override
  void up() {
    Schema.create('table', (Blueprint table) {
      table.integer('id').autoIncrement();
      table.string('name').nullable();
      table.string('email').unique();
      table.unsignedInteger('active').defaultValue(1);
    });    
  }
  @override
  void down() {
    Schema.dropIfExists('table');
  }
}

Model

import 'package:database_manager/database_manager.dart';
import 'database/migration/table.dart';

class TableModel extends ORMModel {
  @override
  final String databaseName = 'test';
  @override
  final int databaseVersion = 1;

  @override
  List<Migration> migration() {
    return [Table1()];
  }
}

Usage

import 'model/table_model.dart';

TableModel table = TableModel();

final List<Map<String, dynamic>> lst = [];
for (int i = 0; i < 1000; i++) lst.add({'name': 'marios', 'email': 'email$i@email.com'});

List ids = await table   
  .insert(lst, noResult: true, continueOnError: false)
  .catchError((e) => print(e));
   
print(ids);

table.get(['name','email']).then((r) => print(r) );

Migration parameters

PropName Description default value
attribute description value

Donate

It takes time to carry on this project. If you found it useful or learned something from the source code please consider the idea of donating 5, 20, 50 € or whatever you can to support the project.

  • Donate

Issues

If you encounter problems, open an issue. Pull request are also welcome.

You might also like...

A Food Ordering App made with Flutter, node and using MySQL Database

A Food Ordering App made with Flutter, node and using MySQL Database

Flutter Food ordering App We have made a food ordering system. It will help the restaurant to do all the functionalities more accurately and in a fast

Dec 26, 2022

Todo Flutter application with sqflite as a local database and bloc state management.

Todo Flutter application with sqflite as a local database and bloc state management.

Todo App A Flutter application developed to add todo tasks and handles it I used Sqflite as a local database to store all the tasks I used flutter_sli

Oct 17, 2022

Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service.

Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service.

chat_app Third Flutter Project to practice. A chat app, which uses Firebase as auth and database service. Resource video 0.1 Sign In and Register page

Oct 4, 2021

Keeper App made in Flutter with Sqlite database

 Keeper App made in Flutter with Sqlite database

Keeper App made in Flutter with Sqlite database This is a note taking / keeper app made with flutter. Concepts used: Sqlite database to store custom N

Oct 21, 2022

A Flutter Mobil App for showing Movies from the Movie Database

movies_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if th

Nov 3, 2021

Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Moving Pictures Moving Pictures is a mobile application built with the Flutter SDK for Android and iOS. It’s an application that gets the information

Jan 7, 2023

Super Fast Cross Platform Database for Flutter & Web Apps

Super Fast Cross Platform Database for Flutter & Web Apps

Isar Database 🚧 Alpha version - Use with care. 🚧 Quickstart β€’ Documentation β€’ Sample Apps β€’ Support & Ideas β€’ Pub.dev Isar [ee-zahr]: River in Bavar

Jan 1, 2023

We are building an open database of COVID-19 cases with chest X-ray or CT images.

We are building an open database of COVID-19 cases with chest X-ray or CT images.

πŸ›‘ Note: please do not claim diagnostic performance of a model without a clinical study! This is not a kaggle competition dataset. Please read this pa

Jan 7, 2023

Fetch Data from mysql database with php api

Fetch Data from mysql database with php api

dept_emp_data A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if

Mar 5, 2021
Owner
Antonino Di Natale
Antonino Di Natale
A simple Flutter Note Taking app with local database.

Flutter Simple & Lightweight Note App Flutter Simple & Lightweight Note App UI/UX Credit: https://dribbble.com/shots/11875872-A-simple-and-lightweight

Ahmad Amin 63 Nov 10, 2022
Simple URL-shorter written in Dart with Notion as a database

Tuda A simple URL-shorter service written in pure Dart. With Notion as a database, it provides the simplest interface for setting your links. Environm

Parabola 8 Aug 19, 2022
Manage desktop space easily with this simple Flutter app.

dspace A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this i

null 0 Nov 12, 2021
A simple flutter app to manage the score in a match of darts

DartCounter An application to keep track of a Dart match It is currently made for Windows-only use, but you can build it for any Platform if you want,

bafto 1 Jun 1, 2022
Create a simple way to keep track of weekly expenses with flutter

Expenses app The purpose of this app is to create a simple way to keep track of weekly expenses UI Getting Started This project is a starting point fo

Murilo Benassi 2 Jul 26, 2022
cosmic_frontmatter is a package that provides a simple way to parse the frontmatter of a markdown file.

cosmic_frontmatter cosmic_frontmatter is a package that provides a simple way to parse the frontmatter of a markdown file. Getting started To get star

cosmic.horse 9 Oct 26, 2022
small package to generate code in a simple way

PART OF QUEEN PACKAGES ?? Dart File Builder Motivation generating dart code with build_runner will not work if you are trying to convert json to dart

FlutterQueen 3 Sep 24, 2022
Provide easy and flexible way to show SnackBar. Simple text, undo, and error style are supported.

snack_bar_presenter Provide easy and flexible way to show SnackBar. Simple text, undo, and error style are supported. . . . Usage import 'package:exam

Masayuki Ono (mono) 8 Nov 30, 2020
This plugin lets you show a message in a simple way.

error_message This plugin lets you show a message in a simple way. Usage ErrorMessage( icon: Icon(Icons.error), title: "Error Title",

TamilKannan-Developer 0 Dec 5, 2021
Fully functional Twitter clone built in flutter framework using Firebase realtime database and storage

Fwitter - Twitter clone in flutter A working Twitter clone written in Flutter using Firebase auth,realtime,firestore database and storage. Download Ap

Sonu Sharma 2.4k Jan 8, 2023