Documentation
¶
Index ¶
Constants ¶
View Source
const PGERROR_CODE_UNIQUE_VIOLATION = "23505"
Variables ¶
This section is empty.
Functions ¶
func IsDuplicateKeyError ¶
func IsNotFoundError ¶
Types ¶
type Db ¶
type Db interface {
GetGormDb() *gorm.DB
Init(model ...interface{}) error
Connect() error
ExecuteInTransaction(dbOperation func(tx *gorm.DB) *gorm.DB, nestedFuncs ...func() error) (err error)
// version 2 of execute in transaction to pass transaction object to nested functions
ExecuteInTransaction2(dbOperation func(tx *gorm.DB) *gorm.DB, nestedFuncs ...func(tx *gorm.DB) error) (err error)
}
would be better to seaprate migration logic from actuall ORM
Click to show internal directories.
Click to hide internal directories.