diff --git a/angel_orm_postgres/CHANGELOG.md b/angel_orm_postgres/CHANGELOG.md index 7bb2f55f..53b4614b 100644 --- a/angel_orm_postgres/CHANGELOG.md +++ b/angel_orm_postgres/CHANGELOG.md @@ -1,2 +1,5 @@ -# 1.0.0-alpha +# 1.0.0-dev.1 +* Changes to work with `package:angel_orm@2.0.0-dev.15`. + +# 1.0.0-dev * First version. \ No newline at end of file diff --git a/angel_orm_postgres/example/main.dart b/angel_orm_postgres/example/main.dart index c6db9cff..dc62f987 100644 --- a/angel_orm_postgres/example/main.dart +++ b/angel_orm_postgres/example/main.dart @@ -7,6 +7,6 @@ main() async { return new PostgreSQLConnection('localhost', 5432, 'angel_orm_test'); }); - var rows = await executor.query('SELECT * FROM users'); + var rows = await executor.query('SELECT * FROM users', {}); print(rows); } diff --git a/angel_orm_postgres/lib/angel_orm_postgres.dart b/angel_orm_postgres/lib/angel_orm_postgres.dart index 524fcf57..cf9d80e7 100644 --- a/angel_orm_postgres/lib/angel_orm_postgres.dart +++ b/angel_orm_postgres/lib/angel_orm_postgres.dart @@ -13,14 +13,16 @@ class PostgreSQLExecutor extends QueryExecutor { Future close() => (connection as PostgreSQLConnection).close(); @override - Future> query(String query, [List returningFields]) { + Future> query( + String query, Map substitutionValues, + [List returningFields]) { if (returningFields != null) { var fields = returningFields.join(', '); var returning = 'RETURNING $fields'; query = '$query $returning'; } - return connection.query(query); + return connection.query(query, substitutionValues: substitutionValues); } @override @@ -78,10 +80,12 @@ class PostgreSQLExecutorPool extends QueryExecutor { } @override - Future> query(String query, [List returningFields]) { + Future> query( + String query, Map substitutionValues, + [List returningFields]) { return _pool.withResource(() async { var executor = await _next(); - return executor.query(query, returningFields); + return executor.query(query, substitutionValues, returningFields); }); } diff --git a/angel_orm_postgres/pubspec.yaml b/angel_orm_postgres/pubspec.yaml index 612268bf..564a2da8 100644 --- a/angel_orm_postgres/pubspec.yaml +++ b/angel_orm_postgres/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_orm_postgres -version: 1.0.0-dev +version: 1.0.0-dev.1 description: PostgreSQL support for Angel's ORM. Includes functionality for querying and transactions. author: Tobe O homepage: https://github.com/angel-dart/orm