froom_common library
Classes
- AutoMigration
-
Declares an automatic migration of a Database from the schema version
from to to, like Room's
@AutoMigration. - AutoMigrationSpec
-
The spec of an
AutoMigration, like Room'sAutoMigrationSpec. - Callback
- Callback class that can be attached to the Froom builder.
- ColumnInfo
- Allows customization of the column associated with this field.
- Database
- Marks a class as a FroomDatabase.
- DatabaseView
- Marks a class as a database view (a fixed select statement).
- DeleteColumn
- Declares a column deleted in the AutoMigration.to version on the spec of an AutoMigration.
- DeleteTable
- Declares a table deleted in the AutoMigration.to version on the spec of an AutoMigration.
-
DeletionAdapter<
T> - EncryptionAdapter
- Entity
- Marks a class as a database entity (table).
- ForeignKey
- Declares a foreign key on another Entity.
- FroomDatabase
- Extend this class to enable database functionality.
- Fts3
- Marks an Entity annotated class as an FTS3 entity. This class will have a mapping SQLite FTS3 table in the database.
- Fts4
- Marks an Entity annotated class as an FTS4 entity. This class will have a mapping SQLite FTS4 table in the database.
- Fts5
- Marks an Entity annotated class as an FTS5 entity. This class will have a mapping SQLite FTS5 table in the database.
- FtsTokenizer
- Available option values that can be used with Fts3, Fts4 & Fts5.
- Index
- Declares an index on an Entity. see: SQLite Index Documentation
- Insert
- Marks a method as an insert method.
-
InsertionAdapter<
T> - Migration
- Base class for a database migration.
- MigrationAdapter
- PrimaryKey
- Marks a field in an Entity as the primary key.
- Query
- Marks a method as a query method.
- QueryAdapter
- This class knows how to execute database queries.
- RenameColumn
- Declares a column renamed in the AutoMigration.to version on the spec of an AutoMigration.
- RenameTable
- Declares a table renamed in the AutoMigration.to version on the spec of an AutoMigration.
-
TypeConverter<
T, S> - Base class for type converters which can be applied to:
- TypeConverters
- Specifies additional type converters that Froom can use. The TypeConverter is added to the scope of the element so if you put it on a class, all methods/fields in that class will be able to use the converter.
- Update
- Marks a method as an update method.
-
UpdateAdapter<
T> - Upsert
- Marks a method as an upsert method.
-
UpsertionAdapter<
T> - Inserts entities and updates them instead when they already exist.
Enums
- ForeignKeyAction
- Constants definition for values that can be used in ForeignKey.onDelete and ForeignKey.onUpdate
- OnConflictStrategy
- Set of conflict handling strategies for insert and update methods.
Extensions
- DatabaseFactoryExtension on DatabaseFactory
Constants
- dao → const _Dao
- Marks the class as a Data Access Object.
- delete → const _Delete
- Marks a method as a deletion method.
- entity → const Entity
- Marks a class as a database entity (table).
- fts3 → const Fts3
- Marks an Entity annotated class as an FTS3 entity. This class will have a mapping SQLite FTS3 table in the database.
- fts4 → const Fts4
- Marks an Entity annotated class as an FTS4 entity. This class will have a mapping SQLite FTS4 table in the database.
- fts5 → const Fts5
- Marks an Entity annotated class as an FTS5 entity. This class will have a mapping SQLite FTS5 table in the database.
- ignore → const _Ignore
- Ignores the marked element from Froom's processing logic. It can only be applied to entity's fields.
- insert → const Insert
- Marks a method as an insert method.
- primaryKey → const PrimaryKey
- Marks a field in an Entity as the primary key.
- providedAutoMigrationSpec → const _ProvidedAutoMigrationSpec
-
Marks the spec of an AutoMigration as provided at runtime with
addAutoMigrationSpecs()of the database builder, e.g. for passing dependencies, instead of being created by its unnamed constructor. - transaction → const _Transaction
- Marks a method as a transaction method.
- update → const Update
- Marks a method as an update method.
- upsert → const Upsert
- Marks a method as an upsert method.
Functions
-
explainMissingSqliteModules<
T> (Future< T> action()) → Future<T> -
Runs the
actionopening a database, explaining failures due to modules missing in the SQLite library.
Exceptions / Errors
- DatabaseEncryptionException
- Thrown when an encrypted database can't be opened with its password.
- MissingSqliteModuleException
- Thrown when the SQLite library lacks a module required by the database, e.g. the FTS version of an entity.