Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentityHashCalculator ¶
type IdentityHashCalculator interface {
ConstructHash(entityModel interface{}) (ans string, err error)
}
IdentityHashCalculator Calculates Identity based on the entity model definition returned by ORM
type Migration ¶
type Migration interface { GetBaseVersion() VersionNumber GetTargetVersion() VersionNumber Apply(db interface{}) error }
Migration Interface against users can define their migrations on the DB
type ModelDefinition ¶
type ModelDefinition struct { TableName string EntityModel interface{} }
ModelDefinition Interface to access Definition of ORM Entity Model
type ORM ¶
type ORM interface { HasTable(entity interface{}) bool CreateTable(models ...interface{}) Result TruncateTable(entity interface{}) Result Create(entity interface{}) Result DropTable(entities ...interface{}) Result GetModelDefinition(entity interface{}) ModelDefinition GetUnderlyingORM() interface{} GetLatestSchemaIdentityHashAndVersion() (identityHash string, version int, err error) DoInTransaction(fc func(tx ORM) error) (err error) //In the event of error returned by fc rollback should happen, nil return value should lead to commit }
ORM The orm component used by Room
type VersionNumber ¶
type VersionNumber uint
VersionNumber Type for specifying version number across Room
Click to show internal directories.
Click to hide internal directories.