Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface { FindOne(c context.Context, model interface{}, filter interface{}, item interface{}) error FindMany(c context.Context, model interface{}, filter interface{}, items interface{}) error FindPage(c context.Context, model interface{}, filter interface{}, page, size int, items interface{}) error Insert(c context.Context, model interface{}, item interface{}) error DeleteOne(c context.Context, model interface{}, item interface{}) error UpdateOne(c context.Context, model interface{}, filter interface{}, update interface{}) error UpsertOne(c context.Context, model interface{}, update map[string]interface{}, create interface{}) error Transaction(c context.Context, fn func(tx *gorm.DB) error) error Count(c context.Context, model interface{}, filter interface{}) (int64, error) Raw(c context.Context) *gorm.DB WithPage(page, size int) *gorm.DB }
func NewDatabase ¶
Click to show internal directories.
Click to hide internal directories.