Documentation
¶
Index ¶
- func ConfigureDBSession(session db.Session, dbPool *config.ConnectionPool) db.Session
- func CreateDBSession(ctx context.Context, kubectlConfig kubernetes.Interface, namespace string, ...) (db.Session, error)
- func CreateDBSessionWithCreds(dbConfig config.DBConfig, username, password string) (db.Session, error)
- func IsSerializationConflict(err error) bool
- func Migrate(ctx context.Context, session db.Session, versionTableName string, ...) error
- type AnsiSQLChange
- type Change
- type DBType
- type TypedChanges
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigureDBSession ¶
ConfigureDBSession configures the DB session
func CreateDBSession ¶
func CreateDBSession(ctx context.Context, kubectlConfig kubernetes.Interface, namespace string, dbConfig config.DBConfig) (db.Session, error)
CreateDBSession creates the dB session
func CreateDBSessionWithCreds ¶
func CreateDBSessionWithCreds(dbConfig config.DBConfig, username, password string) (db.Session, error)
CreateDBSessionWithCreds creates a database session using direct username and password
func IsSerializationConflict ¶ added in v4.0.10
IsSerializationConflict reports whether err is a transaction conflict reported by the database driver itself: PostgreSQL serialization_failure (40001) or deadlock_detected (40P01), or MySQL ER_LOCK_DEADLOCK (1213). These are the errors where the database aborted the transaction because of concurrent activity and the whole transaction can safely be retried.
Types ¶
type AnsiSQLChange ¶
type AnsiSQLChange string
represent a straight forward change that is compatible with all database providers
type TypedChanges ¶
Click to show internal directories.
Click to hide internal directories.