keyword

package
v0.0.0-...-81ee819 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Control FLow
	IFNULL Func = "IFNULL"

	// Date and Time functions.
	Adddate          = "ADDDATE"
	Addtime          = "ADDTIME"
	ConvertTz        = "CONVERT_TZ"
	CurDate          = "CURDATE"
	CurrentDate      = "CURRENT_DATE"
	CurrentTime      = "CURRENT_TIME"
	CurrentTimestamp = "CURRENT_TIMESTAMP"
	Curtime          = "CURTIME"
	Date             = "DATE"
	DateAdd          = "DATE_ADD"
	DateFormat       = "DATE_FORMAT"
	DateSub          = "DATE_SUB"
	Datediff         = "DATEDIFF"
	Day              = "DAY"
	Dayname          = "DAYNAME"
	Dayofmonth       = "DAYOFMONTH"
	Dayofweek        = "DAYOFWEEK"
	Dayofyear        = "DAYOFYEAR"
	Extract          = "EXTRACT"
	FromDays         = "FROM_DAYS"
	FromUnixtime     = "FROM_UNIXTIME"
	GetFormat        = "GET_FORMAT"
	Hour             = "HOUR"
	LastDay          = "LAST_DAY"
	Localtime        = "LOCALTIME"
	Localtimestamp   = "LOCALTIMESTAMP"
	Makedate         = "MAKEDATE"
	Maketime         = "MAKETIME"
	Microsecond      = "MICROSECOND"
	Minute           = "MINUTE"
	Month            = "MONTH"
	Monthname        = "MONTHNAME"
	Now              = "NOW"
	PeriodAdd        = "PERIOD_ADD"
	PeriodDiff       = "PERIOD_DIFF"
	Quarter          = "QUARTER"
	SecToTime        = "SEC_TO_TIME"
	Second           = "SECOND"
	StrToDate        = "STR_TO_DATE"
	Subdate          = "SUBDATE"
	Subtime          = "SUBTIME"
	Sysdate          = "SYSDATE"
	Time             = "TIME"
	TimeFormat       = "TIME_FORMAT"
	TimeToSec        = "TIME_TO_SEC"
	Timediff         = "TIMEDIFF"
	Timestamp        = "TIMESTAMP"
	Timestampadd     = "TIMESTAMPADD"
	Timestampdiff    = "TIMESTAMPDIFF"
	ToDays           = "TO_DAYS"
	ToSeconds        = "TO_SECONDS"
	UnixTimestamp    = "UNIX_TIMESTAMP"
	UtcDate          = "UTC_DATE"
	UtcTime          = "UTC_TIME"
	UtcTimestamp     = "UTC_TIMESTAMP"
	Week             = "WEEK"
	Weekday          = "WEEKDAY"
	Weekofyear       = "WEEKOFYEAR"
	Year             = "YEAR"
	Yearweek         = "YEARWEEK"

	// Numeric functions
	Count = "COUNT"
	Max   = "MAX"
)
View Source
const (
	Select        = "SELECT"
	Distinct      = "DISTINCT"
	From          = "FROM"
	Where         = "WHERE"
	OrderBy       = "ORDER BY"
	GroupBy       = "GROUP BY"
	Having        = "HAVING"
	Limit         = "LIMIT"
	Offset        = "OFFSET"
	InsertInto    = "INSERT INTO"
	Values        = "VALUES"
	DefaultValues = "DEFAULT VALUES"
	Update        = "UPDATE"
	Set           = "SET"
	Delete        = "DELETE"
	CreateTable   = "CREATE TABLE"
	IfNotExists   = "IF NOT EXISTS"

	Case = "CASE"
	When = "WHEN"
	Then = "THEN"
	Else = "ELSE"
	End  = "END"

	Join      = "JOIN"
	InnerJoin = "INNER JOIN"
	LeftJoin  = "LEFT JOIN"
	RightJoin = "RIGHT JOIN"
	On        = "ON"
	Using     = "USING"

	Null = "NULL"
)

Keywords of SQL.

View Source
const (
	Union        = "UNION"
	UnionAll     = "UNION ALL"
	Intersect    = "INTERSECT"
	IntersectAll = "INTERSECT ALL"
	Except       = "EXCEPT"
	ExceptAll    = "EXCEPT ALL"
)

Set operators.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction string

Direction points the direction of the order.

const (
	// ASC indicates forward order.
	ASC Direction = "ASC"
	// DESC indicates reverse order.
	DESC Direction = "DESC"
)

type Func

type Func string

Func points the built-in functions.

type Operator

type Operator string

Operator is reserved keyword in SQL statement.

const (
	And Operator = "AND"
	Or  Operator = "OR"
	Not Operator = "NOT"

	Unique Operator = "UNIQUE"

	Like   Operator = "LIKE"
	RegExp Operator = "REGEXP"

	Between Operator = "BETWEEN"

	In    Operator = "IN"
	NotIn Operator = "NOT IN"

	Is    Operator = "IS"
	IsNot Operator = "IS NOT"
)

Logical operators.

const (
	Eq    Operator = "="
	NotEq Operator = "!="
	Gt    Operator = ">"
	Gte   Operator = ">="
	Lt    Operator = "<"
	Lte   Operator = "<="
)

Scalar Comparison operators.

const (
	EqAll     Operator = "= ALL"
	NotEqAll  Operator = "!= ALL"
	GtAll     Operator = "> ALL"
	GteAll    Operator = ">= ALL"
	LtAll     Operator = "< ALL"
	LteAll    Operator = "<= ALL"
	EqAny     Operator = "= ANY"
	NotEqAny  Operator = "!= ANY"
	GtAny     Operator = "> ANY"
	GteAny    Operator = ">= ANY"
	LtAny     Operator = "< ANY"
	LteAny    Operator = "<= ANY"
	Exists    Operator = "EXISTS"
	NotExists Operator = "NOT EXISTS"
)

Non-Scalar Comparison operators.

const (
	Add        Operator = "+"
	Sub        Operator = "-"
	Mul        Operator = "*"
	Div        Operator = "/"
	IntegerDiv Operator = "DIV"
	Mod        Operator = "%"
)

Arithmetic operators.

const (
	As Operator = "AS"
)

Alias operators.

Jump to

Keyboard shortcuts

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