Documentation ¶
Index ¶
- type Backend
- func (b *Backend) Begin() (db.Transaction, apperror.Error)
- func (b *Backend) Build()
- func (b *Backend) Clone() db.Backend
- func (b *Backend) Commit() apperror.Error
- func (b *Backend) CreateCollection(collections ...string) apperror.Error
- func (b Backend) DetermineMigrationVersion() (int, apperror.Error)
- func (b *Backend) DisableSqlProfiling()
- func (b *Backend) EnableSqlProfiling()
- func (b *Backend) Exec(statement Expression) apperror.Error
- func (b *Backend) ExecQuery(statement FieldedExpression) ([]interface{}, apperror.Error)
- func (b *Backend) GetMigrationHandler() *db.MigrationHandler
- func (b *Backend) HasNativeJoins() bool
- func (b *Backend) HasStringIds() bool
- func (b Backend) IsMigrationLocked() (bool, apperror.Error)
- func (b *Backend) IsSqlProfilingEnabled() bool
- func (b Backend) MigrationsSetup() apperror.Error
- func (b *Backend) MustBegin() db.Transaction
- func (b Backend) NewMigrationAttempt() db.MigrationAttempt
- func (b *Backend) Rollback() apperror.Error
- func (b *Backend) SqlExec(query string, args ...interface{}) (sql.Result, error)
- func (b *Backend) SqlQuery(query string, args ...interface{}) (*sql.Rows, error)
- type Dialect
- type MigrationAttempt
- type MysqlDialect
- type PostgresDialect
- func (d *PostgresDialect) AfterCollectionCreate(info *db.ModelInfo) apperror.Error
- func (PostgresDialect) DetermineColumnType(attr *db.Attribute) (string, apperror.Error)
- func (d *PostgresDialect) New() Dialect
- func (PostgresDialect) Placeholder() string
- func (d *PostgresDialect) PrepareExpression(expression Expression) apperror.Error
- func (d *PostgresDialect) String() string
- func (d *PostgresDialect) Translate(expression Expression) apperror.Error
- type SqliteDialect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct { db.BaseBackend Db *sql.DB Tx *sql.Tx // contains filtered or unexported fields }
func (*Backend) Begin ¶
func (b *Backend) Begin() (db.Transaction, apperror.Error)
func (*Backend) CreateCollection ¶
func (Backend) DetermineMigrationVersion ¶
func (*Backend) DisableSqlProfiling ¶
func (b *Backend) DisableSqlProfiling()
func (*Backend) EnableSqlProfiling ¶
func (b *Backend) EnableSqlProfiling()
func (*Backend) ExecQuery ¶
func (b *Backend) ExecQuery(statement FieldedExpression) ([]interface{}, apperror.Error)
func (*Backend) GetMigrationHandler ¶
func (b *Backend) GetMigrationHandler() *db.MigrationHandler
*
- Implement migration related interfaces.
func (*Backend) HasNativeJoins ¶
func (*Backend) HasStringIds ¶
func (Backend) IsMigrationLocked ¶
func (*Backend) IsSqlProfilingEnabled ¶
func (Backend) MigrationsSetup ¶
func (b Backend) MigrationsSetup() apperror.Error
func (*Backend) MustBegin ¶
func (b *Backend) MustBegin() db.Transaction
func (Backend) NewMigrationAttempt ¶
func (b Backend) NewMigrationAttempt() db.MigrationAttempt
type Dialect ¶
type Dialect interface { ExpressionTranslator New() Dialect DetermineColumnType(attr *db.Attribute) (string, apperror.Error) AfterCollectionCreate(info *db.ModelInfo) apperror.Error }
func NewPostgresDialect ¶
type MigrationAttempt ¶
type MigrationAttempt struct {
db.BaseMigrationAttemptIntId
}
type MysqlDialect ¶
type MysqlDialect struct {
// contains filtered or unexported fields
}
func (MysqlDialect) AfterCollectionCreate ¶
func (MysqlDialect) DetermineColumnType ¶
func (MysqlDialect) New ¶
func (MysqlDialect) New() Dialect
func (*MysqlDialect) PrepareExpression ¶
func (d *MysqlDialect) PrepareExpression(e Expression) apperror.Error
type PostgresDialect ¶
type PostgresDialect struct {
// contains filtered or unexported fields
}
func (*PostgresDialect) AfterCollectionCreate ¶
func (d *PostgresDialect) AfterCollectionCreate(info *db.ModelInfo) apperror.Error
func (PostgresDialect) DetermineColumnType ¶
func (*PostgresDialect) New ¶
func (d *PostgresDialect) New() Dialect
func (PostgresDialect) Placeholder ¶
func (PostgresDialect) Placeholder() string
func (*PostgresDialect) PrepareExpression ¶
func (d *PostgresDialect) PrepareExpression(expression Expression) apperror.Error
func (*PostgresDialect) String ¶
func (d *PostgresDialect) String() string
func (*PostgresDialect) Translate ¶
func (d *PostgresDialect) Translate(expression Expression) apperror.Error
type SqliteDialect ¶
type SqliteDialect struct {
// contains filtered or unexported fields
}
func (SqliteDialect) AfterCollectionCreate ¶
func (SqliteDialect) DetermineColumnType ¶
func (SqliteDialect) New ¶
func (SqliteDialect) New() Dialect
func (*SqliteDialect) PrepareExpression ¶
func (d *SqliteDialect) PrepareExpression(e Expression) apperror.Error
Click to show internal directories.
Click to hide internal directories.