Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/HannesRammer/Dartabase

Database (Rails like) migration and model (ORM CRUD) and code generator (Scaffolding) tool working with MYSQL and PGSQL in Dart without having to write SQL
https://github.com/HannesRammer/Dartabase

Last synced: about 2 months ago
JSON representation

Database (Rails like) migration and model (ORM CRUD) and code generator (Scaffolding) tool working with MYSQL and PGSQL in Dart without having to write SQL

Awesome Lists containing this project

README

        

Dartabase Tools
===================

Model depends on Migration

![logo](https://raw.githubusercontent.com/HannesRammer/Dartabase/master/dartabase_migration/Database-Migration-Logo-150.png) [Dartabase Migration](http://pub.dartlang.org/packages/dartabase_migration) 1.x.x
--------------------
Dartabase Migration is for simple version controlled database structure manipulation
for MySQL or PGSQL without having to write SQL

create migration
![one](https://raw.githubusercontent.com/HannesRammer/Dartabase/master/dartabase_migration/doc/createColumn2.PNG)

migration view
![one](https://raw.githubusercontent.com/HannesRammer/Dartabase/master/dartabase_migration/doc/runMigration1.PNG)

migration view reverting to older version
![one](https://raw.githubusercontent.com/HannesRammer/Dartabase/master/dartabase_migration/doc/revertMigration2.PNG)

scaffolding
- generate classes, server and client files from database with a single click

![logo](https://raw.githubusercontent.com/HannesRammer/Dartabase/master/dartabase_model/Database-Model-Logo-new-150.png) [Dartabase Model](http://pub.dartlang.org/packages/dartabase_model) 1.x.x
--------------------
Dartabase Models is for simple data manipulation and builds on Migration
for MySQL or PGSQL without having to write SQL

eg.
if you have a class named WebLanguage

class WebLanguage extends Model{
num id;// database column autogenerated by migration
String name;
bool is_cool;
DateTime created_at;// database column autogenerated by migration
DateTime updated_at;// database column autogenerated by migration
}

to update a single database object:

WebLanguage WLDB = new WebLanguage();
WebLanguage webLanguage = await WLDB.findBy("name","javascript");
if(webLanguage != null){
webLanguage.name = "dart";
webLanguage.is_cool = true;
webLanguage.save();
}

available methods are

Future save()
Future findBy(String column,var value)
Future findById(var id)
Future findAllBy(String column, var value)
Future findAll()
Future delete()

relations:
Future receive(object)
Future hasOne(object)
Future hasMany(object)
Future hasOneWith(object,String column,String value)
Future hasManyWith(object,String column,String value)
Future remove(object)


ENJOY & BE NICE ;)