godb2

package
v0.0.0-...-d3e4993 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TimeType          = reflect.TypeOf(c_TIME_DEFAULT)
	ErrRecordNotFound = errors.New("record not found")
)

Functions

func InitModel

func InitModel() error

Types

type Cond

type Cond interface {
	IsValid() bool
}

func And

func And(conds ...Cond) Cond

type EngStmt

type EngStmt struct {
	sync.Locker
	Tx *sql.Tx

	Args []interface{}
	// contains filtered or unexported fields
}

func (*EngStmt) CheckExit

func (tx *EngStmt) CheckExit(query interface{}, args ...interface{}) (bool, error)

func (*EngStmt) Commit

func (tx *EngStmt) Commit() error

func (*EngStmt) Exec

func (tx *EngStmt) Exec(query string, args ...interface{}) error

func (*EngStmt) FindOne

func (s *EngStmt) FindOne(links interface{}, querystring string, args ...interface{}) (bool, error)

func (*EngStmt) Get

func (tx *EngStmt) Get(bean interface{}) (b bool, e error)

func (*EngStmt) GetAll

func (tx *EngStmt) GetAll(rowsSlicePtr interface{}) (b bool, e error)

func (*EngStmt) GetCurrentSchema

func (tx *EngStmt) GetCurrentSchema() (sc string)

func (*EngStmt) HasSchema

func (tx *EngStmt) HasSchema(tblName string) (bool, []string)

func (*EngStmt) Insert

func (s *EngStmt) Insert(bean interface{}) (bool, error)

func (*EngStmt) Query

func (tx *EngStmt) Query(query interface{}, args ...interface{}) (*sql.Rows, error)

func (*EngStmt) QueryRow

func (tx *EngStmt) QueryRow(query interface{}, args ...interface{}) *sql.Row

func (*EngStmt) Rollback

func (tx *EngStmt) Rollback() error

func (*EngStmt) SETSchema

func (tx *EngStmt) SETSchema(schema string) error

func (*EngStmt) Uptade

func (tx *EngStmt) Uptade(bean interface{}) (bool, error)

func (*EngStmt) Where

func (tx *EngStmt) Where(query interface{}, args ...interface{}) *EngStmt

type EngineDb2

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

func GetInstance

func GetInstance() *EngineDb2

func (*EngineDb2) Begin

func (e *EngineDb2) Begin() (*EngStmt, error)

func (*EngineDb2) Close

func (e *EngineDb2) Close() error

func (*EngineDb2) Query

func (e *EngineDb2) Query(query interface{}, args ...interface{}) (*sql.Rows, error)

func (*EngineDb2) QueryRow

func (e *EngineDb2) QueryRow(query interface{}, args ...interface{}) *sql.Row

type TableName

type TableName interface {
	TableName() string
}

Jump to

Keyboard shortcuts

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