xmysql

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect() error

func Unmarshal

func Unmarshal(v interface{}, data xjson.M)

Types

type XBuilder

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

func NewBuilder

func NewBuilder(table ...string) *XBuilder

func (*XBuilder) Add

func (this *XBuilder) Add(data xjson.M) (int64, error)

func (*XBuilder) Alias

func (this *XBuilder) Alias(alias string) *XBuilder

func (*XBuilder) Commit

func (this *XBuilder) Commit() error

func (*XBuilder) Del

func (this *XBuilder) Del(id ...uint32) (int64, error)

func (*XBuilder) Exce

func (this *XBuilder) Exce(_sql string, format ...interface{}) (sql.Result, error)

func (*XBuilder) Field

func (this *XBuilder) Field(field string) *XBuilder

func (*XBuilder) Find

func (this *XBuilder) Find() (xjson.M, error)

传入一个v结构体,通过结构体进行序列化 @return 查询是否出错

func (*XBuilder) FindObj

func (this *XBuilder) FindObj(v interface{}) error

传入一个v结构体,通过结构体进行序列化 @return 查询是否出错

func (*XBuilder) GetLastSql

func (this *XBuilder) GetLastSql() string

func (*XBuilder) Group

func (this *XBuilder) Group(group string) *XBuilder

func (*XBuilder) Having

func (this *XBuilder) Having(having string) *XBuilder

func (*XBuilder) LeftJoin

func (this *XBuilder) LeftJoin(table string, on string) *XBuilder

func (*XBuilder) Limit

func (this *XBuilder) Limit(n int, m ...int) *XBuilder

limit n,m -> Limit(n,m) limit n -> Limit(n)

func (*XBuilder) OnDuplicateKey

func (this *XBuilder) OnDuplicateKey(data string) *XBuilder

func (*XBuilder) Order

func (this *XBuilder) Order(order string) *XBuilder

func (*XBuilder) Query

func (this *XBuilder) Query(sql string) (xjson.A, error)

func (*XBuilder) ReplaceInfo

func (this *XBuilder) ReplaceInfo(data xjson.M) (int64, error)

func (*XBuilder) RightJoin

func (this *XBuilder) RightJoin(table string, on string) *XBuilder

func (*XBuilder) Rollback

func (this *XBuilder) Rollback() error

func (*XBuilder) Save

func (this *XBuilder) Save(data xjson.M) (int64, error)

func (*XBuilder) SelctObj

func (this *XBuilder) SelctObj(v interface{}) error

传入一个v结构体,通过结构体进行序列化 @return 查询是否出错

func (*XBuilder) Select

func (this *XBuilder) Select() (xjson.A, error)

传入一个v结构体,通过结构体进行序列化 @return 查询是否出错

func (*XBuilder) StartTrans

func (this *XBuilder) StartTrans() error

事务启动

func (*XBuilder) Table

func (this *XBuilder) Table(table string) *XBuilder

func (*XBuilder) Where

func (this *XBuilder) Where(where string, format ...interface{}) *XBuilder

type XMysql

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

Jump to

Keyboard shortcuts

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