sql

package
v0.0.0-...-62252a8 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: MulanPSL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InTx

func InTx(txFunc TxFunc, ormObj ...orm.Ormer) (err error)

func ParseNoRowsErr

func ParseNoRowsErr(err error) error

Types

type SqlBuilder

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

func NewSqlBuilder

func NewSqlBuilder(table string) *SqlBuilder

func NewSqlBuilderWithOrm

func NewSqlBuilderWithOrm(table string, o orm.Ormer) *SqlBuilder

func (*SqlBuilder) Alias

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

func (*SqlBuilder) CountString

func (this *SqlBuilder) CountString() string

func (*SqlBuilder) Dec

func (this *SqlBuilder) Dec(fieldname string, step int) (result sql.Result, err error)

func (*SqlBuilder) Fields

func (this *SqlBuilder) Fields(fields string) *SqlBuilder

func (*SqlBuilder) Filter

func (this *SqlBuilder) Filter(field string, value interface{}) *SqlBuilder

func (*SqlBuilder) Inc

func (this *SqlBuilder) Inc(fieldname string, step int) (result sql.Result, err error)

func (*SqlBuilder) Limit

func (this *SqlBuilder) Limit(offset int, size int) *SqlBuilder

func (*SqlBuilder) Order

func (this *SqlBuilder) Order(orderString string) *SqlBuilder

func (*SqlBuilder) Page

func (this *SqlBuilder) Page(page, pageSize int) *SqlBuilder

func (*SqlBuilder) Params

func (this *SqlBuilder) Params() []interface{}

func (*SqlBuilder) QueryCount

func (this *SqlBuilder) QueryCount() (int64, error)

func (*SqlBuilder) QueryRow

func (this *SqlBuilder) QueryRow(containers ...interface{}) error

func (*SqlBuilder) QueryRows

func (this *SqlBuilder) QueryRows(containers ...interface{}) error

func (*SqlBuilder) QueryScalar

func (this *SqlBuilder) QueryScalar(scalar interface{}) error

func (*SqlBuilder) Quot

func (this *SqlBuilder) Quot(str string, escapePercent bool) string

func (*SqlBuilder) RawFilter

func (this *SqlBuilder) RawFilter(whereStr string, params ...interface{}) *SqlBuilder

func (*SqlBuilder) RawWhere

func (this *SqlBuilder) RawWhere(whereStr string, params ...interface{}) *SqlBuilder

func (*SqlBuilder) Reset

func (this *SqlBuilder) Reset(table string) *SqlBuilder

func (*SqlBuilder) String

func (this *SqlBuilder) String() string

func (*SqlBuilder) StringAndParams

func (this *SqlBuilder) StringAndParams() (string, []interface{})

func (*SqlBuilder) Table

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

func (*SqlBuilder) Update

func (this *SqlBuilder) Update(params orm.Params) (result sql.Result, err error)

func (*SqlBuilder) UpdateString

func (this *SqlBuilder) UpdateString(params orm.Params) string

func (*SqlBuilder) Where

func (this *SqlBuilder) Where(field string, value interface{}) *SqlBuilder

func (*SqlBuilder) WhereString

func (this *SqlBuilder) WhereString(includesWhere bool) string

type SqlWhereBuilder

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

func NewSqlWhereBuilder

func NewSqlWhereBuilder() *SqlWhereBuilder

func (*SqlWhereBuilder) Add

func (this *SqlWhereBuilder) Add(field string, value interface{}) *SqlWhereBuilder

func (*SqlWhereBuilder) IsWhereEmpty

func (this *SqlWhereBuilder) IsWhereEmpty() bool

func (*SqlWhereBuilder) Raw

func (this *SqlWhereBuilder) Raw(whereStr string, values ...interface{}) *SqlWhereBuilder

func (*SqlWhereBuilder) Reset

func (this *SqlWhereBuilder) Reset() *SqlWhereBuilder

func (this *SqlWhereBuilder) {

}

func (*SqlWhereBuilder) WhereAndParams

func (this *SqlWhereBuilder) WhereAndParams(includesWhere bool) (string, []interface{})

func (*SqlWhereBuilder) WhereString

func (this *SqlWhereBuilder) WhereString(includesWhere bool) string

type TxFunc

type TxFunc func(o orm.Ormer) error

Jump to

Keyboard shortcuts

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