Skip to content

Commit

Permalink
PostgresqlAccess.execute/query's values must be a Map
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyeh committed Jul 27, 2024
1 parent a31660f commit 1f4877b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

**3.1.0**

* The `values` paramter of `PostgresqlAccess.query` and `execute` must be `Map`.

**3.0.1**

* `isValidOid()` introduced the `ignoreLength` argument.
Expand Down
6 changes: 4 additions & 2 deletions lib/src/postgresql/postgresql.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ class PostgresqlAccess implements Access {

/// Queues a command for execution, and when done, returns the number of rows
/// affected by the SQL command.
Future<int> execute(String sql, [values]) => conn.execute(sql, values);
Future<int> execute(String sql, [Map? values])
=> conn.execute(sql, values);
/// Queue a SQL query to be run, returning a [Stream] of rows.
Stream<Row> query(String sql, [values]) => conn.query(sql, values);
Stream<Row> query(String sql, [Map? values])
=> conn.query(sql, values);

///Clear the cache.
void clearCache() {
Expand Down

0 comments on commit 1f4877b

Please sign in to comment.