Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClonableSQLiteDatabase ¶
type ClonableSQLiteDatabase struct {
// contains filtered or unexported fields
}
ClonableSQLiteDatabase is a wrapper around a gorm database (SQLite) that allows to clone it.
func Clone ¶
func Clone(logger log.Logger, source *ClonableSQLiteDatabase, directory string, filename string, errorHandler func(error)) (*ClonableSQLiteDatabase, error)
Clone creates a new ClonableSQLDatabase instance by copying the SQLite database to a new location.
func NewClonableSQLiteDatabase ¶
func NewClonableSQLiteDatabase(logger log.Logger, directory string, filename string, errorHandler func(error)) *ClonableSQLiteDatabase
NewClonableSQLiteDatabase creates a new ClonableSQLDatabase instance.
func (*ClonableSQLiteDatabase) ExecDBFunc ¶
func (p *ClonableSQLiteDatabase) ExecDBFunc() func(func(*gorm.DB) error) error
ExecDBFunc executes a function with the DB as argument. The DB is locked during the execution of the function.
func (*ClonableSQLiteDatabase) Shutdown ¶
func (p *ClonableSQLiteDatabase) Shutdown()
Shutdown closes the database.
func (*ClonableSQLiteDatabase) Size ¶
func (p *ClonableSQLiteDatabase) Size() int64
Size returns the size of the underlying database.
Click to show internal directories.
Click to hide internal directories.