JsonlDbExecutor class
Executor que persiste cada tabela como um arquivo <dir>/<tabela>.jsonl
(uma linha JSON por registro). Útil para dev/demo sem instalar MySQL.
Em produção use um MySqlExecutor; o alvo PHP gera PDO/MySQL.
- Implemented types
Constructors
- JsonlDbExecutor({String directory = 'content/db'})
-
const
Properties
Methods
-
count(
String table) → Future< int> -
Conta registros de
table.override -
deleteById(
String table, Object id) → Future< bool> -
Remove por id; retorna se afetou algo.
override
-
findById(
String table, Object id) → Future< Map< String, Object?> ?> -
Busca por id.
override
-
insert(
String table, Map< String, Object?> values) → Future<int> -
Insere
valuesemtablee retorna o id gerado.override -
list(
String table, {required int limit, required int offset, String orderBy = 'id', bool desc = true}) → Future< List< Map< >String, Object?> > -
Lista registros paginados.
override
-
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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited