Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/HannesRammer/Dartabase
- Owner: HannesRammer
- License: bsd-2-clause
- Created: 2013-07-09T02:00:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-16T03:30:17.000Z (about 8 years ago)
- Last Synced: 2024-07-31T18:15:44.535Z (5 months ago)
- Language: Dart
- Homepage:
- Size: 9.76 MB
- Stars: 35
- Watchers: 6
- Forks: 6
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-dart - Dartabase - Database (Rails like) migration and model tool for MYSQL and PGSQL in Dart without having to write SQL.[<img src="https://travis-ci.org/dart-bridge/framework.svg?branch=master">](https://travis-ci.org/HannesRammer/Dartabase) (Libraries / Database)
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 SQLcreate 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 SQLeg.
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 ;)