Documentation
¶
Index ¶
- Constants
- func FillArgs(stmt Statement, args Args) error
- func WalkStmt(v Visitor, stmt Statement)
- type AliasedTableExpr
- type AndExpr
- type Args
- type ArrayIndirection
- type BinaryExpr
- type BinaryOp
- type BitType
- type BlobType
- type BoolType
- type BoolVal
- type BytesVal
- type CaseExpr
- type CastExpr
- type CharType
- type ColumnConstraint
- type ColumnTableDef
- type ColumnType
- type ComparisonExpr
- type ComparisonOp
- type CreateDatabase
- type CreateTable
- type DBool
- type DFloat
- type DInt
- type DNull
- type DString
- type DTuple
- type DateType
- type Datum
- type DecimalType
- type Delete
- type DropDatabase
- type DropTable
- type Env
- type ExistsExpr
- type Expr
- type Exprs
- type FloatType
- type FuncExpr
- type Grant
- type GroupBy
- type IndexTableDef
- type Indirection
- type IndirectionElem
- type Insert
- type IntType
- type IntVal
- type JoinCond
- type JoinTableExpr
- type Limit
- type Name
- type NameIndirection
- type NameList
- type NonStarExpr
- type NotExpr
- type NotNullConstraint
- type NullCheck
- type NullConstraint
- type NullVal
- type Nullability
- type NumVal
- type OnJoinCond
- type OrExpr
- type Order
- type OrderBy
- type ParenExpr
- type ParenSelect
- type ParenTableExpr
- type PrimaryKeyConstraint
- type PrivilegeList
- type PrivilegeType
- type QualifiedName
- type QualifiedNames
- type RangeCond
- type RenameTable
- type Revoke
- type Row
- type Select
- type SelectExpr
- type SelectExprs
- type SelectStatement
- type Set
- type ShowColumns
- type ShowDatabases
- type ShowIndex
- type ShowTables
- type SimpleTableExpr
- type StarExpr
- type StarIndirection
- type Statement
- type StatementList
- type StrVal
- type Subquery
- type TableDef
- type TableDefs
- type TableExpr
- type TableExprs
- type TargetList
- type TargetType
- type TextType
- type TimeType
- type TimestampType
- type Truncate
- type Tuple
- type UnaryExpr
- type UnaryOp
- type Union
- type UniqueConstraint
- type Update
- type UpdateExpr
- type UpdateExprs
- type UsingJoinCond
- type ValArg
- type Values
- type Visitor
- type When
- type Where
Constants ¶
const ( TargetDatabase TargetType = iota PrivilegeAll PrivilegeType = iota PrivilegeRead PrivilegeWrite )
Enums for target and privilege types.
const ABORT = 57359
const ABSOLUTE = 57360
const ACCESS = 57361
const ACTION = 57362
const ADD = 57363
const ADMIN = 57364
const AFTER = 57365
const AGGREGATE = 57366
const ALL = 57367
const ALSO = 57368
const ALTER = 57369
const ALWAYS = 57370
const ANALYSE = 57371
const ANALYZE = 57372
const AND = 57373
const ANY = 57374
const ARRAY = 57375
const AS = 57376
const ASC = 57377
const ASSERTION = 57378
const ASSIGNMENT = 57379
const ASYMMETRIC = 57380
const AT = 57381
const ATTRIBUTE = 57382
const AUTHORIZATION = 57383
const BACKWARD = 57384
const BCONST = 57349
const BEFORE = 57385
const BEGIN = 57386
const BETWEEN = 57387
const BIGINT = 57388
const BINARY = 57389
const BIT = 57390
const BLOB = 57391
const BOOLEAN = 57392
const BOTH = 57393
const BY = 57394
const CACHE = 57395
const CALLED = 57396
const CASCADE = 57397
const CASCADED = 57398
const CASE = 57399
const CAST = 57400
const CATALOG = 57401
const CHAIN = 57402
const CHAR = 57403
const CHARACTER = 57404
const CHARACTERISTICS = 57405
const CHECK = 57406
const CHECKPOINT = 57407
const CLASS = 57408
const CLOSE = 57409
const CLUSTER = 57410
const COALESCE = 57411
const COLLATE = 57412
const COLLATION = 57413
const COLUMN = 57414
const COLUMNS = 57415
const COMMENT = 57416
const COMMENTS = 57417
const COMMIT = 57418
const COMMITTED = 57419
const CONCAT = 57420
const CONCURRENTLY = 57421
const CONFIGURATION = 57422
const CONFLICT = 57423
const CONNECTION = 57424
const CONSTRAINT = 57425
const CONSTRAINTS = 57426
const CONTENT = 57427
const CONTINUE = 57428
const CONVERSION = 57429
const COPY = 57430
const COST = 57431
const CREATE = 57432
const CROSS = 57433
const CSV = 57434
const CUBE = 57435
const CURRENT = 57436
const CURRENT_CATALOG = 57437
const CURRENT_DATE = 57438
const CURRENT_ROLE = 57439
const CURRENT_SCHEMA = 57440
const CURRENT_TIME = 57441
const CURRENT_TIMESTAMP = 57442
const CURRENT_USER = 57443
const CURSOR = 57444
const CYCLE = 57445
const DATA = 57446
const DATABASE = 57447
const DATABASES = 57448
const DATE = 57449
const DAY = 57450
const DEALLOCATE = 57451
const DEC = 57452
const DECIMAL = 57453
const DECLARE = 57454
const DEFAULT = 57455
const DEFAULTS = 57456
const DEFERRABLE = 57457
const DEFERRED = 57458
const DEFINER = 57459
const DELETE = 57460
const DELIMITER = 57461
const DELIMITERS = 57462
const DESC = 57463
const DICTIONARY = 57464
const DISABLE = 57465
const DISCARD = 57466
const DISTINCT = 57467
const DO = 57468
const DOCUMENT = 57469
const DOMAIN = 57470
const DOT_DOT = 57354
const DOUBLE = 57471
const DROP = 57472
const EACH = 57473
const ELSE = 57474
const ENABLE = 57475
const ENCODING = 57476
const ENCRYPTED = 57477
const END = 57478
const ENUM = 57479
const ERROR = 57358
const ESCAPE = 57480
const EVENT = 57481
const EXCEPT = 57482
const EXCLUDE = 57483
const EXCLUDING = 57484
const EXCLUSIVE = 57485
const EXECUTE = 57486
const EXISTS = 57487
const EXPLAIN = 57488
const EXTENSION = 57489
const EXTERNAL = 57490
const EXTRACT = 57491
const FALSE = 57492
const FAMILY = 57493
const FCONST = 57347
const FETCH = 57494
const FILTER = 57495
const FIRST = 57496
const FLOAT = 57497
const FOLLOWING = 57498
const FOR = 57499
const FORCE = 57500
const FOREIGN = 57501
const FORWARD = 57502
const FREEZE = 57503
const FROM = 57504
const FULL = 57505
const FUNCTION = 57506
const FUNCTIONS = 57507
const GLOBAL = 57508
const GRANT = 57509
const GRANTED = 57510
const GREATER_EQUALS = 57356
const GREATEST = 57511
const GROUP = 57512
const GROUPING = 57513
const HANDLER = 57514
const HAVING = 57515
const HEADER = 57516
const HOLD = 57517
const HOUR = 57518
const ICONST = 57351
const IDENT = 57346
const IDENTITY = 57519
const IF = 57520
const IMMEDIATE = 57521
const IMMUTABLE = 57522
const IMPLICIT = 57523
const IMPORT = 57524
const IN = 57525
const INCLUDING = 57526
const INCREMENT = 57527
const INDEX = 57528
const INDEXES = 57529
const INHERIT = 57530
const INHERITS = 57531
const INITIALLY = 57532
const INLINE = 57533
const INNER = 57534
const INOUT = 57535
const INPUT = 57536
const INSENSITIVE = 57537
const INSERT = 57538
const INSTEAD = 57539
const INT = 57540
const INTEGER = 57541
const INTERSECT = 57542
const INTERVAL = 57543
const INTO = 57544
const INVOKER = 57545
const IS = 57546
const ISOLATION = 57547
const JOIN = 57548
const KEY = 57549
const LABEL = 57550
const LANGUAGE = 57551
const LARGE = 57552
const LAST = 57553
const LATERAL = 57554
const LEADING = 57555
const LEAKPROOF = 57556
const LEAST = 57557
const LEFT = 57558
const LESS_EQUALS = 57355
const LEVEL = 57559
const LIKE = 57560
const LIMIT = 57561
const LISTEN = 57562
const LOAD = 57563
const LOCAL = 57564
const LOCALTIME = 57565
const LOCALTIMESTAMP = 57566
const LOCATION = 57567
const LOCK = 57568
const LOCKED = 57569
const LOGGED = 57570
const MAPPING = 57571
const MATCH = 57572
const MATERIALIZED = 57573
const MAXVALUE = 57574
const MINUTE = 57575
const MINVALUE = 57576
const MODE = 57577
const MONTH = 57578
const MOVE = 57579
const NAME = 57580
const NAMES = 57581
const NATIONAL = 57582
const NATURAL = 57583
const NCHAR = 57584
const NEXT = 57585
const NO = 57586
const NONE = 57587
const NOT = 57588
const NOTHING = 57589
const NOTIFY = 57590
const NOT_EQUALS = 57357
const NOT_LA = 57766
const NOWAIT = 57591
const NULL = 57592
const NULLIF = 57593
const NULLS = 57594
const NULLS_LA = 57767
const NUMERIC = 57595
const OBJECT = 57596
const OF = 57597
const OFF = 57598
const OFFSET = 57599
const OIDS = 57600
const ON = 57601
const ONLY = 57602
const OPTION = 57603
const OPTIONS = 57604
const OR = 57605
const ORDER = 57606
const ORDINALITY = 57607
const OUT = 57608
const OUTER = 57609
const OVER = 57610
const OVERLAPS = 57611
const OVERLAY = 57612
const OWNED = 57613
const OWNER = 57614
const PARAM = 57352
const PARSER = 57615
const PARTIAL = 57616
const PARTITION = 57617
const PASSING = 57618
const PASSWORD = 57619
const PLACING = 57620
const PLANS = 57621
const POLICY = 57622
const POSITION = 57623
const POSTFIXOP = 57769
const PRECEDING = 57624
const PRECISION = 57625
const PREPARE = 57627
const PREPARED = 57628
const PRESERVE = 57626
const PRIMARY = 57629
const PRIOR = 57630
const PRIVILEGES = 57631
const PROCEDURAL = 57632
const PROCEDURE = 57633
const PROGRAM = 57634
const QUOTE = 57635
const RANGE = 57636
const READ = 57637
const REAL = 57638
const REASSIGN = 57639
const RECHECK = 57640
const RECURSIVE = 57641
const REF = 57642
const REFERENCES = 57643
const REFRESH = 57644
const REINDEX = 57645
const RELATIVE = 57646
const RELEASE = 57647
const RENAME = 57648
const REPEATABLE = 57649
const REPLACE = 57650
const REPLICA = 57651
const RESET = 57652
const RESTART = 57653
const RESTRICT = 57654
const RETURNING = 57655
const RETURNS = 57656
const REVOKE = 57657
const RIGHT = 57658
const ROLE = 57659
const ROLLBACK = 57660
const ROLLUP = 57661
const ROW = 57662
const ROWS = 57663
const RULE = 57664
const SAVEPOINT = 57665
const SCHEMA = 57666
const SCONST = 57348
const SCROLL = 57667
const SEARCH = 57668
const SECOND = 57669
const SECURITY = 57670
const SELECT = 57671
const SEQUENCE = 57672
const SEQUENCES = 57673
const SERIALIZABLE = 57674
const SERVER = 57675
const SESSION = 57676
const SESSION_USER = 57677
const SET = 57678
const SETOF = 57680
const SETS = 57679
const SHARE = 57681
const SHOW = 57682
const SIMILAR = 57683
const SIMPLE = 57684
const SKIP = 57685
const SMALLINT = 57686
const SNAPSHOT = 57687
const SOME = 57688
const SQL = 57689
const STABLE = 57690
const STANDALONE = 57691
const START = 57692
const STATEMENT = 57693
const STATISTICS = 57694
const STDIN = 57695
const STDOUT = 57696
const STORAGE = 57697
const STRICT = 57698
const STRIP = 57699
const SUBSTRING = 57700
const SYMMETRIC = 57701
const SYSID = 57702
const SYSTEM = 57703
const TABLE = 57704
const TABLES = 57705
const TABLESAMPLE = 57706
const TABLESPACE = 57707
const TEMP = 57708
const TEMPLATE = 57709
const TEMPORARY = 57710
const TEXT = 57711
const THEN = 57712
const TIME = 57713
const TIMESTAMP = 57714
const TO = 57715
const TRAILING = 57716
const TRANSACTION = 57717
const TRANSFORM = 57718
const TREAT = 57719
const TRIGGER = 57720
const TRIM = 57721
const TRUE = 57722
const TRUNCATE = 57723
const TRUSTED = 57724
const TYPE = 57725
const TYPECAST = 57353
const TYPES = 57726
const UMINUS = 57770
const UNBOUNDED = 57727
const UNCOMMITTED = 57728
const UNENCRYPTED = 57729
const UNION = 57730
const UNIQUE = 57731
const UNKNOWN = 57732
const UNLISTEN = 57733
const UNLOGGED = 57734
const UNTIL = 57735
const UPDATE = 57736
const USER = 57737
const USING = 57738
const VACUUM = 57739
const VALID = 57740
const VALIDATE = 57741
const VALIDATOR = 57742
const VALUE = 57743
const VALUES = 57744
const VARCHAR = 57745
const VARIADIC = 57746
const VARYING = 57747
const VERBOSE = 57748
const VERSION = 57749
const VIEW = 57750
const VIEWS = 57751
const VOLATILE = 57752
const WHEN = 57753
const WHERE = 57754
const WHITESPACE = 57755
const WINDOW = 57756
const WITH = 57757
const WITHIN = 57758
const WITHOUT = 57759
const WITH_LA = 57768
const WORK = 57760
const WRAPPER = 57761
const WRITE = 57762
const XCONST = 57350
const YEAR = 57763
const YES = 57764
const ZONE = 57765
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AliasedTableExpr ¶
type AliasedTableExpr struct { Expr SimpleTableExpr As Name }
AliasedTableExpr represents a table expression coupled with an optional alias.
func (*AliasedTableExpr) String ¶
func (node *AliasedTableExpr) String() string
type Args ¶
Args defines the interface for retrieving arguments. Return false for the second return value if the argument cannot be found.
type ArrayIndirection ¶
ArrayIndirection represents "[<begin>:<end>]" in an indirection expression.
func (*ArrayIndirection) String ¶
func (a *ArrayIndirection) String() string
type BinaryExpr ¶
BinaryExpr represents a binary value expression.
func (*BinaryExpr) String ¶
func (node *BinaryExpr) String() string
type CastExpr ¶
type CastExpr struct { Expr Expr Type ColumnType }
CastExpr represents a CAST(expr AS type) expression.
type ColumnConstraint ¶
type ColumnConstraint interface {
// contains filtered or unexported methods
}
ColumnConstraint represents a constraint on a column.
type ColumnTableDef ¶
type ColumnTableDef struct { Name Name Type ColumnType Nullable Nullability PrimaryKey bool Unique bool }
ColumnTableDef represents a column dlefinition within a CREATE TABLE statement.
func (*ColumnTableDef) String ¶
func (node *ColumnTableDef) String() string
type ColumnType ¶
ColumnType represents a type in a column definition.
type ComparisonExpr ¶
type ComparisonExpr struct { Operator ComparisonOp Left, Right Expr }
ComparisonExpr represents a two-value comparison expression.
func (*ComparisonExpr) String ¶
func (node *ComparisonExpr) String() string
type ComparisonOp ¶
type ComparisonOp int
ComparisonOp represents a binary operator.
const ( EQ ComparisonOp = iota LT GT LE GE NE In NotIn Like NotLike )
ComparisonExpr.Operator
func (ComparisonOp) String ¶
func (i ComparisonOp) String() string
type CreateDatabase ¶
CreateDatabase represents a CREATE DATABASE statement.
func (*CreateDatabase) String ¶
func (node *CreateDatabase) String() string
type CreateTable ¶
type CreateTable struct { IfNotExists bool Table *QualifiedName Defs TableDefs }
CreateTable represents a CREATE TABLE statement.
func (*CreateTable) String ¶
func (node *CreateTable) String() string
type Datum ¶
A Datum holds either a bool, int64, float64, string or []Datum.
type DecimalType ¶
DecimalType represents a DECIMAL or NUMERIC type.
func (*DecimalType) String ¶
func (node *DecimalType) String() string
type DropDatabase ¶
DropDatabase represents a DROP DATABASE statement.
func (*DropDatabase) String ¶
func (node *DropDatabase) String() string
type DropTable ¶
type DropTable struct { Names QualifiedNames IfExists bool }
DropTable represents a DROP TABLE statement.
type ExistsExpr ¶
type ExistsExpr struct {
Subquery *Subquery
}
ExistsExpr represents an EXISTS expression.
func (*ExistsExpr) String ¶
func (node *ExistsExpr) String() string
type Exprs ¶
type Exprs []Expr
Exprs represents a list of value expressions. It's not a valid expression because it's not parenthesized.
type FuncExpr ¶
type FuncExpr struct { Name *QualifiedName Distinct bool Exprs Exprs }
FuncExpr represents a function call.
type Grant ¶
type Grant struct { Privileges PrivilegeList Targets TargetList Grantees NameList }
Grant represents a GRANT statement.
type IndexTableDef ¶
IndexTableDef represents an index definition within a CREATE TABLE statement.
func (*IndexTableDef) String ¶
func (node *IndexTableDef) String() string
type Indirection ¶
type Indirection []IndirectionElem
Indirection represents an indirection expression composed of a series of indirection elements.
func (Indirection) String ¶
func (i Indirection) String() string
type IndirectionElem ¶
type IndirectionElem interface { String() string // contains filtered or unexported methods }
IndirectionElem is a single element in an indirection expression.
type Insert ¶
type Insert struct { Table *QualifiedName Columns QualifiedNames Rows SelectStatement }
Insert represents an INSERT statement.
type JoinCond ¶
type JoinCond interface {
// contains filtered or unexported methods
}
JoinCond represents a join condition.
type JoinTableExpr ¶
JoinTableExpr represents a TableExpr that's a JOIN operation.
func (*JoinTableExpr) String ¶
func (node *JoinTableExpr) String() string
type NameIndirection ¶
type NameIndirection Name
NameIndirection represents ".<name>" in an indirection expression.
func (NameIndirection) String ¶
func (n NameIndirection) String() string
type NameList ¶
type NameList []string
A NameList is a list of identifier. TODO(tschottdorf): would be nicer to have []Name here but unless we want to introduce new types to the grammar, NameList([]string{...}) needs to work.
type NonStarExpr ¶
NonStarExpr defines a non-'*' select expr.
func (*NonStarExpr) String ¶
func (node *NonStarExpr) String() string
type NotNullConstraint ¶
type NotNullConstraint struct{}
NotNullConstraint represents NOT NULL on a column.
type Nullability ¶
type Nullability int
Nullability represents either NULL, NOT NULL or an unspecified value (silent NULL).
const ( NotNull Nullability = iota Null SilentNull )
The values for NullType.
type OnJoinCond ¶
type OnJoinCond struct {
Expr Expr
}
OnJoinCond represents an ON join condition.
func (*OnJoinCond) String ¶
func (node *OnJoinCond) String() string
type ParenExpr ¶
type ParenExpr struct {
Expr Expr
}
ParenExpr represents a parenthesized expression.
type ParenSelect ¶
type ParenSelect struct {
Select SelectStatement
}
ParenSelect represents a parenthesized SELECT/UNION/VALUES statement.
func (*ParenSelect) String ¶
func (node *ParenSelect) String() string
type ParenTableExpr ¶
type ParenTableExpr struct {
Expr TableExpr
}
ParenTableExpr represents a parenthesized TableExpr.
func (*ParenTableExpr) String ¶
func (node *ParenTableExpr) String() string
type PrimaryKeyConstraint ¶
type PrimaryKeyConstraint struct{}
PrimaryKeyConstraint represents NULL on a column.
type PrivilegeList ¶
type PrivilegeList []PrivilegeType
PrivilegeList represents a list of privileges.
func (PrivilegeList) String ¶
func (pl PrivilegeList) String() string
type PrivilegeType ¶
type PrivilegeType int
PrivilegeType represents the type of privilege.
func (PrivilegeType) String ¶
func (pt PrivilegeType) String() string
type QualifiedName ¶
type QualifiedName struct { Base Name Indirect Indirection }
QualifiedName is a base name and an optional indirection expression.
func (*QualifiedName) Column ¶
func (n *QualifiedName) Column() string
Column returns the column portion of the name.
TODO(pmattis) Handling of qualified names is currently very basic and we consider the column portion of the name to simply be the last component. This is identical to the table portion of the name. Perhaps it would be better to name this the "last" component because context matters in determining whether it is a table or column name. Perhaps we can have different types for use in the different contexts (e.g. ColumnName, TableName, IndexName, etc).
func (*QualifiedName) Database ¶
func (n *QualifiedName) Database() string
Database returns the database portion of the name.
func (*QualifiedName) String ¶
func (n *QualifiedName) String() string
func (*QualifiedName) Table ¶
func (n *QualifiedName) Table() string
Table returns the table portion of the name.
TOOD(pmattis): See the comment for Column() regarding how QualifiedNames are used in context sensitive locations. Sometimes they are referring to tables sometimes to columns.
type QualifiedNames ¶
type QualifiedNames []*QualifiedName
QualifiedNames represents a command separated list (see the String method) of qualified names.
func (QualifiedNames) String ¶
func (n QualifiedNames) String() string
type RenameTable ¶
RenameTable represents a TRUNCATE TABLE statement.
func (*RenameTable) String ¶
func (node *RenameTable) String() string
type Revoke ¶
type Revoke struct { Privileges PrivilegeList Targets TargetList Grantees NameList }
Revoke represents a REVOKE statements. PrivilegeList and TargetList are defined in grant.go
type Row ¶
type Row Exprs
Row represents a parenthesized list of expressions. Similar to Tuple except in how it is textually represented.
type Select ¶
type Select struct { Distinct string Exprs SelectExprs From TableExprs Where *Where GroupBy GroupBy Having *Where OrderBy OrderBy Limit *Limit Lock string // contains filtered or unexported fields }
Select represents a SELECT statement.
type SelectExpr ¶
type SelectExpr interface {
// contains filtered or unexported methods
}
SelectExpr represents a SELECT expression.
type SelectExprs ¶
type SelectExprs []SelectExpr
SelectExprs represents SELECT expressions.
func (SelectExprs) String ¶
func (node SelectExprs) String() string
type SelectStatement ¶
type SelectStatement interface { Statement // contains filtered or unexported methods }
SelectStatement any SELECT statement.
type ShowColumns ¶
type ShowColumns struct {
Table *QualifiedName
}
ShowColumns represents a SHOW COLUMNS statement.
func (*ShowColumns) String ¶
func (node *ShowColumns) String() string
type ShowDatabases ¶
type ShowDatabases struct { }
ShowDatabases represents a SHOW DATABASES statement.
func (*ShowDatabases) String ¶
func (node *ShowDatabases) String() string
type ShowIndex ¶
type ShowIndex struct {
Table *QualifiedName
}
ShowIndex represents a SHOW INDEX statement.
type ShowTables ¶
type ShowTables struct {
Name *QualifiedName
}
ShowTables represents a SHOW TABLES statement.
func (*ShowTables) String ¶
func (node *ShowTables) String() string
type SimpleTableExpr ¶
type SimpleTableExpr interface {
// contains filtered or unexported methods
}
SimpleTableExpr represents a simple table expression.
type StarExpr ¶
type StarExpr struct {
TableName *QualifiedName
}
StarExpr defines a '*' or 'table.*' expression. TODO(tschottdorf): needs work, see #1810. TableName is never even referenced in the grammar so far.
type StarIndirection ¶
type StarIndirection struct{}
StarIndirection represents ".*" in an indirection expression.
func (StarIndirection) String ¶
func (StarIndirection) String() string
type StatementList ¶
type StatementList []Statement
StatementList is a list of statements.
func Parse ¶
func Parse(sql string) (StatementList, error)
Parse parses the sql and returns a list of statements.
func (StatementList) String ¶
func (l StatementList) String() string
type TableDef ¶
type TableDef interface {
// contains filtered or unexported methods
}
TableDef represents a column or index definition within a CREATE TABLE statement.
type TableExpr ¶
type TableExpr interface {
// contains filtered or unexported methods
}
TableExpr represents a table expression.
type TableExprs ¶
type TableExprs []TableExpr
TableExprs represents a list of table expressions.
func (TableExprs) String ¶
func (node TableExprs) String() string
type TargetList ¶
type TargetList struct { Type TargetType Targets NameList }
TargetList represents a list of targets of a given type.
func (TargetList) String ¶
func (tl TargetList) String() string
type TargetType ¶
type TargetType int
TargetType represents the type of target.
func (TargetType) String ¶
func (tt TargetType) String() string
type TimestampType ¶
type TimestampType struct { }
TimestampType represents a TIMESTAMP type.
func (*TimestampType) String ¶
func (node *TimestampType) String() string
type Truncate ¶
type Truncate struct {
Tables QualifiedNames
}
Truncate represents a TRUNCATE statement.
type Union ¶
type Union struct { Type string Left, Right SelectStatement }
Union represents a UNION statement.
type UniqueConstraint ¶
type UniqueConstraint struct{}
UniqueConstraint represents UNIQUE on a column.
type Update ¶
type Update struct { Table TableExpr Exprs UpdateExprs Where *Where }
Update represents an UPDATE statement.
type UpdateExpr ¶
type UpdateExpr struct { Name *QualifiedName Expr Expr }
UpdateExpr represents an update expression.
func (*UpdateExpr) String ¶
func (node *UpdateExpr) String() string
type UpdateExprs ¶
type UpdateExprs []*UpdateExpr
UpdateExprs represents a list of update expressions.
func (UpdateExprs) String ¶
func (node UpdateExprs) String() string
type UsingJoinCond ¶
type UsingJoinCond struct {
Cols NameList
}
UsingJoinCond represents a USING join condition.
func (*UsingJoinCond) String ¶
func (node *UsingJoinCond) String() string
type Visitor ¶
The Visitor Visit method is invoked for each Expr node encountered by WalkExpr. The returned Expr replaces the pointer to the visited expression in the parent node and can be used for rewriting expressions.