DatabaseBlogSource class

Fonte de posts no banco de dados: lê de uma tabela (padrão blog_posts) via DbExecutor. Permite criar/editar posts pela API/admin sem tocar em arquivos. Funciona com qualquer executor (em memória, JSONL, MySQL).

Implemented types

Constructors

DatabaseBlogSource(DbExecutor db, {String table = 'blog_posts', BlogPostMapper mapper = const BlogPostMapper(), int max = 1000})
const

Properties

db → DbExecutor
final
hashCode → int
The hash code for this object.
no setterinherited
mapper → BlogPostMapper
final
max → int
Teto de posts carregados (evita varrer tabelas gigantes de uma vez).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
table → String
Tabela onde os posts ficam.
final

Methods

loadAll() → Future<List<BlogPost>>
Carrega todos os posts desta fonte (sem ordenar/deduplicar — isso é responsabilidade do agregador).
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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