cherryORM

package
v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Component added in v1.1.1

type Component struct {
	cherryFacade.Component
	// contains filtered or unexported fields
}

func NewComponent added in v1.1.4

func NewComponent() *Component

func (*Component) GetDb added in v1.1.1

func (s *Component) GetDb(id string) *gorm.DB

func (*Component) GetDbMap added in v1.1.5

func (s *Component) GetDbMap(groupId string) (map[string]*gorm.DB, bool)

func (*Component) GetHashDb added in v1.1.5

func (s *Component) GetHashDb(groupId string, hash HashDb) (*gorm.DB, bool)

func (*Component) Init added in v1.1.1

func (s *Component) Init()

func (*Component) Name added in v1.1.1

func (s *Component) Name() string

type HashDb added in v1.1.5

type HashDb func(dbMaps map[string]*gorm.DB) string

HashDb hash by group id

type IntIntMap added in v1.1.6

type IntIntMap map[int]int

func (IntIntMap) GormDBDataType added in v1.1.6

func (IntIntMap) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (IntIntMap) GormDataType added in v1.1.6

func (m IntIntMap) GormDataType() string

GormDataType gorm common data type

func (IntIntMap) MarshalJSON added in v1.1.6

func (m IntIntMap) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*IntIntMap) Scan added in v1.1.6

func (m *IntIntMap) Scan(val interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*IntIntMap) UnmarshalJSON added in v1.1.6

func (m *IntIntMap) UnmarshalJSON(b []byte) error

UnmarshalJSON to deserialize []byte

func (IntIntMap) Value added in v1.1.6

func (m IntIntMap) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type IntList added in v1.1.6

type IntList []int

func (IntList) GormDBDataType added in v1.1.6

func (IntList) GormDBDataType(db *gorm.DB, field *schema.Field) string

GormDBDataType gorm db data type

func (IntList) GormDataType added in v1.1.6

func (m IntList) GormDataType() string

GormDataType gorm common data type

func (IntList) MarshalJSON added in v1.1.6

func (m IntList) MarshalJSON() ([]byte, error)

MarshalJSON to output non base64 encoded []byte

func (*IntList) Scan added in v1.1.6

func (m *IntList) Scan(val interface{}) error

Scan scan value into Jsonb, implements sql.Scanner interface

func (*IntList) UnmarshalJSON added in v1.1.6

func (m *IntList) UnmarshalJSON(b []byte) error

UnmarshalJSON to deserialize []byte

func (IntList) Value added in v1.1.6

func (m IntList) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

Jump to

Keyboard shortcuts

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