execute abstract method
Executes the query
with the given parameters
.
query
must either be a String or a Sql object with types for
parameters already set. If the types for parameters are already known from
the query, a direct list of values can be passed for parameters
.
Otherwise, the type of parameter types must be made explicit. This can be
done by passing TypedValue objects in a list, or (if a string or
Sql.named value is passed for query
), via the names of declared
statements.
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 Result from a ignoreRows
excution has
no rows.
queryMode
is optional to override the default query execution mode that
is defined in SessionSettings. Unless necessary, always prefer using
QueryMode.extended which is the default value. For more information,
see SessionSettings.queryMode
Implementation
Future<Result> execute(
Object /* String | Sql */ query, {
Object? /* List<Object?|TypedValue> | Map<String, Object?|TypedValue> */
parameters,
bool ignoreRows = false,
QueryMode? queryMode,
Duration? timeout,
});