execute abstract method

void execute(
  1. String sql, [
  2. List<Object?> parameters = const []
])

Executes the sql statement(s) with the provided parameters, ignoring any rows returned by the statement(s).

For the types supported in parameters, see StatementParameters. To view rows returned by a statement, run it with select. Statements that aren't SELECTs in SQL but still return rows (such as updates with a RETURNING clause) can still be safely executed with select.

When no parameters are passed to execute, sql is allowed to contain multiple SQL statements (separated by a semicolon). Those statements will be executed in order, but execute will not start a transaction for them automatically. If any statement fails, that exception will be thrown and subsequent statements will not be executed.

Implementation

void execute(String sql, [List<Object?> parameters = const []]);