synquill_core
library
Classes
AggregateFunctionExpression <D extends Object >
An expression invoking an aggregate function .
ApiAdapterBase <TModel extends SynquillDataModel <TModel > >
Abstract interface for REST API adapters used by SynquillStorage.
ArgumentsForBatchedStatement
Instruction to run a batched sql statement with the arguments provided.
BackgroundSyncManager
Background sync manager for handling platform-specific background tasks.
BackgroundTransformer
The default Transformer for Dio .
BaseComputedField <SqlType extends Object , $Table extends Table >
The base class for all computed fields
BaseOptions
A set of base settings for each Dio()
.
BaseOptions and Options will be merged into one RequestOptions before
sending the requests. See Options.compose .
BaseReferences <$Database extends GeneratedDatabase , $Table extends Table , $Dataclass >
Base class for the "WithReference" classes
BaseSelectStatement <Row >
The abstract base class for all select statements in the drift api.
BaseTableManager <$Database extends GeneratedDatabase , $Table extends Table , $Dataclass , $FilterComposer extends Composer <$Database , $Table > , $OrderingComposer extends Composer <$Database , $Table > , $ComputedFieldComposer extends Composer <$Database , $Table > , $CreateCompanionCallback extends Function , $UpdateCompanionCallback extends Function , $DataclassWithReferences , $ActiveDataclass , $CreatePrefetchHooksCallback extends Function >
Base class for all table managers
Most of this classes functionality is kept in a separate TableManagerState class
This is so that the state can be passed down to lower level managers
BasicApiAdapter <TModel extends SynquillDataModel <TModel > >
Concrete implementation of ApiAdapterBase using Dio for HTTP requests.
Batch
Contains operations to run queries in a batched mode.
BatchedStatements
Stores information needed to run batched statements in the order they were
issued without preparing statements multiple times.
CancelToken
Controls cancellation of Dio 's requests.
CascadeDeleteRelation
Represents a cascade delete relationship between models
CaseWhen <T extends Object , R extends Object >
A single when-then case for CASE WHEN
expression in sqlite.
CaseWhenExpression <R extends Object >
A CASE WHEN
expression without a base expression in sqlite.
Collate
Collating functions used to compare texts in SQL.
Column <T extends Object >
Base class for columns in sql. Type T
refers to the type a value of this
column will have in Dart.
ColumnBuilder <T extends Object >
A column builder is used to specify which columns should appear in a table.
All of the methods defined in this class and its subclasses are not meant to
be called at runtime. Instead, the generator will take a look at your
source code (specifically, it will analyze which of the methods you use) to
figure out the column structure of a table.
ColumnFilters <T extends Object >
Built in filters for all columns
ColumnOrderings <T extends Object >
Defines a class which is used to wrap a column to only expose ordering functions
ColumnWithTypeConverterFilters <CustomType , CustomTypeNonNullable , T extends Object >
Built in filters for columns that have a type converter
Component
A component is anything that can appear in a sql query.
ComposableOrdering
Defines a class that can be used to compose orderings for a column
Composer <Database extends GeneratedDatabase , CurrentTable extends Table >
A base class for writing computed fields/filters/orderings which have the correct aliases & joins applied
ComputedField <SqlType extends Object , $Table extends Table >
An computed field for a table.
ComputedFieldWithConverter <DartType , SqlType extends Object , $Table extends Table >
An computed field for a table which has a converter
Constant <T extends Object >
An expression that represents the value of a dart object encoded to sql
by writing them into the sql statements. For most cases, consider using
Variable instead.
CustomExpression <D extends Object >
A custom expression that can appear in a sql statement.
The CustomExpression.content will be written into the query without any
modification.
CustomResultSet
Base class for classes generated by custom queries in .drift
files.
CustomSelectStatement
A select statement that is constructed with a raw sql prepared statement
instead of the high-level drift api.
CustomSqlType <T extends Object >
Interface for a custom SQL type.
DatabaseAccessor <T extends GeneratedDatabase >
Class that runs queries to a subset of all available queries in a database.
DatabaseConnection
A database connection managed by drift. This consists of two components:
DatabaseConnectionUser
Manages a DatabaseConnection to send queries to the database.
DatabaseProvider
Global database provider for the synced data storage system
DatabaseSchemaEntity
Some abstract schema entity that can be stored in a database. This includes
tables, triggers, views, indexes, etc.
DataClass
A common supertype for all data classes generated by drift. Data classes are
immutable structures that represent a single row in a database table.
DataClassName
A class to be used as an annotation on Table classes to customize the
name for the data class that will be generated for the table class. The data
class is a dart object that will be used to represent a row in the table.
DateTimeModifier
DateTime modifier constants.
DeleteStatement <T extends Table , D >
A DELETE
statement in sql
DependencyResolver
Manages dependency resolution for hierarchical sync ordering.
DialectAwareSqlType <T extends Object >
A CustomSqlType with access on the dialect of the database engine when
used in queries.
Dio
Dio enables you to make HTTP requests easily.
DioMixin
DoNothing <T extends Table , D >
Upsert clause that does nothing on conflict
DoUpdate <T extends Table , D >
A DoUpdate upsert clause can be used to insert or update a custom
companion when the underlying companion already exists.
DriftAccessor
Annotation to use on classes that implement DatabaseAccessor . It specifies
which tables should be made available in this dao.
DriftAny
A drift type around a SQL value with an unknown type.
DriftDatabase
Use this class as an annotation to inform the generator that a database
class should be generated using the specified DriftDatabase.tables .
DriftDatabaseOptions
Database-specific options used by drift.
DriftRuntimeOptions
Defines additional runtime behavior for drift. Changing the fields of this
class is rarely necessary.
DriftView
An annotation specifying view properties
EnumIndexConverter <T extends Enum >
Implementation for an enum to int converter that uses the index of the enum
as the value stored in the database.
EnumNameConverter <T extends Enum >
Implementation for an enum to string converter that uses the name of the
enum as the value stored in the database.
ErrorInterceptorHandler
The handler for interceptors to handle error occurred during the request.
Expression <D extends Object >
Any sql expression that evaluates to some generic value. This does not
include queries (which might evaluate to multiple values) but individual
columns, functions and operators.
FieldSelector <T >
Base class for typed field selectors.
FilterCondition <T >
Typed version of FilterCondition that provides compile-time type safety.
FilterValue <T >
Base class for typed filter condition values
ForeignKeyRelation
Represents a foreign key relationship where this model references another
ForeignKeyUpdateService
Service for updating foreign key references when model IDs change.
FormData
A class to create readable "multipart/form-data" streams.
It can be used to submit forms and file uploads to http server.
FrameBoundary
Base Class for Boundary in a window frame.
FunctionCallExpression <R extends Object >
A sql expression that calls a function.
FunctionParameter
Base class for everything that can be used as a function parameter in sql.
FusedTransformer
A Transformer that has a fast path for decoding UTF8-encoded JSON.
If the response is utf8-encoded JSON and no custom decoder is specified in the RequestOptions , this transformer
is significantly faster than the default SyncTransformer and the BackgroundTransformer .
This improvement is achieved by using a fused Utf8Decoder and JsonDecoder to decode the response,
which is faster than decoding the utf8-encoded JSON in two separate steps, since
Dart uses a special fast decoder for this case.
See https://github.com/dart-lang/sdk/blob/5b2ea0c7a227d91c691d2ff8cbbeb5f7f86afdb9/sdk/lib/_internal/vm/lib/convert_patch.dart#L40
GeneratedAs
Information filled out by the generator to support generated or virtual
columns.
GeneratedColumn <T extends Object >
Implementation for a Column declared on a table.
GeneratedColumnWithTypeConverter <D , S extends Object >
A GeneratedColumn with a type converter attached to it.
GeneratedDatabase
A base class for all generated databases.
GenerationContext
Contains information about a query while it's being constructed.
GroupBy
A "group by" clause in sql.
HasResultSet
Base class for dsl Table s and View s.
The headers class for requests and responses.
HttpClientAdapter
HttpAdapter
is a bridge between Dio and HttpClient .
IdConflictResolver
Service for resolving ID conflicts during server ID negotiation.
IdNegotiationService <T extends SynquillDataModel <T > >
Service for managing server ID negotiation without modifying user models
Index
A sqlite index on columns or expressions.
Indexed
Annotation to mark a field for database indexing.
This will create a database index on the annotated field to improve
query performance.
Insertable <D >
Common interface for objects which can be inserted or updated into a
database.
D
is the associated data class.
InsertStatement <T extends Table , D >
Represents an insert statement
Interceptor
Interceptor helps to deal with RequestOptions , Response ,
and DioException during the lifecycle of a request
before it reaches users.
Interceptors
A Queue-Model list for Interceptor s.
InterceptorsWrapper
A helper class to create interceptors in ease.
Join <T extends HasResultSet , D >
Used internally by drift when calling SimpleSelectStatement.join .
JoinBuilder
A class that contains the information needed to create a join
JoinedSelectStatement <FirstT extends HasResultSet , FirstD >
A SELECT
statement that operates on more than one table.
LazyDatabase
A special database executor that delegates work to another QueryExecutor .
The other executor is lazily opened by a DatabaseOpener .
Level
Level s to control logging output. Logging can be enabled to include all
levels above certain Level . Level s are ordered using an integer
value Level.value . The predefined Level constants below are sorted as
follows (in descending order): Level.SHOUT , Level.SEVERE ,
Level.WARNING , Level.INFO , Level.CONFIG , Level.FINE , Level.FINER ,
Level.FINEST , and Level.ALL .
Limit
A limit clause inside a select, update or delete statement.
ListParam <T >
Indicates a param being used as queries or form data,
and how does it gets formatted.
ListValue <T >
List value for inList/notInList operations
Logger
Use a Logger to log debug messages.
LogInterceptor
LogInterceptor is used to print logs during network requests.
It should be the last interceptor added,
otherwise modifications by following interceptors will not be logged.
This is because the execution of interceptors is in the order of addition.
LogRecord
A log entry representation used to propagate information from Logger to
individual handlers.
ManyToOne
Annotation to mark a field as a many-to-one relation.
This creates a foreign key constraint in the database.
MigrationStrategy
Handles database migrations by delegating work to OnCreate and OnUpgrade
methods.
Migrator
Runs migrations declared by a MigrationStrategy .
ModelInfoRegistryProvider
Global provider for model metadata including cascade delete relationships
MultiExecutor
A query executor for drift that delegates work to multiple executors.
MultipartFile
An upload content that is a part of MultipartRequest
.
This doesn't need to correspond to a physical file.
MultiSelectable <T >
Selectable methods for returning multiple results.
MultiTypedResultEntry <T >
Class which contains a key and a list of references.
Used internally by drift to pass prefetched data to the TypedResult object.
MultiTypedResultKey <$Table extends Table , $Dataclass >
This class is used to convert a table which expects a single dataclass per row into a table that can contain a multiple dataclasses per row.
However when we prefetch multiple references, we need to store them in a list, which isn't supported by the referenced table class.
For single references, we use original referenced table as a key in the TypedResult._parsedData object.
This class is implemented by the code generator and should
not be instantiated or extended manually.
NativeDatabase
A drift database implementation based on dart:ffi
, running directly in a
Dart VM or an AOT compiled Dart/Flutter application.
NetworkTask <T >
Represents a network operation task that can be executed
by the RequestQueue.
NoValue <T >
No value for isNull/isNotNull operations
NullAwareTypeConverter <D , S extends Object >
A type converter automatically mapping null
values to null
in both
directions.
OnCreateQuery
An internal schema entity to run an sql statement when the database is
created.
OneToMany
Annotation to mark a field as a one-to-many relation.
This field should be of type List
OpeningDetails
Provides information about whether migrations ran before opening the
database.
Options
The configuration for a single request.
BaseOptions and Options will be merged into one RequestOptions before
sending the requests. See Options.compose .
OrderBy
An order-by clause as part of a select statement. The clause can consist
of multiple OrderingTerm s, with the first terms being more important and
the later terms only being considered if the first term considers two rows
equal.
OrderingBuilder
Defines a class which will hold the information needed to create an ordering
OrderingTerm
A single term in a OrderBy clause. The priority of this term is determined
by its position in OrderBy.terms .
Represents pagination parameters.
PluralizationUtils
Utility class for English pluralization rules
PrefetchHooks
When a user requests that certain fields are prefetched, we create a PrefetchHooks class for the manager.
This class has hooks for adding joins to the query before the query is executed, and for running prefetches after the query is executed.
This class is implemented by the code generator and should
not be instantiated or extended manually.
ProcessedTableManager <$Database extends GeneratedDatabase , $Table extends Table , $Dataclass , $FilterComposer extends Composer <$Database , $Table > , $OrderingComposer extends Composer <$Database , $Table > , $ComputedFieldComposer extends Composer <$Database , $Table > , $CreateCompanionCallback extends Function , $UpdateCompanionCallback extends Function , $DataclassWithReferences , $ActiveDataclass , $CreatePrefetchHooksCallback extends Function >
A table manager that exposes methods to a table manager that already has
filters/orderings/limit applied.
Query <T extends HasResultSet , D >
Statement that operates with data that already exists (select, delete,
update).
QueryExecutor
A query executor is responsible for executing statements on a database and
return their results in a raw form.
QueryExecutorUser
Callbacks passed to QueryExecutor.ensureOpen to run schema migrations when
the database is first opened.
QueryInterceptor
An interceptor for SQL queries.
QueryParams
Typed version of QueryParams that provides compile-time safety.
QueryRow
For custom select statements, represents a row in the result set.
QueuedInterceptor
Interceptor in queue.
QueuedInterceptorsWrapper
A helper class to create QueuedInterceptor in ease.
QueueStats
Statistics for a request queue.
RawValuesInsertable <D >
An Insertable implementation based on raw column expressions.
RedirectRecord
A record that records the redirection happens during requests,
including status code, request method, and the location.
ReferenceName
Annotation to use on reference columns inside of a Table to define the name
that the manager will use when refering to this relation in the reverse.
RepositoryChange <T >
A change in a repository.
This is emitted through the repository's change stream.
RequestInterceptorHandler
The handler for interceptors to handle before the request has been sent.
RequestOptions
The internal request option class that is the eventual result after
BaseOptions and Options are composed.
RequestQueue
A queue for managing sequential execution of network operations.
RequestQueueManager
Manages multiple request queues for different types of API operations.
Response <T >
The Response class contains the payload (could be transformed)
that respond from the request, and other information of the response.
ResponseBody
The response wrapper class for adapters.
ResponseInterceptorHandler
The handler for interceptors to handle after respond.
ResultSetImplementation <Tbl , Row >
Interface for schema entities that have a result set.
RetryExecutor
Manages retry logic for sync queue operations with exponential backoff.
RootTableManager <$Database extends GeneratedDatabase , $Table extends Table , $Dataclass , $FilterComposer extends Composer <$Database , $Table > , $OrderingComposer extends Composer <$Database , $Table > , $ComputedFieldComposer extends Composer <$Database , $Table > , $CreateCompanionCallback extends Function , $UpdateCompanionCallback extends Function , $DataclassWithReferences , $ActiveDataclass , $CreatePrefetchHooksCallback extends Function >
A table manager with top level function for creating, reading, updating, and
deleting items.
Selectable <T >
Abstract class for queries which can return one-time values or a stream
of values.
ServerIdMetadata
Metadata for tracking server ID negotiation process
SimpleSelectStatement <T extends HasResultSet , D >
A select statement that doesn't use joins.
SingleOrNullSelectable <T >
Selectable methods for returning or streaming single,
nullable results.
SingleSelectable <T >
Selectable methods for returning or streaming single,
non-nullable results.
SingleValue <T >
Single value for most filter operations
SortCondition <T >
Typed version of SortCondition that provides compile-time safety
for field names.
SqlTypes
Database-specific helper methods mapping Dart values from and to SQL
variables or literals.
StreamQueryUpdateRules
Collects a set of UpdateRule s which can be used to express how a set of
direct updates to a table affects other updates.
Subquery <Row >
A subquery allows reading from another complex query in a join.
SyncDetails
Holds detailed synchronization information for a model instance.
SyncQueueDao
Data Access Object for managing sync queue items.
SyncStatusConverter
Drift type converter for SyncStatus enum
SyncTransformer
If you want to custom the transformation of request/response data,
you can provide a Transformer by your self, and replace
the transformer by setting the Dio.transformer .
SynqillDatabaseVersion
Annotation to specify the database schema version.
This annotation can be placed anywhere in the application code where
SynquillStorage is initialized. If no annotation is present, the default
version is 1.
SynquillDataModel <T extends SynquillDataModel <T > >
Base class for all data models that are to be managed by SynquillStorage.
SynquillRepository
An annotation to mark a class as a data model for which
a Drift table and repository should be generated.
SynquillRepositoryBase <T extends SynquillDataModel <T > >
Base class for synchronized repositories.
SynquillRepositoryProvider
Provides a centralized mechanism for registering and retrieving repository
instances.
This allows for dependency injection of repositories, primarily for testing
and decoupling model logic from concrete repository implementations.
SynquillStorage
Main class for interacting with the synced data storage.
SynquillStorageConfig
Base class for synced data storage configuration.
Table
Subclasses represent a table in a database generated by drift.
TableIndex
Annotations for Dart table classes to define a SQL index
to add to the table.
TableManagerState <$Database extends GeneratedDatabase , $Table extends Table , $Dataclass , $FilterComposer extends Composer <$Database , $Table > , $OrderingComposer extends Composer <$Database , $Table > , $ComputedFieldComposer extends Composer <$Database , $Table > , $CreateCompanionCallback extends Function , $UpdateCompanionCallback extends Function , $DataclassWithReferences , $ActiveDataclass , $CreatePrefetchHooksCallback extends Function >
Defines a class that holds the state for a BaseTableManager
TableMigration
Contains instructions needed to run a complex migration on a table, using
the steps described in Making other kinds of table schema changes .
TableUpdate
Contains information on how a table was updated, which can be used to find
queries that are affected by this.
TableUpdateQuery
A table update query describes information to listen for TableUpdate s.
TableValuedFunction <Self extends ResultSetImplementation >
In sqlite3, a table-valued function is a function that resolves to a result
set, meaning that it can be selected from.
TransactionExecutor
A QueryExecutor that runs multiple queries atomically.
Transformer
Transformer allows changes to the request/response data before
it is sent/received to/from the server.
Trigger
A sqlite trigger that's executed before, after or instead of a subset of
writes on a specific tables.
In drift, triggers can only be declared in .drift
files.
TypeConverter <D , S >
Maps a custom dart object of type D
into a primitive type S
understood
by the sqlite backend.
TypedResult
A result row in a JoinedSelectStatement that can parse the result of
multiple entities.
Uint8List
A fixed-length list of 8-bit unsigned integers.
UpdateCompanion <D >
An update companion for a DataClass which is used to write data into a
database using InsertStatement.insert or UpdateStatement.write .
UpdateRule
A common rule that describes how a TableUpdate has other TableUpdate s.
UpdateStatement <T extends Table , D >
Represents an UPDATE
statement in sql.
UpsertClause <T extends Table , D >
A upsert clause controls how to behave when a uniqueness constraint is
violated during an insert.
UpsertMultiple <T extends Table , D >
Upsert clause that consists of multiple clauses .
UseRowClass
An annotation specifying an existing class to be used as a data class.
Value <T >
A wrapper around arbitrary data T
to indicate presence or absence
explicitly.
ValueSerializer
Serializer responsible for mapping atomic types from and to json.
Variable <T extends Object >
An expression that represents the value of a dart object encoded to sql
using prepared statements.
VerificationContext
Used internally by drift for integrity checks.
VerificationMeta
Additional information that is passed to GeneratedColumn s when verifying
data to provide more helpful error messages.
VerificationResult
Returned by GeneratedColumn.isAcceptableValue to provide a description
when a valid is invalid.
View
Subclasses represent a view in a database generated by drift.
ViewInfo <Self extends HasResultSet , Row >
A sqlite view.
VirtualColumnBuilder <T extends Object >
A column builder for virtual, generated columns.
Where
A where clause in a select, update or delete statement.
WindowFunctionExpression <T extends Object >
Represents a window function expression in SQL.
WritePropagation
An UpdateRule for triggers that exist in a database.
Enums
DataLoadPolicy
Enum representing different data store policies.
DataSavePolicy
Enum representing different data store policies.
DioExceptionType
The exception enumeration indicates what type of exception
has happened during requests.
DriftSqlType <T extends Object >
An enumation of type mappings that are builtin to drift and drift_dev
.
FileAccessMode
The file access mode when downloading a file, corresponds to a subset of
dart:io::FileMode .
FilterOperator
Enum representing different comparison operators for filtering.
FrameExclude
Specifies how to exclude rows from the window frame.
IdGenerationStrategy
Strategy for ID generation in models.
IdNegotiationStatus
Status of ID negotiation process for server-generated IDs.
InsertMode
Enumeration of different insert behaviors. See the documentation on the
individual fields for details.
KeyAction
A KeyAction can be used on a BuildColumn.references clause to describe
how updates and deletes to a referenced table should propagate in your
database.
ListFormat
Specifies the array format (a single parameter with multiple parameter
or multiple parameters with the same name).
and the separator for array items.
NullsOrder
Describes how to order nulls
OrderingMode
Describes how to order rows
Precedence
Used to order the precedence of sql expressions so that we can avoid
unnecessary parens when generating sql statements.
QueueType
Queue types for different API operations.
RepositoryChangeType
Represents a change to a repository.
This is used for notifying listeners about changes to the data.
ResponseType
Indicates which transformation should be applied to the response data.
SortDirection
Enum representing sort directions.
SqlDialect
An enumeration of database systems supported by drift. Only
SqlDialect.sqlite is officially supported, all others are in an
experimental state at the moment.
SyncOperation
Represents an operation to be performed on a sync queue.
SyncStatus
Enum representing the synchronization status of a record
UpdateKind
Classifies a TableUpdate by what kind of write happened - an insert, an
update or a delete operation.
Extensions
ApplyInterceptor
on QueryExecutor
Extension to wrap a QueryExecutor with a QueryInterceptor .
ApplyInterceptorConnection
on DatabaseConnection
Extension to wrap a DatabaseConnection with a QueryInterceptor .
ArithmeticAggregates
on Expression <DT >
Provides aggregate functions that are available for numeric expressions.
ArithmeticBigIntExpr
on Expression <BigInt >
Defines the -
, *
and /
operators on sql expressions that support it.
ArithmeticExpr
on Expression <DT >
Defines the -
, *
and /
operators on sql expressions that support it.
BaseAggregate
on Expression <DT >
Provides aggregate functions that are available for each expression.
BigIntAggregates
on Expression <BigInt >
Provides aggregate functions that are available for BigInt expressions.
BigIntFilters
on ColumnFilters <T >
Built in filters for BigInt columns
BitwiseBigInt
on Expression <BigInt >
Extensions providing bitwise operators ~ , on integer expressions that are
represented as a Dart BigInt .
BitwiseInt
on Expression <int >
Extensions providing bitwise operators ~ , on integer expressions.
BooleanExpressionOperators
on Expression <bool >
Defines operations on boolean values.
BoolFilters
on ColumnFilters <bool >
Built in filters for bool columns
BuildColumn
on ColumnBuilder <T >
DSL extension to define a column inside a drift table.
BuildGeneralColumn
on _BaseColumnBuilder<T >
Column builders available for both virtual and non-virtual columns.
BuildInt64Column
on ColumnBuilder <BigInt >
Tells the generator to build an Int64Column . See the docs at ColumnBuilder
for details.
BuildIntColumn
on ColumnBuilder <T >
Tells the generator to build an IntColumn . See the docs at ColumnBuilder
for details.
BuildTextColumn
on ColumnBuilder <T >
Tells the generator to build an TextColumn . See the docs at
ColumnBuilder for details.
ComparableExpr
on Expression <DT >
Defines extension functions to express comparisons in sql
DateFilters
on ColumnFilters <T >
Built in filters for DateTime columns
DateTimeAggregate
on Expression <DateTime >
Provides aggregate functions that are available on date time expressions.
DateTimeExpressions
on Expression <DateTime >
Provides expressions to extract information from date time values, or to
calculate the difference between datetimes.
DestructiveMigrationExtension
on GeneratedDatabase
Extension providing the destructiveFallback strategy.
FieldSelectorExtensions
on FieldSelector <T >
Extension methods for FieldSelector that provide compile-time type safety
for creating filter conditions.
NameWithAlias
on ResultSetImplementation
Extension to generate an alias for a table or a view.
NumFilters
on ColumnFilters <T >
Built in filters for int/double columns
OldDbFieldInDatabaseAccessor
on DatabaseAccessor <T >
Extension for generated dao classes to keep the old db field that was
renamed to DatabaseAccessor.attachedDatabase in drift 3.0
QueryTableExtensions
on SingleTableQueryMixin <T , D >
Extension for statements on a table.
RowIdExtension
on TableInfo <Table , dynamic >
Extension to use the rowid
of a table in Dart queries.
StringExpressionOperators
on Expression <String >
Defines methods that operate on a column storing String values.
StringFilters
on ColumnFilters <String >
Built in filters for int/double columns
Switch
on Stream <T >
A utility to take events from the most recent sub stream returned by a
callback.
SynquillDataModelExtensions
on SynquillDataModel <T >
Runtime extensions for SynquillDataModel instances.
TableInfoUtils
on ResultSetImplementation <TableDsl , D >
Static extension members for generated table classes.
TableOrViewStatements
on ResultSetImplementation <Tbl , Row >
Easily-accessible methods to compose common operations or statements on
tables or views.
TableStatements
on TableInfo <Tbl , Row >
Easily-accessible methods to compose common operations or statements on
tables.
Functions
$_aliasNameGenerator (GeneratedColumn <Object > currentColumn , GeneratedColumn <Object > referencedColumn )
→ String
A simple function for generating aliases for referenced columns
$_getPrefetchedData <$CurrentDataclass , $CurrentTable extends Table , $ReferencedDataclass > ({required ProcessedTableManager <dynamic , dynamic , $ReferencedDataclass , dynamic , dynamic , dynamic , dynamic , dynamic , dynamic , $ReferencedDataclass , dynamic > managerFromTypedResult (TypedResult ), required MultiTypedResultKey <Table , dynamic > referencedTable , required List <TypedResult > typedResults , required TableInfo <$CurrentTable , $CurrentDataclass > currentTable , required Iterable <$ReferencedDataclass > referencedItemsForCurrentItem ($CurrentDataclass item , List <$ReferencedDataclass > referencedItems ) })
→ Future <List <MultiTypedResultEntry <$ReferencedDataclass > > >
This function is used to fetch referenced data for a List<TypedResults>
.
coalesce <T extends Object > (List <Expression <T > > expressions )
→ Expression <T >
Evaluates to the first expression in expressions
that's not null, or
null if all expressions
evaluate to null.
countAll ({Expression <bool > ? filter })
→ Expression <int >
Returns the amount of rows in the current group matching the optional
filter
.
crossJoin (HasResultSet other , {bool ? useColumns })
→ Join <HasResultSet , dynamic >
Creates a sql cross join that can be used in
SimpleSelectStatement.join .
defaultDioExceptionReadableStringBuilder (DioException e )
→ String
The default implementation of building a readable string of DioException .
existsQuery (BaseSelectStatement select )
→ Expression <bool >
The EXISTS
operator checks whether the select
subquery returns any rows.
generateCuid ()
→ String
Generates a new CUID (Collision-resistant Universal Identifier).
ifNull <T extends Object > (Expression <T > first , Expression <T > second )
→ Expression <T >
Evaluates to the first expression that's not null, or null if both evaluate
to null. See coalesce if you need more than 2.
innerJoin (HasResultSet other , Expression <bool > on , {bool ? useColumns })
→ Join <HasResultSet , dynamic >
Creates a sql inner join that can be used in SimpleSelectStatement.join .
leftOuterJoin (HasResultSet other , Expression <bool > on , {bool ? useColumns })
→ Join <HasResultSet , dynamic >
Creates a sql left outer join that can be used in
SimpleSelectStatement.join .
notExistsQuery (BaseSelectStatement select )
→ Expression <bool >
The NOT EXISTS
operator evaluates to true
if the select
subquery does
not return any rows.
subqueryExpression <R extends Object > (BaseSelectStatement statement )
→ Expression <R >
Creates a subquery expression from the given statement
.
Typedefs
AnyColumn
= Column <DriftAny >
A column storing arbitrary values using SQLite's ANY
type.
BlobColumn
= Column <Uint8List >
A column that stores arbitrary blobs of data as a Uint8List .
BoolColumn
= Column <bool >
A column that stores boolean values. Booleans will be stored as an integer
that can either be 0 (false) or 1 (true).
DatabaseOpener
= FutureOr <QueryExecutor > Function()
Signature of a function that opens a database connection when instructed to.
DatabaseSetup
= void Function(Database database )
Signature of a function that can perform setup work on a database
before
drift is fully ready.
DateTimeColumn
= Column <DateTime >
A column that stores a DateTime . Times will be stored as unix timestamp
and will thus have a second accuracy.
DefaultTransformer
= SyncTransformer
DioError
= DioException
DioError describes the exception info when a request failed.
DioErrorType
= DioExceptionType
Deprecated in favor of DioExceptionType and will be removed in future major versions.
DioExceptionReadableStringBuilder
= String Function(DioException e )
The readable string builder's signature of
DioException.readableStringBuilder .
DioMediaType
= MediaType
The type (alias) for specifying the content-type of the MultipartFile
.
GetColumnForFieldFunction
= String ? Function(String tableName , String fieldName )
Function type for getting column name using DAO's getColumnForField method
The signature that iterates header fields.
Int64Column
= Column <BigInt >
A column that stores BigInt values.
IntColumn
= Column <int >
A column that stores int values.
InterceptorErrorCallback
= void Function(DioException error , ErrorInterceptorHandler handler )
The signature of Interceptor.onError .
InterceptorSendCallback
= void Function(RequestOptions options , RequestInterceptorHandler handler )
The signature of Interceptor.onRequest .
InterceptorSuccessCallback
= void Function(Response response , ResponseInterceptorHandler handler )
The signature of Interceptor.onResponse .
IsolateSetup
= FutureOr <void > Function()
Signature of a function that can perform setup work on the isolate before
opening the database.
JsonDecodeCallback
= FutureOr Function(String )
The callback definition for decoding a JSON string.
JsonEncodeCallback
= FutureOr <String > Function(Object )
The callback definition for encoding a JSON object.
OnBeforeOpen
= Future <void > Function(OpeningDetails details )
Signature of a function that's called before a database is marked opened by
drift, but after migrations took place. This is a suitable callback to to
populate initial data or issue PRAGMA
statements that you want to use.
OnCreate
= Future <void > Function(Migrator m )
Signature of a function that will be invoked when a database is created.
OnUpgrade
= Future <void > Function(Migrator m , int from , int to )
Signature of a function that will be invoked when a database is upgraded
or downgraded.
In version upgrades: from < to
In version downgrades: from > to
OrderClauseGenerator <T >
= OrderingTerm Function(T tbl )
Signature of a function that generates an OrderingTerm when provided with
a table.
ProgressCallback
= void Function(int count , int total )
The type of a progress listening callback when sending or receiving data.
RealColumn
= Column <double >
A column that stores floating point numeric values.
RepositoryFactory <M extends SynquillDataModel <M > >
= SynquillRepositoryBase <M > Function(GeneratedDatabase db )
Defines a factory function for creating repository instances.
The factory takes a SynquillDatabase
instance and returns a repository
of type SynquillRepositoryBase<M> .
M
is the model type.
RequestEncoder
= FutureOr <List <int > > Function(String request , RequestOptions options )
The type of a request encoding callback.
ResponseDecoder
= FutureOr <String ? > Function(List <int > responseBytes , RequestOptions options , ResponseBody responseBody )
The type of a response decoding callback.
SqliteResolver
= FutureOr <Sqlite3 > Function()
Signature of a function that obtains an instance of Sqlite3
bindings.
StateTransformer
= T Function<T extends TableManagerState >(T $state )
Type definition for a function that transforms the state of a manager
TextColumn
= Column <String >
A column that stores text.
ValidateStatus
= bool Function(int ? status )
The type of a response status code validate callback.