internal

package
v0.0.0-...-2022bb5 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FloorColumns

type FloorColumns struct {
	Id        string //
	LibId     string //
	FloorName string //
	CreatedAt string //
	UpdatedAt string //
}

FloorColumns defines and stores column names for table floor.

type FloorDao

type FloorDao struct {
	// contains filtered or unexported fields
}

FloorDao is the data access object for table floor.

func NewFloorDao

func NewFloorDao() *FloorDao

NewFloorDao creates and returns a new DAO object for table data access.

func (*FloorDao) Columns

func (dao *FloorDao) Columns() FloorColumns

Columns returns all column names of current dao.

func (*FloorDao) Ctx

func (dao *FloorDao) Ctx(ctx context.Context) *gdb.Model

Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.

func (*FloorDao) DB

func (dao *FloorDao) DB() gdb.DB

DB retrieves and returns the underlying raw database management object of current DAO.

func (*FloorDao) Group

func (dao *FloorDao) Group() string

Group returns the configuration group name of database of current dao.

func (*FloorDao) Table

func (dao *FloorDao) Table() string

Table returns the table name of current dao.

func (*FloorDao) Transaction

func (dao *FloorDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error)

Transaction wraps the transaction logic using function f. It rollbacks the transaction and returns the error from function f if it returns non-nil error. It commits the transaction and returns nil if function f returns nil.

Note that, you should not Commit or Rollback the transaction in function f as it is automatically handled by this function.

type LibColumns

type LibColumns struct {
	Id        string //
	LibName   string //
	Address   string // 地址
	Active    string // 是否正在使用
	CreatedAt string //
	UpdatedAt string //
}

LibColumns defines and stores column names for table lib.

type LibDao

type LibDao struct {
	// contains filtered or unexported fields
}

LibDao is the data access object for table lib.

func NewLibDao

func NewLibDao() *LibDao

NewLibDao creates and returns a new DAO object for table data access.

func (*LibDao) Columns

func (dao *LibDao) Columns() LibColumns

Columns returns all column names of current dao.

func (*LibDao) Ctx

func (dao *LibDao) Ctx(ctx context.Context) *gdb.Model

Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.

func (*LibDao) DB

func (dao *LibDao) DB() gdb.DB

DB retrieves and returns the underlying raw database management object of current DAO.

func (*LibDao) Group

func (dao *LibDao) Group() string

Group returns the configuration group name of database of current dao.

func (*LibDao) Table

func (dao *LibDao) Table() string

Table returns the table name of current dao.

func (*LibDao) Transaction

func (dao *LibDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error)

Transaction wraps the transaction logic using function f. It rollbacks the transaction and returns the error from function f if it returns non-nil error. It commits the transaction and returns nil if function f returns nil.

Note that, you should not Commit or Rollback the transaction in function f as it is automatically handled by this function.

type LocationColumns

type LocationColumns struct {
	Id           string //
	LibId        string //
	FloorId      string //
	LocationName string //
	CreatedAt    string //
	UpdatedAt    string //
}

LocationColumns defines and stores column names for table location.

type LocationDao

type LocationDao struct {
	// contains filtered or unexported fields
}

LocationDao is the data access object for table location.

func NewLocationDao

func NewLocationDao() *LocationDao

NewLocationDao creates and returns a new DAO object for table data access.

func (*LocationDao) Columns

func (dao *LocationDao) Columns() LocationColumns

Columns returns all column names of current dao.

func (*LocationDao) Ctx

func (dao *LocationDao) Ctx(ctx context.Context) *gdb.Model

Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.

func (*LocationDao) DB

func (dao *LocationDao) DB() gdb.DB

DB retrieves and returns the underlying raw database management object of current DAO.

func (*LocationDao) Group

func (dao *LocationDao) Group() string

Group returns the configuration group name of database of current dao.

func (*LocationDao) Table

func (dao *LocationDao) Table() string

Table returns the table name of current dao.

func (*LocationDao) Transaction

func (dao *LocationDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error)

Transaction wraps the transaction logic using function f. It rollbacks the transaction and returns the error from function f if it returns non-nil error. It commits the transaction and returns nil if function f returns nil.

Note that, you should not Commit or Rollback the transaction in function f as it is automatically handled by this function.

Jump to

Keyboard shortcuts

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