sqlbuilder

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 2 Imported by: 71

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Query

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

Query 查询mysql数据库

func NewQuery

func NewQuery(querySQL string, args ...interface{}) *Query

NewQuery new 实例

func (*Query) Build

func (q *Query) Build() (stmt string, args []interface{})

Build 组件SQL

func (*Query) Desc

func (q *Query) Desc() *Query

Desc todo

func (*Query) GroupBy added in v0.3.5

func (q *Query) GroupBy(d string) *Query

GroupBy todo

func (*Query) Having added in v0.3.5

func (q *Query) Having(stmt string, v ...interface{}) *Query

Having 添加参数

func (*Query) HavingArgs added in v0.3.5

func (q *Query) HavingArgs() []interface{}

HavingArgs where 语句的参数

func (*Query) HavingStmt added in v0.3.5

func (q *Query) HavingStmt() []string

HavingStmt where条件列表

func (*Query) Limit

func (q *Query) Limit(offset int64, limit uint) *Query

Limit Limit

func (*Query) Order

func (q *Query) Order(d string) *Query

Order todo

func (*Query) Where

func (q *Query) Where(stmt string, v ...interface{}) *Query

Where 添加参数

func (*Query) WhereArgs

func (q *Query) WhereArgs() []interface{}

WhereArgs where 语句的参数

func (*Query) WhereStmt

func (q *Query) WhereStmt() []string

WhereStmt where条件列表

func (*Query) WithHaving added in v0.3.5

func (q *Query) WithHaving(stmts []string, args []interface{}) *Query

WithHaving 携带条件

func (*Query) WithWhere

func (q *Query) WithWhere(stmts []string, args []interface{}) *Query

WithWhere 携带条件

Jump to

Keyboard shortcuts

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