1.0.0-dev.1
This commit is contained in:
parent
f2dce78104
commit
ab7e0de56a
4 changed files with 14 additions and 7 deletions
|
@ -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.
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -13,14 +13,16 @@ class PostgreSQLExecutor extends QueryExecutor {
|
|||
Future close() => (connection as PostgreSQLConnection).close();
|
||||
|
||||
@override
|
||||
Future<List<List>> query(String query, [List<String> returningFields]) {
|
||||
Future<List<List>> query(
|
||||
String query, Map<String, dynamic> substitutionValues,
|
||||
[List<String> 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<List<List>> query(String query, [List<String> returningFields]) {
|
||||
Future<List<List>> query(
|
||||
String query, Map<String, dynamic> substitutionValues,
|
||||
[List<String> returningFields]) {
|
||||
return _pool.withResource(() async {
|
||||
var executor = await _next();
|
||||
return executor.query(query, returningFields);
|
||||
return executor.query(query, substitutionValues, returningFields);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/orm
|
||||
|
|
Loading…
Reference in a new issue