sqltable

package module
v0.0.0-...-67fc032 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLTable

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

func Prepare

func Prepare(s string) *SQLTable

func (*SQLTable) And

func (T *SQLTable) And(column string, value interface{}) *SQLTable

他会替换语句中的 $Where$ 符号

func (*SQLTable) Ands

func (T *SQLTable) Ands(a ...interface{}) *SQLTable

他会替换语句中的 $Where$ 符号

func (*SQLTable) Args

func (T *SQLTable) Args(args ...interface{}) []interface{}

载入参数,他会替换语句中的?符号

args ...interface{}		额外参数,在非解析SQL句子里的?
[]interface{}			返回所有参数

func (*SQLTable) ColumnMark

func (T *SQLTable) ColumnMark(q string) *SQLTable

可以对字段名加引号或者其它什么的

func (*SQLTable) Copy

func (T *SQLTable) Copy() *SQLTable

func (*SQLTable) Excluded

func (T *SQLTable) Excluded(a ...string) *SQLTable

他会替换语句中的 $Excluded$ 符号 excluded 用于在插入存在,则更新时,排除的例名

func (*SQLTable) ExtArgs

func (T *SQLTable) ExtArgs(args ...interface{}) *SQLTable

扩展参数

args ...interface{}		额外参数,在非解析SQL句子里的?

func (*SQLTable) Or

func (T *SQLTable) Or(column string, value interface{}) *SQLTable

他会替换语句中的 $Where$ 符号

func (*SQLTable) Ors

func (T *SQLTable) Ors(a ...interface{}) *SQLTable

他会替换语句中的 $Where$ 符号

func (*SQLTable) SQL

func (T *SQLTable) SQL() string

返回sql语句,需要先调用.Args方法再调用该方法

string 格式后的SQL句子

func (*SQLTable) Set

func (T *SQLTable) Set(column string, value interface{}) *SQLTable

他会替换语句中的 $Set$ 符号

func (*SQLTable) SetValues

func (T *SQLTable) SetValues(v ...interface{}) []interface{}

读取所有值

func (*SQLTable) Sets

func (T *SQLTable) Sets(a ...interface{}) *SQLTable

他会替换语句中的 $Set$ 符号

func (*SQLTable) ToFuncs

func (T *SQLTable) ToFuncs(a ...interface{}) *SQLTable

支持设置函数转转

func (*SQLTable) ToTypes

func (T *SQLTable) ToTypes(a ...interface{}) *SQLTable

支持设置转换类型

func (*SQLTable) Value

func (T *SQLTable) Value(column string, value interface{}) *SQLTable

他会替换语句中的 $Values$ 符号

func (*SQLTable) ValueValues

func (T *SQLTable) ValueValues(v ...interface{}) []interface{}

读取所有值

func (*SQLTable) Values

func (T *SQLTable) Values(a ...interface{}) *SQLTable

他会替换语句中的 $Values$ 符号

func (*SQLTable) Where

func (T *SQLTable) Where(symbol, column string, value interface{}) *SQLTable

他会替换语句中的 $Where$ 符号

Jump to

Keyboard shortcuts

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