diff --git a/angel_orm_generator/pubspec.yaml b/angel_orm_generator/pubspec.yaml index edc511b2..f0a72467 100644 --- a/angel_orm_generator/pubspec.yaml +++ b/angel_orm_generator/pubspec.yaml @@ -24,4 +24,5 @@ dev_dependencies: #angel_migration: ^1.0.0-alpha #angel_test: ^1.0.0 build_runner: ^0.10.0 + postgres: ^1.0.0 test: ^1.0.0 diff --git a/angel_orm_generator/test/models/author.orm.g.dart b/angel_orm_generator/test/models/author.orm.g.dart index c4dc33e4..ce84f481 100644 --- a/angel_orm_generator/test/models/author.orm.g.dart +++ b/angel_orm_generator/test/models/author.orm.g.dart @@ -4,11 +4,15 @@ // OrmGenerator // ************************************************************************** -import 'dart:async'; import 'author.dart'; +import 'dart:async'; +import 'package:postgres/postgres.dart'; part 'author.postgresql.orm.g.dart'; abstract class AuthorOrm { + factory AuthorOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlAuthorOrmImpl; + Future> getAll(); Future getById(id); Future update(Author model); diff --git a/angel_orm_generator/test/models/author.postgresql.orm.g.dart b/angel_orm_generator/test/models/author.postgresql.orm.g.dart index f773ee93..2e2cf53d 100644 --- a/angel_orm_generator/test/models/author.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/author.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'author.orm.g.dart'; + +class _PostgreSqlAuthorOrmImpl implements AuthorOrm { + _PostgreSqlAuthorOrmImpl(this.connection); + + final PostgreSQLConnection connection; +} diff --git a/angel_orm_generator/test/models/car.orm.g.dart b/angel_orm_generator/test/models/car.orm.g.dart index 8d9bdd5c..04d65f2a 100644 --- a/angel_orm_generator/test/models/car.orm.g.dart +++ b/angel_orm_generator/test/models/car.orm.g.dart @@ -4,11 +4,15 @@ // OrmGenerator // ************************************************************************** -import 'dart:async'; import 'car.dart'; +import 'dart:async'; +import 'package:postgres/postgres.dart'; part 'car.postgresql.orm.g.dart'; abstract class CarOrm { + factory CarOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlCarOrmImpl; + Future> getAll(); Future getById(id); Future update(Car model); diff --git a/angel_orm_generator/test/models/car.postgresql.orm.g.dart b/angel_orm_generator/test/models/car.postgresql.orm.g.dart index 84553888..dbfcba26 100644 --- a/angel_orm_generator/test/models/car.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/car.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'car.orm.g.dart'; + +class _PostgreSqlCarOrmImpl implements CarOrm { + _PostgreSqlCarOrmImpl(this.connection); + + final PostgreSQLConnection connection; +} diff --git a/angel_orm_generator/test/models/customer.orm.g.dart b/angel_orm_generator/test/models/customer.orm.g.dart index 50a06c61..920ac895 100644 --- a/angel_orm_generator/test/models/customer.orm.g.dart +++ b/angel_orm_generator/test/models/customer.orm.g.dart @@ -4,11 +4,15 @@ // OrmGenerator // ************************************************************************** -import 'dart:async'; import 'customer.dart'; +import 'dart:async'; +import 'package:postgres/postgres.dart'; part 'customer.postgresql.orm.g.dart'; abstract class CustomerOrm { + factory CustomerOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlCustomerOrmImpl; + Future> getAll(); Future getById(id); Future update(Customer model); diff --git a/angel_orm_generator/test/models/customer.postgresql.orm.g.dart b/angel_orm_generator/test/models/customer.postgresql.orm.g.dart index dca5d807..eebc7d63 100644 --- a/angel_orm_generator/test/models/customer.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/customer.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'customer.orm.g.dart'; + +class _PostgreSqlCustomerOrmImpl implements CustomerOrm { + _PostgreSqlCustomerOrmImpl(this.connection); + + final PostgreSQLConnection connection; +} diff --git a/angel_orm_generator/test/models/foot.orm.g.dart b/angel_orm_generator/test/models/foot.orm.g.dart index 4310abda..5db6a72f 100644 --- a/angel_orm_generator/test/models/foot.orm.g.dart +++ b/angel_orm_generator/test/models/foot.orm.g.dart @@ -6,9 +6,13 @@ import 'dart:async'; import 'foot.dart'; +import 'package:postgres/postgres.dart'; part 'foot.postgresql.orm.g.dart'; abstract class FootOrm { + factory FootOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlFootOrmImpl; + Future> getAll(); Future getById(id); Future update(Foot model); diff --git a/angel_orm_generator/test/models/foot.postgresql.orm.g.dart b/angel_orm_generator/test/models/foot.postgresql.orm.g.dart index 7d098823..34518882 100644 --- a/angel_orm_generator/test/models/foot.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/foot.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'foot.orm.g.dart'; + +class _PostgreSqlFootOrmImpl implements FootOrm { + _PostgreSqlFootOrmImpl(this.connection); + + final PostgreSQLConnection connection; +} diff --git a/angel_orm_generator/test/models/fruit.orm.g.dart b/angel_orm_generator/test/models/fruit.orm.g.dart index 482ab1fc..a94c0f08 100644 --- a/angel_orm_generator/test/models/fruit.orm.g.dart +++ b/angel_orm_generator/test/models/fruit.orm.g.dart @@ -6,9 +6,13 @@ import 'dart:async'; import 'fruit.dart'; +import 'package:postgres/postgres.dart'; part 'fruit.postgresql.orm.g.dart'; abstract class FruitOrm { + factory FruitOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlFruitOrmImpl; + Future> getAll(); Future getById(id); Future update(Fruit model); diff --git a/angel_orm_generator/test/models/fruit.postgresql.orm.g.dart b/angel_orm_generator/test/models/fruit.postgresql.orm.g.dart index 90a97017..3448a9f7 100644 --- a/angel_orm_generator/test/models/fruit.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/fruit.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'fruit.orm.g.dart'; + +class _PostgreSqlFruitOrmImpl implements FruitOrm { + _PostgreSqlFruitOrmImpl(this.connection); + + final PostgreSQLConnection connection; +} diff --git a/angel_orm_generator/test/models/order.orm.g.dart b/angel_orm_generator/test/models/order.orm.g.dart index 14fec042..655bd757 100644 --- a/angel_orm_generator/test/models/order.orm.g.dart +++ b/angel_orm_generator/test/models/order.orm.g.dart @@ -6,9 +6,13 @@ import 'dart:async'; import 'order.dart'; +import 'package:postgres/postgres.dart'; part 'order.postgresql.orm.g.dart'; abstract class OrderOrm { + factory OrderOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlOrderOrmImpl; + Future> getAll(); Future getById(id); Future update(Order model); diff --git a/angel_orm_generator/test/models/order.postgresql.orm.g.dart b/angel_orm_generator/test/models/order.postgresql.orm.g.dart index a0e77733..d1e03bdd 100644 --- a/angel_orm_generator/test/models/order.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/order.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'order.orm.g.dart'; + +class _PostgreSqlOrderOrmImpl implements OrderOrm { + _PostgreSqlOrderOrmImpl(this.connection); + + final PostgreSQLConnection connection; +} diff --git a/angel_orm_generator/test/models/role.orm.g.dart b/angel_orm_generator/test/models/role.orm.g.dart index 60ed45e4..0e5ddfd3 100644 --- a/angel_orm_generator/test/models/role.orm.g.dart +++ b/angel_orm_generator/test/models/role.orm.g.dart @@ -5,10 +5,14 @@ // ************************************************************************** import 'dart:async'; +import 'package:postgres/postgres.dart'; import 'role.dart'; part 'role.postgresql.orm.g.dart'; abstract class RoleOrm { + factory RoleOrm.postgreSql(PostgreSQLConnection connection) = + _PostgreSqlRoleOrmImpl; + Future> getAll(); Future getById(id); Future update(Role model); diff --git a/angel_orm_generator/test/models/role.postgresql.orm.g.dart b/angel_orm_generator/test/models/role.postgresql.orm.g.dart index 5af86685..f8a8bcef 100644 --- a/angel_orm_generator/test/models/role.postgresql.orm.g.dart +++ b/angel_orm_generator/test/models/role.postgresql.orm.g.dart @@ -5,3 +5,9 @@ // ************************************************************************** part of 'role.orm.g.dart'; + +class _PostgreSqlRoleOrmImpl implements RoleOrm { + _PostgreSqlRoleOrmImpl(this.connection); + + final PostgreSQLConnection connection; +}