gorm

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

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 (*GormDatasource) Fields

func (g *GormDatasource) Fields() map[string]datasource.Field

func (*GormDatasource) Find

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL