customStatement method

Future<void> customStatement(
  1. String statement, [
  2. List<Variable<Object>> args = const []
])

Executes the custom sql statement on the database.

statement should contain exactly one SQL statement. Attempting to run multiple statements with a single customStatement may not be fully supported on all platforms.

Implementation

Future<void> customStatement(
  String statement, [
  List<Variable> args = const [],
]) async {
  final session = await currentSession();
  await session.execute(
    StatementInfo(
      statement,
      variables: Variable.resolveValues(dialect, args),
    ),
  );
}