@@ -29,7 +29,7 @@ class Query<T> {
29
29
Future <QueryResult <T >?> get future => _onComplete.future;
30
30
31
31
final String statement;
32
- final Map <String , dynamic > substitutionValues;
32
+ final Map <String , dynamic >? substitutionValues;
33
33
final PostgreSQLExecutionContext transaction;
34
34
final PostgreSQLConnection connection;
35
35
@@ -96,7 +96,7 @@ class Query<T> {
96
96
}
97
97
98
98
void sendCachedQuery (Socket socket, CachedQuery cacheQuery,
99
- Map <String , dynamic > substitutionValues) {
99
+ Map <String , dynamic >? substitutionValues) {
100
100
final statementName = cacheQuery.preparedStatementName;
101
101
final parameterList = cacheQuery.orderedParameters!
102
102
.map ((identifier) => ParameterValue (identifier, substitutionValues))
@@ -196,13 +196,13 @@ class CachedQuery {
196
196
197
197
class ParameterValue {
198
198
factory ParameterValue (PostgreSQLFormatIdentifier identifier,
199
- Map <String , dynamic > substitutionValues) {
199
+ Map <String , dynamic >? substitutionValues) {
200
200
if (identifier.type == null ) {
201
- return ParameterValue .text (substitutionValues[identifier.name]);
201
+ return ParameterValue .text (substitutionValues? [identifier.name]);
202
202
}
203
203
204
204
return ParameterValue .binary (
205
- substitutionValues[identifier.name], identifier.type! );
205
+ substitutionValues? [identifier.name], identifier.type! );
206
206
}
207
207
208
208
factory ParameterValue .binary (
0 commit comments