query

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete added in v1.2.21

func Delete(table string, condition condition.Condition) (sql string, args []interface{})

func Insert added in v1.2.21

func Insert(table string, columns Columns, rows []Row, ignore bool) (sql string, args []interface{})

func Update added in v1.2.21

func Update(table, setters string, condition condition.Condition) (sql string, args []interface{})

Types

type Columns added in v1.2.21

type Columns []string

type Query

type Query interface {
	// Select Select表达式
	Select(columns ...string) Query
	// From From表达式
	From(table string) Query
	// Where where表达式
	Where(condition condition.Condition) Query
	// Group Group表达式
	Group(fields ...string) Query
	// Having Having表达式
	Having(having string) Query
	// Order Order表达式
	Order(orders ...string) Query
	// Offset Offset表达式
	Offset(offset int64) Query
	// Limit Limit表达式
	Limit(limit int64) Query
	// Sql 生成sql和参数
	Sql() (sql string, args []interface{})
	// Count 计数
	Count(field string) (sql string, args []interface{})
	// Sum 求和
	Sum(field string) (sql string, args []interface{})
	// Max 最大值
	Max(field string) (sql string, args []interface{})
	// Min 最小值
	Min(field string) (sql string, args []interface{})
	// Avg 平均值
	Avg(field string) (sql string, args []interface{})
	// Close 释放Query
	Close()
}

Query Query对象

func Acquire4Mysql

func Acquire4Mysql() Query

Acquire4Mysql 获取mysqlQuery对象

type Row added in v1.2.21

type Row []interface{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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