2018-08-24 14:18:43 +00:00
|
|
|
const Orm mongoDBOrm = const Orm(OrmType.mongoDB);
|
|
|
|
|
|
|
|
const Orm rethinkDBOrm = const Orm(OrmType.rethinkDB);
|
|
|
|
|
|
|
|
const Orm postgreSqlOrm = const Orm(OrmType.postgreSql);
|
|
|
|
|
|
|
|
const Orm mySqlOrm = const Orm(OrmType.mySql);
|
2017-12-07 08:21:49 +00:00
|
|
|
|
2018-08-24 14:17:12 +00:00
|
|
|
class Orm {
|
2018-08-24 14:18:43 +00:00
|
|
|
final OrmType type;
|
2018-08-24 12:30:38 +00:00
|
|
|
final String tableName;
|
|
|
|
|
2018-08-24 14:18:43 +00:00
|
|
|
const Orm(this.type, {this.tableName});
|
2018-08-24 14:17:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
enum OrmType {
|
|
|
|
mongoDB,
|
|
|
|
rethinkDB,
|
|
|
|
mySql,
|
|
|
|
postgreSql,
|
2017-06-18 04:19:05 +00:00
|
|
|
}
|
|
|
|
|
2018-08-24 12:30:38 +00:00
|
|
|
class CanJoin {
|
2017-12-07 08:21:49 +00:00
|
|
|
final Type type;
|
2018-08-24 12:30:38 +00:00
|
|
|
final String foreignKey;
|
2018-05-04 03:51:17 +00:00
|
|
|
final JoinType joinType;
|
|
|
|
|
2018-08-24 12:30:38 +00:00
|
|
|
const CanJoin(this.type, this.foreignKey, {this.joinType: JoinType.full});
|
2018-05-04 03:51:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// The various types of [Join].
|
|
|
|
enum JoinType { join, left, right, full, self }
|