execute abstract method
Executes the query
with the given parameters
.
query
must either be a String or a PgSql query with types for
parameters. When a PgSql query object with known types is used,
parameters
can be a list of direct values. Otherwise, it must be a list
of PgTypedParameters. With PgSql.map, values can also be provided as a
map from the substituted parameter keys to objects or PgTypedParameters.
When ignoreRows
is set to true, the implementation may internally
optimize the execution to ignore rows returned by the query. Whether this
optimization can be applied also depends on the parameters chosen, so
there is no guarantee that the PgResult from a ignoreRows
excution has
no rows.
queryMode
is optional to override the default query execution mode that
is defined in PgSessionSettings. Unless necessary, always prefer using
QueryMode.extended which is the default value. For more information,
see PgSessionSettings.queryMode
Implementation
Future<PgResult> execute(
Object /* String | PgSql */ query, {
Object? /* List<Object?|PgTypedParameter> | Map<String, Object?|PgTypedParameter> */
parameters,
bool ignoreRows = false,
QueryMode? queryMode,
});