Documentation ¶
Overview ¶
generated code - do not edit
Index ¶
- type DBWrapper
- func (dbw *DBWrapper) Create(instanceDB any) (db.DBInterface, error)
- func (dbw *DBWrapper) Delete(instanceDB any) (db.DBInterface, error)
- func (dbw *DBWrapper) Find(instanceDBs any) (db.DBInterface, error)
- func (dbw *DBWrapper) First(instanceDB any, conds ...any) (db.DBInterface, error)
- func (dbw *DBWrapper) Model(instanceDB any) (db.DBInterface, error)
- func (dbw *DBWrapper) Save(instanceDB any) (db.DBInterface, error)
- func (dbw *DBWrapper) Unscoped() (db.DBInterface, error)
- func (dbw *DBWrapper) Updates(instanceDB any) (db.DBInterface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBWrapper ¶
type DBWrapper struct {
// contains filtered or unexported fields
}
DBWrapper wraps *gorm.DB and implements the *DBWrapper
func NewDBWrapper ¶
func (*DBWrapper) Create ¶
func (dbw *DBWrapper) Create(instanceDB any) (db.DBInterface, error)
Create inserts the value into the database and returns a new *DBWrapper and an error if any.
func (*DBWrapper) Delete ¶
func (dbw *DBWrapper) Delete(instanceDB any) (db.DBInterface, error)
Delete deletes value from the database.
func (*DBWrapper) Find ¶
func (dbw *DBWrapper) Find(instanceDBs any) (db.DBInterface, error)
Find finds records that match given conditions.
func (*DBWrapper) Model ¶
func (dbw *DBWrapper) Model(instanceDB any) (db.DBInterface, error)
Model specifies the model you would like to run db operations against.
func (*DBWrapper) Save ¶
func (dbw *DBWrapper) Save(instanceDB any) (db.DBInterface, error)
Save updates value in the database.
Click to show internal directories.
Click to hide internal directories.