clause

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clause

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

Clause contains SQL conditions

func (*Clause) Build

func (c *Clause) Build(orders ...Type) (string, []interface{})

Build generate the final SQL and SQLVars

func (*Clause) Get

func (c *Clause) Get(name Type) (string, []interface{})

提供一个Get方法,用于获取Clause中的sql和sqlVars Get returns the sql and sqlVars of specific type

func (*Clause) Set

func (c *Clause) Set(name Type, vars ...interface{})

Set adds a sub clause of specific type

type Type

type Type int

Type is the type of Clause

const (
	INSERT Type = iota
	VALUES
	SELECT
	LIMIT
	OFFSET
	WHERE
	OR
	GROUPBY
	ORDERBY
	HAVING
	UPDATE
	DELETE
	COUNT
	JOIN
)

Support types for Clause

Jump to

Keyboard shortcuts

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