demo1

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Prefix added in v0.9.9

func Prefix() string

Prefix 取表名前缀

Types

type MyAgent added in v0.9.11

type MyAgent interface {
	libgorm.Agent
}

MyAgent ... 本组数据源代理

type TaDao added in v0.9.9

type TaDao interface {
	Find(id int) (*TableA, error)
}

TaDao ...

type TaDaoImpl added in v0.9.9

type TaDaoImpl struct {
	Src MyAgent //starter:inject("#")
}

TaDaoImpl ...

func (*TaDaoImpl) Find added in v0.9.9

func (inst *TaDaoImpl) Find(id int) (*TableA, error)

Find ...

type TableA

type TableA struct {
	ID       int
	ValueInt int
}

TableA ...

func (TableA) TableName

func (t TableA) TableName() string

TableName ...

type TableB

type TableB struct {
	ID        int
	ValueBool bool
}

TableB ...

func (TableB) TableName

func (t TableB) TableName() string

TableName ...

type TableC

type TableC struct {
	ID       int
	ValueStr string
}

TableC ...

func (TableC) TableName

func (t TableC) TableName() string

TableName ...

type TableReg

type TableReg struct {
	DSMan      libgorm.DataSourceManager //starter:inject("#")
	Prefix     string                    //starter:inject("datagroup.demo1.table-name-prefix")
	URI        string                    //starter:inject("datagroup.demo1.uri")
	SourceName string                    //starter:inject("datagroup.demo1.datasource")
	// contains filtered or unexported fields
}

TableReg ...

func (*TableReg) DB added in v0.9.9

func (inst *TableReg) DB(db *gorm.DB) *gorm.DB

DB ...

func (*TableReg) Groups added in v0.9.11

func (inst *TableReg) Groups() []*libgorm.GroupRegistration

Groups ...

func (*TableReg) Prototypes added in v0.9.11

func (inst *TableReg) Prototypes() []any

Prototypes ...

type TbDao added in v0.9.9

type TbDao interface {
	Find(id int) (*TableB, error)
}

TbDao ...

type TbDaoImpl added in v0.9.9

type TbDaoImpl struct {
	Src MyAgent //starter:inject("#")

}

TbDaoImpl ...

func (*TbDaoImpl) Find added in v0.9.9

func (inst *TbDaoImpl) Find(id int) (*TableB, error)

Find ...

type TcDao added in v0.9.9

type TcDao interface {
	Find(id int) (*TableC, error)
}

TcDao ...

type TcDaoImpl added in v0.9.9

type TcDaoImpl struct {
	Src MyAgent //starter:inject("#")

}

TcDaoImpl ...

func (*TcDaoImpl) Find added in v0.9.9

func (inst *TcDaoImpl) Find(id int) (*TableC, error)

Find ...

Jump to

Keyboard shortcuts

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