Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
type Kind int
Kind of a token.
const ( //Illegal token. Illegal Kind = iota //Literal token. Literal //String (single, double, bracket, back tick, or blob) token. String //Argument is @NNN or @ENV_VAR token. Argument //Placeholder is a pseudo-token for lifting non-standard subqueries //out of regular sql. Placeholder //LParen is a ( token. LParen //RParen is a ) token. RParen //Semicolon is a ; token. Semicolon )
type Value ¶
type Value struct { Position Kind //Value is only valid if !Kind.Empty() Value string //Canon is only valid if Kind == Literal and is strings.ToUpper(Value) Canon string //StringKind is only valid if Kind == String. //If valid it will be one of ' " ` [ or x (for blob literals). StringKind rune //Err is only non-nil if Kind == Illegal. Err error }
Value of token in input.
func NewLiteral ¶
func (Value) AnyLiteral ¶
AnyLiteral sees if v is any of the ss.
func (Value) Equal ¶
Equal if the same kind and value. Illegal, String, and Placeholder tokens are never equal.
func (Value) Head ¶
Head is true if v is a literal whose canonical value is one of the list of valid literals for beginning a statement, as recognized by this SQLite superset.
Click to show internal directories.
Click to hide internal directories.