Documentation ¶
Index ¶
- type GormDatasource
- func (g *GormDatasource) ApplyInclude(ctx datasource.QueryContext, query *gorm.DB) (*gorm.DB, error)
- func (g *GormDatasource) ApplyWhere(ctx datasource.QueryContext, query *gorm.DB) (*gorm.DB, error)
- func (g *GormDatasource) Create(ctx datasource.QueryContext, data interface{}) (*map[string]interface{}, error)
- func (g *GormDatasource) Destroy(ctx datasource.QueryContext) (datasource.ManyAffectedResult, error)
- func (g *GormDatasource) Fields() map[string]datasource.Field
- func (g *GormDatasource) Find(ctx datasource.QueryContext) (*datasource.ListResult, error)
- func (g *GormDatasource) FindOne(ctx datasource.QueryContext) (*map[string]interface{}, error)
- func (g *GormDatasource) Update(ctx datasource.QueryContext, data interface{}) (datasource.ManyAffectedResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GormDatasource ¶
type GormDatasource struct { DB *gorm.DB Model interface{} Properties datasource.Properties // contains filtered or unexported fields }
func NewGormDatasource ¶
func NewGormDatasource(db *gorm.DB, model interface{}) *GormDatasource
func (*GormDatasource) ApplyInclude ¶
func (g *GormDatasource) ApplyInclude(ctx datasource.QueryContext, query *gorm.DB) (*gorm.DB, error)
func (*GormDatasource) ApplyWhere ¶
func (g *GormDatasource) ApplyWhere(ctx datasource.QueryContext, query *gorm.DB) (*gorm.DB, error)
func (*GormDatasource) Create ¶
func (g *GormDatasource) Create(ctx datasource.QueryContext, data interface{}) (*map[string]interface{}, error)
func (*GormDatasource) Destroy ¶
func (g *GormDatasource) Destroy(ctx datasource.QueryContext) (datasource.ManyAffectedResult, error)
func (*GormDatasource) Fields ¶
func (g *GormDatasource) Fields() map[string]datasource.Field
func (*GormDatasource) Find ¶
func (g *GormDatasource) Find(ctx datasource.QueryContext) (*datasource.ListResult, error)
func (*GormDatasource) FindOne ¶
func (g *GormDatasource) FindOne(ctx datasource.QueryContext) (*map[string]interface{}, error)
func (*GormDatasource) Update ¶
func (g *GormDatasource) Update(ctx datasource.QueryContext, data interface{}) (datasource.ManyAffectedResult, error)
Click to show internal directories.
Click to hide internal directories.