datahub

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 6 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

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

func NewHub

func NewHub(fn func() (dbflex.IConnection, error), usePool bool, poolsize int) *Hub

func (*Hub) Close

func (h *Hub) Close()

func (*Hub) CloseConnection

func (h *Hub) CloseConnection(idx int, conn dbflex.IConnection)

func (*Hub) Count

func (h *Hub) Count(data orm.DataModel, qp *dbflex.QueryParam) (int, error)

func (*Hub) Delete

func (h *Hub) Delete(data orm.DataModel) error

func (*Hub) DeleteQuery

func (h *Hub) DeleteQuery(model orm.DataModel, where *dbflex.Filter) error

func (*Hub) Execute

func (h *Hub) Execute(cmd dbflex.ICommand, object interface{}, parm toolkit.M) (interface{}, error)

func (*Hub) Get

func (h *Hub) Get(data orm.DataModel) error

func (*Hub) GetByID

func (h *Hub) GetByID(data orm.DataModel, ids ...interface{}) error

func (*Hub) GetByParm

func (h *Hub) GetByParm(data orm.DataModel, parm *dbflex.QueryParam) error

func (*Hub) GetClassicConnection

func (h *Hub) GetClassicConnection() (dbflex.IConnection, error)

func (*Hub) GetConnection

func (h *Hub) GetConnection() (int, dbflex.IConnection, error)

func (*Hub) Gets

func (h *Hub) Gets(data orm.DataModel, parm *dbflex.QueryParam, dest interface{}) error

func (*Hub) Insert

func (h *Hub) Insert(data orm.DataModel) error

func (*Hub) Log

func (h *Hub) Log() *toolkit.LogEngine

func (*Hub) PoolSize

func (h *Hub) PoolSize() int

func (*Hub) Populate

func (h *Hub) Populate(cmd dbflex.ICommand, parm toolkit.M, result interface{}) (int, error)

func (*Hub) PopulateByParm

func (h *Hub) PopulateByParm(tableName string, parm *dbflex.QueryParam, dest interface{}) error

func (*Hub) Save

func (h *Hub) Save(data orm.DataModel) error

func (*Hub) SaveAny

func (h *Hub) SaveAny(name string, object interface{}) error

func (*Hub) SetAutoCloseDuration

func (h *Hub) SetAutoCloseDuration(d time.Duration) *Hub

func (*Hub) SetAutoReleaseDuration

func (h *Hub) SetAutoReleaseDuration(d time.Duration) *Hub

func (*Hub) SetLog

func (h *Hub) SetLog(l *toolkit.LogEngine) *Hub

func (*Hub) Update

func (h *Hub) Update(data orm.DataModel) error

func (*Hub) UpdateAny added in v0.1.2

func (h *Hub) UpdateAny(name string, object interface{}, fields ...string) error

func (*Hub) UpdateField

func (h *Hub) UpdateField(data orm.DataModel, where *dbflex.Filter, fields ...string) error

func (*Hub) UsePool

func (h *Hub) UsePool() bool

Jump to

Keyboard shortcuts

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