repository

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: AGPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetId

func GetId(md interface{}) (interface{}, bool)

func SetId

func SetId(md interface{}, id interface{}) bool

Types

type DbSession

type DbSession interface {
	Sync(bean ...interface{}) error
	Get(dest interface{}, locked bool, orderby string, conds string, params ...interface{}) (bool, error)
	Find(rowsSlicePtr interface{}, md interface{}, orderby string, from int, limit int, conds string, params ...interface{}) error
	Insert(mds ...interface{}) (int64, error)
	Update(md interface{}, columns []string, conds string, params ...interface{}) (int64, error)
	Delete(md interface{}, conds string, params ...interface{}) (int64, error)
	Exec(clause string, params ...interface{}) (sql.Result, error)
	Query(clause string, params ...interface{}) ([]map[string][]byte, error)
	Count(bean interface{}, conds string, params ...interface{}) (int64, error)
	Transaction(fc func(s DbSession) error) error
	Begin() error
	Rollback() error
	Commit() error
	Close() error
}

type QueryBuilder

type QueryBuilder struct {
	Clause     string
	Select     string
	Distinct   []string
	From       interface{}
	Join       []string
	On         string
	Where      string
	OrderBy    string
	GroupBy    string
	Limit      int
	Offset     int
	Args       []interface{}
	Containers []interface{}
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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