QueryExceptionExecutor class final

Wraps an executor so a failing query throws QueryException, or UniqueConstraintViolationException when errors recognises one, as Laravel's runQueryCallback does.

Implemented types

Constructors

QueryExceptionExecutor(QueryExecutor inner, String connectionName, QueryErrors? errors)

Properties

connectionName → String
final
dialect → SqlDialect
no setteroverride
errors → QueryErrors?
final
hashCode → int
The hash code for this object.
no setterinherited
inner → QueryExecutor
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

execute(String sql, [List<Object?> bindings = const <Object?>[]]) → Future<int>
Runs a statement and returns the number of affected rows.
override
insertGetId(String sql, [List<Object?> bindings = const <Object?>[]]) → Future<Object?>
Runs an insert and returns the generated primary key.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select(String sql, [List<Object?> bindings = const <Object?>[]]) → Future<List<Map<String, Object?>>>
Runs a query and returns the rows as column → value maps.
override
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited