sqltable

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2021 License: Apache-2.0 Imports: 3 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 NewSQLTable

func NewSQLTable() *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) Excluded

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

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

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

func (T *SQLTable) Prepare(s string) *SQLTable

解析sql语句

s string 待解析的sql句子

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

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

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

func (*SQLTable) Value

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

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

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