DbExecutor class abstract interface

Abstração de acesso ao banco usada pelo runtime Dart. Implementações: InMemoryDbExecutor (testes/dev), JsonlDbExecutor (arquivo) e, em produção, um MySqlExecutor (mysql_client). O alvo PHP gera PDO equivalente.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

count(String table) Future<int>
Conta registros de table.
deleteById(String table, Object id) Future<bool>
Remove por id; retorna se afetou algo.
findById(String table, Object id) Future<Map<String, Object?>?>
Busca por id.
insert(String table, Map<String, Object?> values) Future<int>
Insere values em table e retorna o id gerado.
list(String table, {required int limit, required int offset, String orderBy = 'id', bool desc = true}) Future<List<Map<String, Object?>>>
Lista registros paginados.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateById(String table, Object id, Map<String, Object?> values) Future<bool>
Atualiza por id; retorna se afetou algo.

Operators

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