Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDB ¶
func NewDB(dialectorResolver DialectorResolver, info *DatabaseInfo, config *gorm.Config, tables []interface{}) *gorm.DB
Types ¶
type DataAccess ¶
type DataAccess interface { Insert(datarow interface{}) Select(datafilter interface{}, preloads ...string) interface{} Update(datafilter interface{}, datarow interface{}) Delete(datafilter interface{}, associateds ...string) }
func NewDataAccess ¶
func NewDataAccess(errorDefer errors.ErrorDefer, db *gorm.DB, modelType reflect.Type) DataAccess
type DataBaseError ¶
type DataBaseError interface { errors.CustomError GetErrorType() DataBaseErrorType }
type DataBaseErrorType ¶
type DataBaseErrorType uint8
DataBaseErrorType is the type of the errors from database
const ( UnexpectedError DataBaseErrorType = iota DataRowUnexpected DataFilterUnexpected )
type DatabaseInfo ¶
type DialectorGetter ¶
type DialectorGetter interface {
Get(info *DatabaseInfo) gorm.Dialector
}
type DialectorResolver ¶
type DialectorResolver interface {
Resolve(info *DatabaseInfo) gorm.Dialector
}
func NewDialectorResolver ¶
func NewDialectorResolver(resolver dependencyinjection.Resolver) DialectorResolver
Source Files ¶
Click to show internal directories.
Click to hide internal directories.