declarative_sqlite library
A declarative SQLite library for Dart.
This library provides a fluent, declarative, and type-safe way to define and interact with a SQLite database.
Classes
- AggregateColumn
- An aggregate function column (e.g., "COUNT(*)", "SUM(amount)")
- AnalysisContext
- Represents the analysis context for dependency resolution
- BuiltWhereClause
- ColumnBuilder
- Base class for all column builders.
- Comparison
- Condition
- DatabaseValueSerializer
- Utility class for serializing Dart values to SQLite-compatible format
-
DataMapper<
T> - Base class for mapping database rows to typed objects.
- DataMappingUtils
- Utility class for converting database values to appropriate types.
- DbRecord
- Base class for typed database records.
- DbSchema
- DbTable
- DeclarativeDatabase
- A declarative SQLite database.
- DirtyRow
- DirtyRowStore
- Abstract base class for a data store that holds pending operations.
- Exists
- ExpressionColumn
- A complex expression column (e.g., calculations, CASE statements)
- FileSet
- Orchestrates file storage and metadata for fileset columns.
- FilesetField
- Represents a fileset column value with convenient access to file operations.
- FilesystemFileRepository
- A default implementation of IFileRepository that stores files on the local filesystem.
- GenerateDbRecord
- Annotation to mark a class for DbRecord code generation.
- Hlc
- A Hybrid Logical Clock (HLC) timestamp.
- HlcClock
- A clock that generates Hybrid Logical Clock timestamps.
- IFileRepository
- Defines the contract for a file repository used to store and retrieve the content of files.
- InListComparison
- InSubQueryComparsion
- LogicalOperator
- QualifiedColumn
- A qualified column with table/alias prefix (e.g., "u.name", "posts.title")
- QueryBuilder
- QueryColumn
- Represents a column reference in a SQL query
- QueryDependencies
- Represents dependencies of a query component
- QueryDependencyAnalyzer
- Analyzes queries to determine their database dependencies using object-oriented approach.
- QueryDependencyColumn
- QueryStreamManager
- Manages multiple streaming queries and coordinates their updates with batching and debouncing
- RawSqlWhereClause
- RecordFactory
- Factory for creating DbRecord instances from database query results.
- RecordMapFactoryRegistry
- Registry for typed record factory functions.
- ScheduledTask
- Represents a scheduled task
- Schema
- SchemaBuilder
- A fluent builder for defining a database schema.
- SchemaProvider
- Interface for schema information to resolve column-to-table mappings
- SimpleColumn
- A simple column name without table qualification
- SqliteDirtyRowStore
- An implementation of DirtyRowStore that uses a SQLite table.
-
StreamingQuery<
T> - A streaming query that emits new results whenever the underlying data changes.
- TaskExecutionResult
- Task execution result
- TaskScheduler
- Fair task scheduler for background operations
- TaskSchedulerConfig
- Configuration for resource management
- WhereClause
- WildcardColumn
- A wildcard column (* or table.*)
Enums
- TaskPriority
- Priority levels for scheduled tasks
Functions
-
and(
List< WhereClause> clauses) → LogicalOperator -
col(
String column) → Condition -
exists(
void build(QueryBuilder)) → Exists -
notExists(
void build(QueryBuilder)) → Exists -
or(
List< WhereClause> clauses) → LogicalOperator
Typedefs
-
RecordFactoryFunction<
T extends DbRecord> = T Function(Map< String, Object?> data, DeclarativeDatabase database) - TaskExecutionCallback = void Function(TaskExecutionResult result)
- Callback for task execution events