sqlbuilder

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: MIT Imports: 2 Imported by: 85

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) *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) 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) 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