ast

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation ¶

Index ¶

Constants ¶

This section is empty.

Variables ¶

This section is empty.

Functions ¶

func Format ¶ added in v1.23.0

func Format(n Node) string

Types ¶

type A_ArrayExpr ¶

type A_ArrayExpr struct {
	Elements *List
	Location int
}

func (*A_ArrayExpr) Pos ¶

func (n *A_ArrayExpr) Pos() int

type A_Const ¶

type A_Const struct {
	Val      Node
	Location int
}

func (*A_Const) Format ¶ added in v1.23.0

func (n *A_Const) Format(buf *TrackedBuffer)

func (*A_Const) Pos ¶

func (n *A_Const) Pos() int

type A_Expr ¶

type A_Expr struct {
	Kind     A_Expr_Kind
	Name     *List
	Lexpr    Node
	Rexpr    Node
	Location int
}

func (*A_Expr) Format ¶ added in v1.23.0

func (n *A_Expr) Format(buf *TrackedBuffer)

func (*A_Expr) Pos ¶

func (n *A_Expr) Pos() int

type A_Expr_Kind ¶

type A_Expr_Kind uint
const (
	A_Expr_Kind_IN   A_Expr_Kind = 7
	A_Expr_Kind_LIKE A_Expr_Kind = 8
)

func (*A_Expr_Kind) Pos ¶

func (n *A_Expr_Kind) Pos() int

type A_Indices ¶

type A_Indices struct {
	IsSlice bool
	Lidx    Node
	Uidx    Node
}

func (*A_Indices) Pos ¶

func (n *A_Indices) Pos() int

type A_Indirection ¶

type A_Indirection struct {
	Arg         Node
	Indirection *List
}

func (*A_Indirection) Pos ¶

func (n *A_Indirection) Pos() int

type A_Star ¶

type A_Star struct {
}

func (*A_Star) Format ¶ added in v1.23.0

func (n *A_Star) Format(buf *TrackedBuffer)

func (*A_Star) Pos ¶

func (n *A_Star) Pos() int

type AccessPriv ¶

type AccessPriv struct {
	PrivName *string
	Cols     *List
}

func (*AccessPriv) Pos ¶

func (n *AccessPriv) Pos() int

type AclMode ¶

type AclMode uint32

func (*AclMode) Pos ¶

func (n *AclMode) Pos() int

type AggSplit ¶

type AggSplit uint

func (*AggSplit) Pos ¶

func (n *AggSplit) Pos() int

type AggStrategy ¶

type AggStrategy uint

func (*AggStrategy) Pos ¶

func (n *AggStrategy) Pos() int

type Aggref ¶

type Aggref struct {
	Xpr           Node
	Aggfnoid      Oid
	Aggtype       Oid
	Aggcollid     Oid
	Inputcollid   Oid
	Aggargtypes   *List
	Aggdirectargs *List
	Args          *List
	Aggorder      *List
	Aggdistinct   *List
	Aggfilter     Node
	Aggstar       bool
	Aggvariadic   bool
	Aggkind       byte
	Agglevelsup   Index
	Aggsplit      AggSplit
	Location      int
}

func (*Aggref) Pos ¶

func (n *Aggref) Pos() int

type Alias ¶

type Alias struct {
	Aliasname *string
	Colnames  *List
}

func (*Alias) Format ¶ added in v1.23.0

func (n *Alias) Format(buf *TrackedBuffer)

func (*Alias) Pos ¶

func (n *Alias) Pos() int

type AlterCollationStmt ¶

type AlterCollationStmt struct {
	Collname *List
}

func (*AlterCollationStmt) Pos ¶

func (n *AlterCollationStmt) Pos() int

type AlterDatabaseSetStmt ¶

type AlterDatabaseSetStmt struct {
	Dbname  *string
	Setstmt *VariableSetStmt
}

func (*AlterDatabaseSetStmt) Pos ¶

func (n *AlterDatabaseSetStmt) Pos() int

type AlterDatabaseStmt ¶

type AlterDatabaseStmt struct {
	Dbname  *string
	Options *List
}

func (*AlterDatabaseStmt) Pos ¶

func (n *AlterDatabaseStmt) Pos() int

type AlterDefaultPrivilegesStmt ¶

type AlterDefaultPrivilegesStmt struct {
	Options *List
	Action  *GrantStmt
}

func (*AlterDefaultPrivilegesStmt) Pos ¶

type AlterDomainStmt ¶

type AlterDomainStmt struct {
	Subtype   byte
	TypeName  *List
	Name      *string
	Def       Node
	Behavior  DropBehavior
	MissingOk bool
}

func (*AlterDomainStmt) Pos ¶

func (n *AlterDomainStmt) Pos() int

type AlterEnumStmt ¶

type AlterEnumStmt struct {
	TypeName           *List
	OldVal             *string
	NewVal             *string
	NewValNeighbor     *string
	NewValIsAfter      bool
	SkipIfNewValExists bool
}

func (*AlterEnumStmt) Pos ¶

func (n *AlterEnumStmt) Pos() int

type AlterEventTrigStmt ¶

type AlterEventTrigStmt struct {
	Trigname  *string
	Tgenabled byte
}

func (*AlterEventTrigStmt) Pos ¶

func (n *AlterEventTrigStmt) Pos() int

type AlterExtensionContentsStmt ¶

type AlterExtensionContentsStmt struct {
	Extname *string
	Action  int
	Objtype ObjectType
	Object  Node
}

func (*AlterExtensionContentsStmt) Pos ¶

type AlterExtensionStmt ¶

type AlterExtensionStmt struct {
	Extname *string
	Options *List
}

func (*AlterExtensionStmt) Pos ¶

func (n *AlterExtensionStmt) Pos() int

type AlterFdwStmt ¶

type AlterFdwStmt struct {
	Fdwname     *string
	FuncOptions *List
	Options     *List
}

func (*AlterFdwStmt) Pos ¶

func (n *AlterFdwStmt) Pos() int

type AlterForeignServerStmt ¶

type AlterForeignServerStmt struct {
	Servername *string
	Version    *string
	Options    *List
	HasVersion bool
}

func (*AlterForeignServerStmt) Pos ¶

func (n *AlterForeignServerStmt) Pos() int

type AlterFunctionStmt ¶

type AlterFunctionStmt struct {
	Func    *ObjectWithArgs
	Actions *List
}

func (*AlterFunctionStmt) Pos ¶

func (n *AlterFunctionStmt) Pos() int

type AlterObjectDependsStmt ¶

type AlterObjectDependsStmt struct {
	ObjectType ObjectType
	Relation   *RangeVar
	Object     Node
	Extname    Node
}

func (*AlterObjectDependsStmt) Pos ¶

func (n *AlterObjectDependsStmt) Pos() int

type AlterObjectSchemaStmt ¶

type AlterObjectSchemaStmt struct {
	ObjectType ObjectType
	Relation   *RangeVar
	Object     Node
	Newschema  *string
	MissingOk  bool
}

func (*AlterObjectSchemaStmt) Pos ¶

func (n *AlterObjectSchemaStmt) Pos() int

type AlterOpFamilyStmt ¶

type AlterOpFamilyStmt struct {
	Opfamilyname *List
	Amname       *string
	IsDrop       bool
	Items        *List
}

func (*AlterOpFamilyStmt) Pos ¶

func (n *AlterOpFamilyStmt) Pos() int

type AlterOperatorStmt ¶

type AlterOperatorStmt struct {
	Opername *ObjectWithArgs
	Options  *List
}

func (*AlterOperatorStmt) Pos ¶

func (n *AlterOperatorStmt) Pos() int

type AlterOwnerStmt ¶

type AlterOwnerStmt struct {
	ObjectType ObjectType
	Relation   *RangeVar
	Object     Node
	Newowner   *RoleSpec
}

func (*AlterOwnerStmt) Pos ¶

func (n *AlterOwnerStmt) Pos() int

type AlterPolicyStmt ¶

type AlterPolicyStmt struct {
	PolicyName *string
	Table      *RangeVar
	Roles      *List
	Qual       Node
	WithCheck  Node
}

func (*AlterPolicyStmt) Pos ¶

func (n *AlterPolicyStmt) Pos() int

type AlterPublicationStmt ¶

type AlterPublicationStmt struct {
	Pubname      *string
	Options      *List
	Tables       *List
	ForAllTables bool
	TableAction  DefElemAction
}

func (*AlterPublicationStmt) Pos ¶

func (n *AlterPublicationStmt) Pos() int

type AlterRoleSetStmt ¶

type AlterRoleSetStmt struct {
	Role     *RoleSpec
	Database *string
	Setstmt  *VariableSetStmt
}

func (*AlterRoleSetStmt) Pos ¶

func (n *AlterRoleSetStmt) Pos() int

type AlterRoleStmt ¶

type AlterRoleStmt struct {
	Role    *RoleSpec
	Options *List
	Action  int
}

func (*AlterRoleStmt) Pos ¶

func (n *AlterRoleStmt) Pos() int

type AlterSeqStmt ¶

type AlterSeqStmt struct {
	Sequence    *RangeVar
	Options     *List
	ForIdentity bool
	MissingOk   bool
}

func (*AlterSeqStmt) Pos ¶

func (n *AlterSeqStmt) Pos() int

type AlterSubscriptionStmt ¶

type AlterSubscriptionStmt struct {
	Kind        AlterSubscriptionType
	Subname     *string
	Conninfo    *string
	Publication *List
	Options     *List
}

func (*AlterSubscriptionStmt) Pos ¶

func (n *AlterSubscriptionStmt) Pos() int

type AlterSubscriptionType ¶

type AlterSubscriptionType uint

func (*AlterSubscriptionType) Pos ¶

func (n *AlterSubscriptionType) Pos() int

type AlterSystemStmt ¶

type AlterSystemStmt struct {
	Setstmt *VariableSetStmt
}

func (*AlterSystemStmt) Pos ¶

func (n *AlterSystemStmt) Pos() int

type AlterTSConfigType ¶

type AlterTSConfigType uint

func (*AlterTSConfigType) Pos ¶

func (n *AlterTSConfigType) Pos() int

type AlterTSConfigurationStmt ¶

type AlterTSConfigurationStmt struct {
	Kind      AlterTSConfigType
	Cfgname   *List
	Tokentype *List
	Dicts     *List
	Override  bool
	Replace   bool
	MissingOk bool
}

func (*AlterTSConfigurationStmt) Pos ¶

func (n *AlterTSConfigurationStmt) Pos() int

type AlterTSDictionaryStmt ¶

type AlterTSDictionaryStmt struct {
	Dictname *List
	Options  *List
}

func (*AlterTSDictionaryStmt) Pos ¶

func (n *AlterTSDictionaryStmt) Pos() int

type AlterTableCmd ¶

type AlterTableCmd struct {
	Subtype   AlterTableType
	Name      *string
	Def       *ColumnDef
	Newowner  *RoleSpec
	Behavior  DropBehavior
	MissingOk bool
}

func (*AlterTableCmd) Format ¶ added in v1.23.0

func (n *AlterTableCmd) Format(buf *TrackedBuffer)

func (*AlterTableCmd) Pos ¶

func (n *AlterTableCmd) Pos() int

type AlterTableMoveAllStmt ¶

type AlterTableMoveAllStmt struct {
	OrigTablespacename *string
	Objtype            ObjectType
	Roles              *List
	NewTablespacename  *string
	Nowait             bool
}

func (*AlterTableMoveAllStmt) Pos ¶

func (n *AlterTableMoveAllStmt) Pos() int

type AlterTableSetSchemaStmt ¶

type AlterTableSetSchemaStmt struct {
	Table     *TableName
	NewSchema *string
	MissingOk bool
}

func (*AlterTableSetSchemaStmt) Pos ¶

func (n *AlterTableSetSchemaStmt) Pos() int

type AlterTableSpaceOptionsStmt ¶

type AlterTableSpaceOptionsStmt struct {
	Tablespacename *string
	Options        *List
	IsReset        bool
}

func (*AlterTableSpaceOptionsStmt) Pos ¶

type AlterTableStmt ¶

type AlterTableStmt struct {
	// TODO: Only TableName or Relation should be defined
	Relation  *RangeVar
	Table     *TableName
	Cmds      *List
	MissingOk bool
	Relkind   ObjectType
}

func (*AlterTableStmt) Format ¶ added in v1.23.0

func (n *AlterTableStmt) Format(buf *TrackedBuffer)

func (*AlterTableStmt) Pos ¶

func (n *AlterTableStmt) Pos() int

type AlterTableType ¶

type AlterTableType int
const (
	AT_AddColumn AlterTableType = iota
	AT_AlterColumnType
	AT_DropColumn
	AT_DropNotNull
	AT_SetNotNull
)

func (AlterTableType) String ¶

func (t AlterTableType) String() string

type AlterTableType_PG ¶

type AlterTableType_PG uint

func (*AlterTableType_PG) Pos ¶

func (n *AlterTableType_PG) Pos() int

type AlterTypeAddValueStmt ¶

type AlterTypeAddValueStmt struct {
	Type               *TypeName
	NewValue           *string
	NewValHasNeighbor  bool
	NewValNeighbor     *string
	NewValIsAfter      bool
	SkipIfNewValExists bool
}

func (*AlterTypeAddValueStmt) Pos ¶

func (n *AlterTypeAddValueStmt) Pos() int

type AlterTypeRenameValueStmt ¶

type AlterTypeRenameValueStmt struct {
	Type     *TypeName
	OldValue *string
	NewValue *string
}

func (*AlterTypeRenameValueStmt) Pos ¶

func (n *AlterTypeRenameValueStmt) Pos() int

type AlterTypeSetSchemaStmt ¶

type AlterTypeSetSchemaStmt struct {
	Type      *TypeName
	NewSchema *string
}

func (*AlterTypeSetSchemaStmt) Pos ¶

func (n *AlterTypeSetSchemaStmt) Pos() int

type AlterUserMappingStmt ¶

type AlterUserMappingStmt struct {
	User       *RoleSpec
	Servername *string
	Options    *List
}

func (*AlterUserMappingStmt) Pos ¶

func (n *AlterUserMappingStmt) Pos() int

type AlternativeSubPlan ¶

type AlternativeSubPlan struct {
	Xpr      Node
	Subplans *List
}

func (*AlternativeSubPlan) Pos ¶

func (n *AlternativeSubPlan) Pos() int

type ArrayCoerceExpr ¶

type ArrayCoerceExpr struct {
	Xpr          Node
	Arg          Node
	Elemfuncid   Oid
	Resulttype   Oid
	Resulttypmod int32
	Resultcollid Oid
	IsExplicit   bool
	Coerceformat CoercionForm
	Location     int
}

func (*ArrayCoerceExpr) Pos ¶

func (n *ArrayCoerceExpr) Pos() int

type ArrayExpr ¶

type ArrayExpr struct {
	Xpr           Node
	ArrayTypeid   Oid
	ArrayCollid   Oid
	ElementTypeid Oid
	Elements      *List
	Multidims     bool
	Location      int
}

func (*ArrayExpr) Pos ¶

func (n *ArrayExpr) Pos() int

type ArrayRef ¶

type ArrayRef struct {
	Xpr             Node
	Refarraytype    Oid
	Refelemtype     Oid
	Reftypmod       int32
	Refcollid       Oid
	Refupperindexpr *List
	Reflowerindexpr *List
	Refexpr         Node
	Refassgnexpr    Node
}

func (*ArrayRef) Pos ¶

func (n *ArrayRef) Pos() int

type AttrNumber ¶

type AttrNumber int16

func (*AttrNumber) Pos ¶

func (n *AttrNumber) Pos() int

type BetweenExpr ¶

type BetweenExpr struct {
	// Expr is the value expression to be compared.
	Expr Node
	// Left is the left expression in the between statement.
	Left Node
	// Right is the right expression in the between statement.
	Right Node
	// Not is true, the expression is "not between".
	Not      bool
	Location int
}

func (*BetweenExpr) Pos ¶

func (n *BetweenExpr) Pos() int

type BitString ¶

type BitString struct {
	Str string
}

func (*BitString) Pos ¶

func (n *BitString) Pos() int

type BlockId ¶

type BlockId BlockIdData

func (*BlockId) Pos ¶

func (n *BlockId) Pos() int

type BlockIdData ¶

type BlockIdData struct {
	BiHi uint16
	BiLo uint16
}

func (*BlockIdData) Pos ¶

func (n *BlockIdData) Pos() int

type BlockNumber ¶

type BlockNumber uint32

func (*BlockNumber) Pos ¶

func (n *BlockNumber) Pos() int

type BoolExpr ¶

type BoolExpr struct {
	Xpr      Node
	Boolop   BoolExprType
	Args     *List
	Location int
}

func (*BoolExpr) Format ¶ added in v1.23.0

func (n *BoolExpr) Format(buf *TrackedBuffer)

func (*BoolExpr) Pos ¶

func (n *BoolExpr) Pos() int

type BoolExprType ¶

type BoolExprType uint
const (
	BoolExprTypeAnd BoolExprType
	BoolExprTypeOr
	BoolExprTypeNot

	// Added for MySQL
	BoolExprTypeIsNull
	BoolExprTypeIsNotNull
)

https://github.com/pganalyze/libpg_query/blob/13-latest/protobuf/pg_query.proto#L2783-L2789

func (*BoolExprType) Pos ¶

func (n *BoolExprType) Pos() int

type BoolTestType ¶

type BoolTestType uint

func (*BoolTestType) Pos ¶

func (n *BoolTestType) Pos() int

type Boolean ¶

type Boolean struct {
	Boolval bool
}

func (*Boolean) Format ¶ added in v1.23.0

func (n *Boolean) Format(buf *TrackedBuffer)

func (*Boolean) Pos ¶

func (n *Boolean) Pos() int

type BooleanTest ¶

type BooleanTest struct {
	Xpr          Node
	Arg          Node
	Booltesttype BoolTestType
	Location     int
}

func (*BooleanTest) Pos ¶

func (n *BooleanTest) Pos() int

type CallStmt ¶

type CallStmt struct {
	FuncCall *FuncCall
}

func (*CallStmt) Format ¶ added in v1.23.0

func (n *CallStmt) Format(buf *TrackedBuffer)

func (*CallStmt) Pos ¶

func (n *CallStmt) Pos() int

type CaseExpr ¶

type CaseExpr struct {
	Xpr        Node
	Casetype   Oid
	Casecollid Oid
	Arg        Node
	Args       *List
	Defresult  Node
	Location   int
}

func (*CaseExpr) Format ¶ added in v1.23.0

func (n *CaseExpr) Format(buf *TrackedBuffer)

func (*CaseExpr) Pos ¶

func (n *CaseExpr) Pos() int

type CaseTestExpr ¶

type CaseTestExpr struct {
	Xpr       Node
	TypeId    Oid
	TypeMod   int32
	Collation Oid
}

func (*CaseTestExpr) Pos ¶

func (n *CaseTestExpr) Pos() int

type CaseWhen ¶

type CaseWhen struct {
	Xpr      Node
	Expr     Node
	Result   Node
	Location int
}

func (*CaseWhen) Format ¶ added in v1.23.0

func (n *CaseWhen) Format(buf *TrackedBuffer)

func (*CaseWhen) Pos ¶

func (n *CaseWhen) Pos() int

type CheckPointStmt ¶

type CheckPointStmt struct {
}

func (*CheckPointStmt) Pos ¶

func (n *CheckPointStmt) Pos() int

type ClosePortalStmt ¶

type ClosePortalStmt struct {
	Portalname *string
}

func (*ClosePortalStmt) Pos ¶

func (n *ClosePortalStmt) Pos() int

type ClusterStmt ¶

type ClusterStmt struct {
	Relation  *RangeVar
	Indexname *string
	Verbose   bool
}

func (*ClusterStmt) Pos ¶

func (n *ClusterStmt) Pos() int

type CmdType ¶

type CmdType uint

func (*CmdType) Pos ¶

func (n *CmdType) Pos() int

type CoalesceExpr ¶

type CoalesceExpr struct {
	Xpr            Node
	Coalescetype   Oid
	Coalescecollid Oid
	Args           *List
	Location       int
}

func (*CoalesceExpr) Format ¶ added in v1.23.0

func (n *CoalesceExpr) Format(buf *TrackedBuffer)

func (*CoalesceExpr) Pos ¶

func (n *CoalesceExpr) Pos() int

type CoerceToDomain ¶

type CoerceToDomain struct {
	Xpr            Node
	Arg            Node
	Resulttype     Oid
	Resulttypmod   int32
	Resultcollid   Oid
	Coercionformat CoercionForm
	Location       int
}

func (*CoerceToDomain) Pos ¶

func (n *CoerceToDomain) Pos() int

type CoerceToDomainValue ¶

type CoerceToDomainValue struct {
	Xpr       Node
	TypeId    Oid
	TypeMod   int32
	Collation Oid
	Location  int
}

func (*CoerceToDomainValue) Pos ¶

func (n *CoerceToDomainValue) Pos() int

type CoerceViaIO ¶

type CoerceViaIO struct {
	Xpr          Node
	Arg          Node
	Resulttype   Oid
	Resultcollid Oid
	Coerceformat CoercionForm
	Location     int
}

func (*CoerceViaIO) Pos ¶

func (n *CoerceViaIO) Pos() int

type CoercionContext ¶

type CoercionContext uint

func (*CoercionContext) Pos ¶

func (n *CoercionContext) Pos() int

type CoercionForm ¶

type CoercionForm uint

func (*CoercionForm) Pos ¶

func (n *CoercionForm) Pos() int

type CollateClause ¶

type CollateClause struct {
	Arg      Node
	Collname *List
	Location int
}

func (*CollateClause) Pos ¶

func (n *CollateClause) Pos() int

type CollateExpr ¶

type CollateExpr struct {
	Xpr      Node
	Arg      Node
	CollOid  Oid
	Location int
}

func (*CollateExpr) Pos ¶

func (n *CollateExpr) Pos() int

type ColumnDef ¶

type ColumnDef struct {
	Colname    string
	TypeName   *TypeName
	IsNotNull  bool
	IsUnsigned bool
	IsArray    bool
	ArrayDims  int
	Vals       *List
	Length     *int
	PrimaryKey bool

	// From pg.ColumnDef
	Inhcount      int
	IsLocal       bool
	IsFromType    bool
	IsFromParent  bool
	Storage       byte
	RawDefault    Node
	CookedDefault Node
	Identity      byte
	CollClause    *CollateClause
	CollOid       Oid
	Constraints   *List
	Fdwoptions    *List
	Location      int
	Comment       string
}

func (*ColumnDef) Format ¶ added in v1.23.0

func (n *ColumnDef) Format(buf *TrackedBuffer)

func (*ColumnDef) Pos ¶

func (n *ColumnDef) Pos() int

type ColumnRef ¶

type ColumnRef struct {
	Name string

	// From pg.ColumnRef
	Fields   *List
	Location int
}

func (*ColumnRef) Format ¶ added in v1.23.0

func (n *ColumnRef) Format(buf *TrackedBuffer)

func (*ColumnRef) Pos ¶

func (n *ColumnRef) Pos() int

type CommandId ¶

type CommandId uint32

func (*CommandId) Pos ¶

func (n *CommandId) Pos() int

type CommentOnColumnStmt ¶

type CommentOnColumnStmt struct {
	Table   *TableName
	Col     *ColumnRef
	Comment *string
}

func (*CommentOnColumnStmt) Pos ¶

func (n *CommentOnColumnStmt) Pos() int

type CommentOnSchemaStmt ¶

type CommentOnSchemaStmt struct {
	Schema  *String
	Comment *string
}

func (*CommentOnSchemaStmt) Pos ¶

func (n *CommentOnSchemaStmt) Pos() int

type CommentOnTableStmt ¶

type CommentOnTableStmt struct {
	Table   *TableName
	Comment *string
}

func (*CommentOnTableStmt) Pos ¶

func (n *CommentOnTableStmt) Pos() int

type CommentOnTypeStmt ¶

type CommentOnTypeStmt struct {
	Type    *TypeName
	Comment *string
}

func (*CommentOnTypeStmt) Pos ¶

func (n *CommentOnTypeStmt) Pos() int

type CommentOnViewStmt ¶

type CommentOnViewStmt struct {
	View    *TableName
	Comment *string
}

func (*CommentOnViewStmt) Pos ¶

func (n *CommentOnViewStmt) Pos() int

type CommentStmt ¶

type CommentStmt struct {
	Objtype ObjectType
	Object  Node
	Comment *string
}

func (*CommentStmt) Pos ¶

func (n *CommentStmt) Pos() int

type CommonTableExpr ¶

type CommonTableExpr struct {
	Ctename          *string
	Aliascolnames    *List
	Ctequery         Node
	Location         int
	Cterecursive     bool
	Cterefcount      int
	Ctecolnames      *List
	Ctecoltypes      *List
	Ctecoltypmods    *List
	Ctecolcollations *List
}

func (*CommonTableExpr) Format ¶ added in v1.23.0

func (n *CommonTableExpr) Format(buf *TrackedBuffer)

func (*CommonTableExpr) Pos ¶

func (n *CommonTableExpr) Pos() int

type CompositeTypeStmt ¶

type CompositeTypeStmt struct {
	TypeName *TypeName
}

func (*CompositeTypeStmt) Pos ¶

func (n *CompositeTypeStmt) Pos() int

type Const ¶

type Const struct {
	Xpr         Node
	Consttype   Oid
	Consttypmod int32
	Constcollid Oid
	Constlen    int
	Constvalue  Datum
	Constisnull bool
	Constbyval  bool
	Location    int
}

func (*Const) Pos ¶

func (n *Const) Pos() int

type ConstrType ¶

type ConstrType uint

func (*ConstrType) Pos ¶

func (n *ConstrType) Pos() int

type Constraint ¶

type Constraint struct {
	Contype        ConstrType
	Conname        *string
	Deferrable     bool
	Initdeferred   bool
	Location       int
	IsNoInherit    bool
	RawExpr        Node
	CookedExpr     *string
	GeneratedWhen  byte
	Keys           *List
	Exclusions     *List
	Options        *List
	Indexname      *string
	Indexspace     *string
	AccessMethod   *string
	WhereClause    Node
	Pktable        *RangeVar
	FkAttrs        *List
	PkAttrs        *List
	FkMatchtype    byte
	FkUpdAction    byte
	FkDelAction    byte
	OldConpfeqop   *List
	OldPktableOid  Oid
	SkipValidation bool
	InitiallyValid bool
}

func (*Constraint) Pos ¶

func (n *Constraint) Pos() int

type ConstraintsSetStmt ¶

type ConstraintsSetStmt struct {
	Constraints *List
	Deferred    bool
}

func (*ConstraintsSetStmt) Pos ¶

func (n *ConstraintsSetStmt) Pos() int

type ConvertRowtypeExpr ¶

type ConvertRowtypeExpr struct {
	Xpr           Node
	Arg           Node
	Resulttype    Oid
	Convertformat CoercionForm
	Location      int
}

func (*ConvertRowtypeExpr) Pos ¶

func (n *ConvertRowtypeExpr) Pos() int

type CopyStmt ¶

type CopyStmt struct {
	Relation  *RangeVar
	Query     Node
	Attlist   *List
	IsFrom    bool
	IsProgram bool
	Filename  *string
	Options   *List
}

func (*CopyStmt) Pos ¶

func (n *CopyStmt) Pos() int

type Cost ¶

type Cost float64

func (*Cost) Pos ¶

func (n *Cost) Pos() int

type CreateAmStmt ¶

type CreateAmStmt struct {
	Amname      *string
	HandlerName *List
	Amtype      byte
}

func (*CreateAmStmt) Pos ¶

func (n *CreateAmStmt) Pos() int

type CreateCastStmt ¶

type CreateCastStmt struct {
	Sourcetype *TypeName
	Targettype *TypeName
	Func       *ObjectWithArgs
	Context    CoercionContext
	Inout      bool
}

func (*CreateCastStmt) Pos ¶

func (n *CreateCastStmt) Pos() int

type CreateConversionStmt ¶

type CreateConversionStmt struct {
	ConversionName  *List
	ForEncodingName *string
	ToEncodingName  *string
	FuncName        *List
	Def             bool
}

func (*CreateConversionStmt) Pos ¶

func (n *CreateConversionStmt) Pos() int

type CreateDomainStmt ¶

type CreateDomainStmt struct {
	Domainname  *List
	TypeName    *TypeName
	CollClause  *CollateClause
	Constraints *List
}

func (*CreateDomainStmt) Pos ¶

func (n *CreateDomainStmt) Pos() int

type CreateEnumStmt ¶

type CreateEnumStmt struct {
	TypeName *TypeName
	Vals     *List
}

func (*CreateEnumStmt) Pos ¶

func (n *CreateEnumStmt) Pos() int

type CreateEventTrigStmt ¶

type CreateEventTrigStmt struct {
	Trigname   *string
	Eventname  *string
	Whenclause *List
	Funcname   *List
}

func (*CreateEventTrigStmt) Pos ¶

func (n *CreateEventTrigStmt) Pos() int

type CreateExtensionStmt ¶

type CreateExtensionStmt struct {
	Extname     *string
	IfNotExists bool
	Options     *List
}

func (*CreateExtensionStmt) Pos ¶

func (n *CreateExtensionStmt) Pos() int

type CreateFdwStmt ¶

type CreateFdwStmt struct {
	Fdwname     *string
	FuncOptions *List
	Options     *List
}

func (*CreateFdwStmt) Pos ¶

func (n *CreateFdwStmt) Pos() int

type CreateForeignServerStmt ¶

type CreateForeignServerStmt struct {
	Servername  *string
	Servertype  *string
	Version     *string
	Fdwname     *string
	IfNotExists bool
	Options     *List
}

func (*CreateForeignServerStmt) Pos ¶

func (n *CreateForeignServerStmt) Pos() int

type CreateForeignTableStmt ¶

type CreateForeignTableStmt struct {
	Base       *CreateStmt
	Servername *string
	Options    *List
}

func (*CreateForeignTableStmt) Pos ¶

func (n *CreateForeignTableStmt) Pos() int

type CreateFunctionStmt ¶

type CreateFunctionStmt struct {
	Replace    bool
	Params     *List
	ReturnType *TypeName
	Func       *FuncName
	// TODO: Undertand these two fields
	Options    *List
	WithClause *List
}

func (*CreateFunctionStmt) Pos ¶

func (n *CreateFunctionStmt) Pos() int

type CreateOpClassItem ¶

type CreateOpClassItem struct {
	Itemtype    int
	Name        *ObjectWithArgs
	Number      int
	OrderFamily *List
	ClassArgs   *List
	Storedtype  *TypeName
}

func (*CreateOpClassItem) Pos ¶

func (n *CreateOpClassItem) Pos() int

type CreateOpClassStmt ¶

type CreateOpClassStmt struct {
	Opclassname  *List
	Opfamilyname *List
	Amname       *string
	Datatype     *TypeName
	Items        *List
	IsDefault    bool
}

func (*CreateOpClassStmt) Pos ¶

func (n *CreateOpClassStmt) Pos() int

type CreateOpFamilyStmt ¶

type CreateOpFamilyStmt struct {
	Opfamilyname *List
	Amname       *string
}

func (*CreateOpFamilyStmt) Pos ¶

func (n *CreateOpFamilyStmt) Pos() int

type CreatePLangStmt ¶

type CreatePLangStmt struct {
	Replace     bool
	Plname      *string
	Plhandler   *List
	Plinline    *List
	Plvalidator *List
	Pltrusted   bool
}

func (*CreatePLangStmt) Pos ¶

func (n *CreatePLangStmt) Pos() int

type CreatePolicyStmt ¶

type CreatePolicyStmt struct {
	PolicyName *string
	Table      *RangeVar
	CmdName    *string
	Permissive bool
	Roles      *List
	Qual       Node
	WithCheck  Node
}

func (*CreatePolicyStmt) Pos ¶

func (n *CreatePolicyStmt) Pos() int

type CreatePublicationStmt ¶

type CreatePublicationStmt struct {
	Pubname      *string
	Options      *List
	Tables       *List
	ForAllTables bool
}

func (*CreatePublicationStmt) Pos ¶

func (n *CreatePublicationStmt) Pos() int

type CreateRangeStmt ¶

type CreateRangeStmt struct {
	TypeName *List
	Params   *List
}

func (*CreateRangeStmt) Pos ¶

func (n *CreateRangeStmt) Pos() int

type CreateRoleStmt ¶

type CreateRoleStmt struct {
	StmtType RoleStmtType
	Role     *string
	Options  *List
}

func (*CreateRoleStmt) Pos ¶

func (n *CreateRoleStmt) Pos() int

type CreateSchemaStmt ¶

type CreateSchemaStmt struct {
	Name        *string
	SchemaElts  *List
	Authrole    *RoleSpec
	IfNotExists bool
}

func (*CreateSchemaStmt) Pos ¶

func (n *CreateSchemaStmt) Pos() int

type CreateSeqStmt ¶

type CreateSeqStmt struct {
	Sequence    *RangeVar
	Options     *List
	OwnerId     Oid
	ForIdentity bool
	IfNotExists bool
}

func (*CreateSeqStmt) Pos ¶

func (n *CreateSeqStmt) Pos() int

type CreateStatsStmt ¶

type CreateStatsStmt struct {
	Defnames    *List
	StatTypes   *List
	Exprs       *List
	Relations   *List
	IfNotExists bool
}

func (*CreateStatsStmt) Pos ¶

func (n *CreateStatsStmt) Pos() int

type CreateStmt ¶

type CreateStmt struct {
	Relation       *RangeVar
	TableElts      *List
	InhRelations   *List
	Partbound      *PartitionBoundSpec
	Partspec       *PartitionSpec
	OfTypename     *TypeName
	Constraints    *List
	Options        *List
	Oncommit       OnCommitAction
	Tablespacename *string
	IfNotExists    bool
}

func (*CreateStmt) Pos ¶

func (n *CreateStmt) Pos() int

type CreateSubscriptionStmt ¶

type CreateSubscriptionStmt struct {
	Subname     *string
	Conninfo    *string
	Publication *List
	Options     *List
}

func (*CreateSubscriptionStmt) Pos ¶

func (n *CreateSubscriptionStmt) Pos() int

type CreateTableAsStmt ¶

type CreateTableAsStmt struct {
	Query        Node
	Into         *IntoClause
	Relkind      ObjectType
	IsSelectInto bool
	IfNotExists  bool
}

func (*CreateTableAsStmt) Pos ¶

func (n *CreateTableAsStmt) Pos() int

type CreateTableSpaceStmt ¶

type CreateTableSpaceStmt struct {
	Tablespacename *string
	Owner          *RoleSpec
	Location       *string
	Options        *List
}

func (*CreateTableSpaceStmt) Pos ¶

func (n *CreateTableSpaceStmt) Pos() int

type CreateTableStmt ¶

type CreateTableStmt struct {
	IfNotExists bool
	Name        *TableName
	Cols        []*ColumnDef
	ReferTable  *TableName
	Comment     string
	Inherits    []*TableName
}

func (*CreateTableStmt) Format ¶ added in v1.23.0

func (n *CreateTableStmt) Format(buf *TrackedBuffer)

func (*CreateTableStmt) Pos ¶

func (n *CreateTableStmt) Pos() int

type CreateTransformStmt ¶

type CreateTransformStmt struct {
	Replace  bool
	TypeName *TypeName
	Lang     *string
	Fromsql  *ObjectWithArgs
	Tosql    *ObjectWithArgs
}

func (*CreateTransformStmt) Pos ¶

func (n *CreateTransformStmt) Pos() int

type CreateTrigStmt ¶

type CreateTrigStmt struct {
	Trigname       *string
	Relation       *RangeVar
	Funcname       *List
	Args           *List
	Row            bool
	Timing         int16
	Events         int16
	Columns        *List
	WhenClause     Node
	Isconstraint   bool
	TransitionRels *List
	Deferrable     bool
	Initdeferred   bool
	Constrrel      *RangeVar
}

func (*CreateTrigStmt) Pos ¶

func (n *CreateTrigStmt) Pos() int

type CreateUserMappingStmt ¶

type CreateUserMappingStmt struct {
	User        *RoleSpec
	Servername  *string
	IfNotExists bool
	Options     *List
}

func (*CreateUserMappingStmt) Pos ¶

func (n *CreateUserMappingStmt) Pos() int

type CreatedbStmt ¶

type CreatedbStmt struct {
	Dbname  *string
	Options *List
}

func (*CreatedbStmt) Pos ¶

func (n *CreatedbStmt) Pos() int

type CurrentOfExpr ¶

type CurrentOfExpr struct {
	Xpr         Node
	Cvarno      Index
	CursorName  *string
	CursorParam int
}

func (*CurrentOfExpr) Pos ¶

func (n *CurrentOfExpr) Pos() int

type Datum ¶

type Datum uintptr

func (*Datum) Pos ¶

func (n *Datum) Pos() int

type DatumPtr ¶

type DatumPtr Datum

func (*DatumPtr) Pos ¶

func (n *DatumPtr) Pos() int

type DeallocateStmt ¶

type DeallocateStmt struct {
	Name *string
}

func (*DeallocateStmt) Pos ¶

func (n *DeallocateStmt) Pos() int

type DeclareCursorStmt ¶

type DeclareCursorStmt struct {
	Portalname *string
	Options    int
	Query      Node
}

func (*DeclareCursorStmt) Pos ¶

func (n *DeclareCursorStmt) Pos() int

type DefElem ¶

type DefElem struct {
	Defnamespace *string
	Defname      *string
	Arg          Node
	Defaction    DefElemAction
	Location     int
}

func (*DefElem) Pos ¶

func (n *DefElem) Pos() int

type DefElemAction ¶

type DefElemAction uint

func (*DefElemAction) Pos ¶

func (n *DefElemAction) Pos() int

type DefineStmt ¶

type DefineStmt struct {
	Kind        ObjectType
	Oldstyle    bool
	Defnames    *List
	Args        *List
	Definition  *List
	IfNotExists bool
}

func (*DefineStmt) Pos ¶

func (n *DefineStmt) Pos() int

type DeleteStmt ¶

type DeleteStmt struct {
	Relations     *List
	UsingClause   *List
	WhereClause   Node
	LimitCount    Node
	ReturningList *List
	WithClause    *WithClause
}

func (*DeleteStmt) Format ¶ added in v1.23.0

func (n *DeleteStmt) Format(buf *TrackedBuffer)

func (*DeleteStmt) Pos ¶

func (n *DeleteStmt) Pos() int

type DiscardMode ¶

type DiscardMode uint

func (*DiscardMode) Pos ¶

func (n *DiscardMode) Pos() int

type DiscardStmt ¶

type DiscardStmt struct {
	Target DiscardMode
}

func (*DiscardStmt) Pos ¶

func (n *DiscardStmt) Pos() int

type DistinctExpr ¶

type DistinctExpr OpExpr

func (*DistinctExpr) Pos ¶

func (n *DistinctExpr) Pos() int

type DoStmt ¶

type DoStmt struct {
	Args *List
}

func (*DoStmt) Pos ¶

func (n *DoStmt) Pos() int

type DropBehavior ¶

type DropBehavior uint

func (*DropBehavior) Pos ¶

func (n *DropBehavior) Pos() int

type DropFunctionStmt ¶

type DropFunctionStmt struct {
	Funcs     []*FuncSpec
	MissingOk bool
}

func (*DropFunctionStmt) Pos ¶

func (n *DropFunctionStmt) Pos() int

type DropOwnedStmt ¶

type DropOwnedStmt struct {
	Roles    *List
	Behavior DropBehavior
}

func (*DropOwnedStmt) Pos ¶

func (n *DropOwnedStmt) Pos() int

type DropRoleStmt ¶

type DropRoleStmt struct {
	Roles     *List
	MissingOk bool
}

func (*DropRoleStmt) Pos ¶

func (n *DropRoleStmt) Pos() int

type DropSchemaStmt ¶

type DropSchemaStmt struct {
	Schemas   []*String
	MissingOk bool
}

func (*DropSchemaStmt) Pos ¶

func (n *DropSchemaStmt) Pos() int

type DropStmt ¶

type DropStmt struct {
	Objects    *List
	RemoveType ObjectType
	Behavior   DropBehavior
	MissingOk  bool
	Concurrent bool
}

func (*DropStmt) Pos ¶

func (n *DropStmt) Pos() int

type DropSubscriptionStmt ¶

type DropSubscriptionStmt struct {
	Subname   *string
	MissingOk bool
	Behavior  DropBehavior
}

func (*DropSubscriptionStmt) Pos ¶

func (n *DropSubscriptionStmt) Pos() int

type DropTableSpaceStmt ¶

type DropTableSpaceStmt struct {
	Tablespacename *string
	MissingOk      bool
}

func (*DropTableSpaceStmt) Pos ¶

func (n *DropTableSpaceStmt) Pos() int

type DropTableStmt ¶

type DropTableStmt struct {
	IfExists bool
	Tables   []*TableName
}

func (*DropTableStmt) Pos ¶

func (n *DropTableStmt) Pos() int

type DropTypeStmt ¶

type DropTypeStmt struct {
	IfExists bool
	Types    []*TypeName
}

func (*DropTypeStmt) Pos ¶

func (n *DropTypeStmt) Pos() int

type DropUserMappingStmt ¶

type DropUserMappingStmt struct {
	User       *RoleSpec
	Servername *string
	MissingOk  bool
}

func (*DropUserMappingStmt) Pos ¶

func (n *DropUserMappingStmt) Pos() int

type DropdbStmt ¶

type DropdbStmt struct {
	Dbname    *string
	MissingOk bool
}

func (*DropdbStmt) Pos ¶

func (n *DropdbStmt) Pos() int

type ExecuteStmt ¶

type ExecuteStmt struct {
	Name   *string
	Params *List
}

func (*ExecuteStmt) Pos ¶

func (n *ExecuteStmt) Pos() int

type ExplainStmt ¶

type ExplainStmt struct {
	Query   Node
	Options *List
}

func (*ExplainStmt) Pos ¶

func (n *ExplainStmt) Pos() int

type Expr ¶

type Expr struct {
}

func (*Expr) Pos ¶

func (n *Expr) Pos() int

type FetchDirection ¶

type FetchDirection uint

func (*FetchDirection) Pos ¶

func (n *FetchDirection) Pos() int

type FetchStmt ¶

type FetchStmt struct {
	Direction  FetchDirection
	HowMany    int64
	Portalname *string
	Ismove     bool
}

func (*FetchStmt) Pos ¶

func (n *FetchStmt) Pos() int

type FieldSelect ¶

type FieldSelect struct {
	Xpr          Node
	Arg          Node
	Fieldnum     AttrNumber
	Resulttype   Oid
	Resulttypmod int32
	Resultcollid Oid
}

func (*FieldSelect) Pos ¶

func (n *FieldSelect) Pos() int

type FieldStore ¶

type FieldStore struct {
	Xpr        Node
	Arg        Node
	Newvals    *List
	Fieldnums  *List
	Resulttype Oid
}

func (*FieldStore) Pos ¶

func (n *FieldStore) Pos() int

type Float ¶

type Float struct {
	Str string
}

func (*Float) Format ¶ added in v1.23.0

func (n *Float) Format(buf *TrackedBuffer)

func (*Float) Pos ¶

func (n *Float) Pos() int

type FromExpr ¶

type FromExpr struct {
	Fromlist *List
	Quals    Node
}

func (*FromExpr) Pos ¶

func (n *FromExpr) Pos() int

type FuncCall ¶

type FuncCall struct {
	Func           *FuncName
	Funcname       *List
	Args           *List
	AggOrder       *List
	AggFilter      Node
	AggWithinGroup bool
	AggStar        bool
	AggDistinct    bool
	FuncVariadic   bool
	Over           *WindowDef
	Location       int
}

func (*FuncCall) Format ¶ added in v1.23.0

func (n *FuncCall) Format(buf *TrackedBuffer)

func (*FuncCall) Pos ¶

func (n *FuncCall) Pos() int

type FuncExpr ¶

type FuncExpr struct {
	Xpr            Node
	Funcid         Oid
	Funcresulttype Oid
	Funcretset     bool
	Funcvariadic   bool
	Funcformat     CoercionForm
	Funccollid     Oid
	Inputcollid    Oid
	Args           *List
	Location       int
}

func (*FuncExpr) Pos ¶

func (n *FuncExpr) Pos() int

type FuncName ¶

type FuncName struct {
	Catalog string
	Schema  string
	Name    string
}

func (*FuncName) Format ¶ added in v1.23.0

func (n *FuncName) Format(buf *TrackedBuffer)

func (*FuncName) Pos ¶

func (n *FuncName) Pos() int

type FuncParam ¶

type FuncParam struct {
	Name    *string
	Type    *TypeName
	DefExpr Node // Will always be &ast.TODO
	Mode    FuncParamMode
}

func (*FuncParam) Pos ¶

func (n *FuncParam) Pos() int

type FuncParamMode ¶

type FuncParamMode int
const (
	FuncParamIn FuncParamMode = iota
	FuncParamOut
	FuncParamInOut
	FuncParamVariadic
	FuncParamTable
	FuncParamDefault
)

type FuncSpec ¶

type FuncSpec struct {
	Name    *FuncName
	Args    []*TypeName
	HasArgs bool
}

func (*FuncSpec) Pos ¶

func (n *FuncSpec) Pos() int

type FunctionParameter ¶

type FunctionParameter struct {
	Name    *string
	ArgType *TypeName
	Mode    FunctionParameterMode
	Defexpr Node
}

func (*FunctionParameter) Pos ¶

func (n *FunctionParameter) Pos() int

type FunctionParameterMode ¶

type FunctionParameterMode uint

func (*FunctionParameterMode) Pos ¶

func (n *FunctionParameterMode) Pos() int

type GrantObjectType ¶

type GrantObjectType uint

func (*GrantObjectType) Pos ¶

func (n *GrantObjectType) Pos() int

type GrantRoleStmt ¶

type GrantRoleStmt struct {
	GrantedRoles *List
	GranteeRoles *List
	IsGrant      bool
	Grantor      *RoleSpec
	Behavior     DropBehavior
}

func (*GrantRoleStmt) Pos ¶

func (n *GrantRoleStmt) Pos() int

type GrantStmt ¶

type GrantStmt struct {
	IsGrant     bool
	Targtype    GrantTargetType
	Objtype     GrantObjectType
	Objects     *List
	Privileges  *List
	Grantees    *List
	GrantOption bool
	Behavior    DropBehavior
}

func (*GrantStmt) Pos ¶

func (n *GrantStmt) Pos() int

type GrantTargetType ¶

type GrantTargetType uint

func (*GrantTargetType) Pos ¶

func (n *GrantTargetType) Pos() int

type GroupingFunc ¶

type GroupingFunc struct {
	Xpr         Node
	Args        *List
	Refs        *List
	Cols        *List
	Agglevelsup Index
	Location    int
}

func (*GroupingFunc) Pos ¶

func (n *GroupingFunc) Pos() int

type GroupingSet ¶

type GroupingSet struct {
	Kind     GroupingSetKind
	Content  *List
	Location int
}

func (*GroupingSet) Pos ¶

func (n *GroupingSet) Pos() int

type GroupingSetKind ¶

type GroupingSetKind uint

func (*GroupingSetKind) Pos ¶

func (n *GroupingSetKind) Pos() int

type ImportForeignSchemaStmt ¶

type ImportForeignSchemaStmt struct {
	ServerName   *string
	RemoteSchema *string
	LocalSchema  *string
	ListType     ImportForeignSchemaType
	TableList    *List
	Options      *List
}

func (*ImportForeignSchemaStmt) Pos ¶

func (n *ImportForeignSchemaStmt) Pos() int

type ImportForeignSchemaType ¶

type ImportForeignSchemaType uint

func (*ImportForeignSchemaType) Pos ¶

func (n *ImportForeignSchemaType) Pos() int

type In ¶

type In struct {
	// Expr is the value expression to be compared.
	Expr Node
	// List is the list expression in compare list.
	List []Node
	// Not is true, the expression is "not in".
	Not bool
	// Sel is the subquery, may be rewritten to other type of expression.
	Sel      Node
	Location int
}

In describes a 'select foo in (bar, baz)' type statement, though there are multiple important variants handled.

func (*In) Pos ¶

func (n *In) Pos() int

Pos returns the location.

type Index ¶

type Index uint64

func (*Index) Pos ¶

func (n *Index) Pos() int

type IndexElem ¶

type IndexElem struct {
	Name          *string
	Expr          Node
	Indexcolname  *string
	Collation     *List
	Opclass       *List
	Ordering      SortByDir
	NullsOrdering SortByNulls
}

func (*IndexElem) Pos ¶

func (n *IndexElem) Pos() int

type IndexStmt ¶

type IndexStmt struct {
	Idxname        *string
	Relation       *RangeVar
	AccessMethod   *string
	TableSpace     *string
	IndexParams    *List
	Options        *List
	WhereClause    Node
	ExcludeOpNames *List
	Idxcomment     *string
	IndexOid       Oid
	Unique         bool
	Primary        bool
	Isconstraint   bool
	Deferrable     bool
	Initdeferred   bool
	Transformed    bool
	Concurrent     bool
	IfNotExists    bool
}

func (*IndexStmt) Pos ¶

func (n *IndexStmt) Pos() int

type InferClause ¶

type InferClause struct {
	IndexElems  *List
	WhereClause Node
	Conname     *string
	Location    int
}

func (*InferClause) Pos ¶

func (n *InferClause) Pos() int

type InferenceElem ¶

type InferenceElem struct {
	Xpr          Node
	Expr         Node
	Infercollid  Oid
	Inferopclass Oid
}

func (*InferenceElem) Pos ¶

func (n *InferenceElem) Pos() int

type InlineCodeBlock ¶

type InlineCodeBlock struct {
	SourceText    *string
	LangOid       Oid
	LangIsTrusted bool
}

func (*InlineCodeBlock) Pos ¶

func (n *InlineCodeBlock) Pos() int

type InsertStmt ¶

type InsertStmt struct {
	Relation         *RangeVar
	Cols             *List
	SelectStmt       Node
	OnConflictClause *OnConflictClause
	ReturningList    *List
	WithClause       *WithClause
	Override         OverridingKind
}

func (*InsertStmt) Format ¶ added in v1.23.0

func (n *InsertStmt) Format(buf *TrackedBuffer)

func (*InsertStmt) Pos ¶

func (n *InsertStmt) Pos() int

type Integer ¶

type Integer struct {
	Ival int64
}

func (*Integer) Format ¶ added in v1.23.0

func (n *Integer) Format(buf *TrackedBuffer)

func (*Integer) Pos ¶

func (n *Integer) Pos() int

type IntoClause ¶

type IntoClause struct {
	Rel            *RangeVar
	ColNames       *List
	Options        *List
	OnCommit       OnCommitAction
	TableSpaceName *string
	ViewQuery      Node
	SkipData       bool
}

func (*IntoClause) Pos ¶

func (n *IntoClause) Pos() int

type JoinExpr ¶

type JoinExpr struct {
	Jointype    JoinType
	IsNatural   bool
	Larg        Node
	Rarg        Node
	UsingClause *List
	Quals       Node
	Alias       *Alias
	Rtindex     int
}

func (*JoinExpr) Format ¶ added in v1.23.0

func (n *JoinExpr) Format(buf *TrackedBuffer)

func (*JoinExpr) Pos ¶

func (n *JoinExpr) Pos() int

type JoinType ¶

type JoinType uint
const (
	JoinTypeInner JoinType
	JoinTypeLeft
	JoinTypeFull
	JoinTypeRight
	JoinTypeSemi
	JoinTypeAnti
	JoinTypeUniqueOuter
	JoinTypeUniqueInner
)

JoinType is the reported type of the join Enum copies https://github.com/pganalyze/libpg_query/blob/13-latest/protobuf/pg_query.proto#L2890-L2901

func (*JoinType) Pos ¶

func (n *JoinType) Pos() int

type List ¶

type List struct {
	Items []Node
}

func (*List) Format ¶ added in v1.23.0

func (n *List) Format(buf *TrackedBuffer)

func (*List) Pos ¶

func (n *List) Pos() int

type ListenStmt ¶

type ListenStmt struct {
	Conditionname *string
}

func (*ListenStmt) Format ¶ added in v1.23.0

func (n *ListenStmt) Format(buf *TrackedBuffer)

func (*ListenStmt) Pos ¶

func (n *ListenStmt) Pos() int

type LoadStmt ¶

type LoadStmt struct {
	Filename *string
}

func (*LoadStmt) Pos ¶

func (n *LoadStmt) Pos() int

type LocalTransactionId ¶

type LocalTransactionId uint32

func (*LocalTransactionId) Pos ¶

func (n *LocalTransactionId) Pos() int

type LockClauseStrength ¶

type LockClauseStrength uint

func (*LockClauseStrength) Pos ¶

func (n *LockClauseStrength) Pos() int

type LockStmt ¶

type LockStmt struct {
	Relations *List
	Mode      int
	Nowait    bool
}

func (*LockStmt) Pos ¶

func (n *LockStmt) Pos() int

type LockWaitPolicy ¶

type LockWaitPolicy uint

func (*LockWaitPolicy) Pos ¶

func (n *LockWaitPolicy) Pos() int

type LockingClause ¶

type LockingClause struct {
	LockedRels *List
	Strength   LockClauseStrength
	WaitPolicy LockWaitPolicy
}

func (*LockingClause) Format ¶ added in v1.23.0

func (n *LockingClause) Format(buf *TrackedBuffer)

func (*LockingClause) Pos ¶

func (n *LockingClause) Pos() int

type MinMaxExpr ¶

type MinMaxExpr struct {
	Xpr          Node
	Minmaxtype   Oid
	Minmaxcollid Oid
	Inputcollid  Oid
	Op           MinMaxOp
	Args         *List
	Location     int
}

func (*MinMaxExpr) Pos ¶

func (n *MinMaxExpr) Pos() int

type MinMaxOp ¶

type MinMaxOp uint

func (*MinMaxOp) Pos ¶

func (n *MinMaxOp) Pos() int

type MultiAssignRef ¶

type MultiAssignRef struct {
	Source   Node
	Colno    int
	Ncolumns int
}

func (*MultiAssignRef) Format ¶ added in v1.23.0

func (n *MultiAssignRef) Format(buf *TrackedBuffer)

func (*MultiAssignRef) Pos ¶

func (n *MultiAssignRef) Pos() int

type MultiXactId ¶

type MultiXactId TransactionId

func (*MultiXactId) Pos ¶

func (n *MultiXactId) Pos() int

type MultiXactOffset ¶

type MultiXactOffset uint32

func (*MultiXactOffset) Pos ¶

func (n *MultiXactOffset) Pos() int

type NamedArgExpr ¶

type NamedArgExpr struct {
	Xpr       Node
	Arg       Node
	Name      *string
	Argnumber int
	Location  int
}

func (*NamedArgExpr) Format ¶ added in v1.23.0

func (n *NamedArgExpr) Format(buf *TrackedBuffer)

func (*NamedArgExpr) Pos ¶

func (n *NamedArgExpr) Pos() int

type NextValueExpr ¶

type NextValueExpr struct {
	Xpr    Node
	Seqid  Oid
	TypeId Oid
}

func (*NextValueExpr) Pos ¶

func (n *NextValueExpr) Pos() int

type Node ¶

type Node interface {
	Pos() int
}

type NotifyStmt ¶

type NotifyStmt struct {
	Conditionname *string
	Payload       *string
}

func (*NotifyStmt) Format ¶ added in v1.23.0

func (n *NotifyStmt) Format(buf *TrackedBuffer)

func (*NotifyStmt) Pos ¶

func (n *NotifyStmt) Pos() int

type Null ¶

type Null struct {
}

func (*Null) Format ¶ added in v1.23.0

func (n *Null) Format(buf *TrackedBuffer)

func (*Null) Pos ¶

func (n *Null) Pos() int

type NullIfExpr ¶

type NullIfExpr OpExpr

func (*NullIfExpr) Pos ¶

func (n *NullIfExpr) Pos() int

type NullTest ¶

type NullTest struct {
	Xpr          Node
	Arg          Node
	Nulltesttype NullTestType
	Argisrow     bool
	Location     int
}

func (*NullTest) Pos ¶

func (n *NullTest) Pos() int

type NullTestType ¶

type NullTestType uint

func (*NullTestType) Pos ¶

func (n *NullTestType) Pos() int

type ObjectType ¶

type ObjectType uint

func (*ObjectType) Pos ¶

func (n *ObjectType) Pos() int

type ObjectWithArgs ¶

type ObjectWithArgs struct {
	Objname         *List
	Objargs         *List
	ArgsUnspecified bool
}

func (*ObjectWithArgs) Pos ¶

func (n *ObjectWithArgs) Pos() int

type Offset ¶

type Offset int64

func (*Offset) Pos ¶

func (n *Offset) Pos() int

type Oid ¶

type Oid uint64

func (*Oid) Pos ¶

func (n *Oid) Pos() int

type OnCommitAction ¶

type OnCommitAction uint

func (*OnCommitAction) Pos ¶

func (n *OnCommitAction) Pos() int

type OnConflictAction ¶

type OnConflictAction uint

func (*OnConflictAction) Pos ¶

func (n *OnConflictAction) Pos() int

type OnConflictClause ¶

type OnConflictClause struct {
	Action      OnConflictAction
	Infer       *InferClause
	TargetList  *List
	WhereClause Node
	Location    int
}

func (*OnConflictClause) Pos ¶

func (n *OnConflictClause) Pos() int

type OnConflictExpr ¶

type OnConflictExpr struct {
	Action          OnConflictAction
	ArbiterElems    *List
	ArbiterWhere    Node
	Constraint      Oid
	OnConflictSet   *List
	OnConflictWhere Node
	ExclRelIndex    int
	ExclRelTlist    *List
}

func (*OnConflictExpr) Pos ¶

func (n *OnConflictExpr) Pos() int

type OpExpr ¶

type OpExpr struct {
	Xpr          Node
	Opno         Oid
	Opresulttype Oid
	Opretset     bool
	Opcollid     Oid
	Inputcollid  Oid
	Args         *List
	Location     int
}

func (*OpExpr) Pos ¶

func (n *OpExpr) Pos() int

type OverridingKind ¶

type OverridingKind uint

func (*OverridingKind) Pos ¶

func (n *OverridingKind) Pos() int

type Param ¶

type Param struct {
	Xpr         Node
	Paramkind   ParamKind
	Paramid     int
	Paramtype   Oid
	Paramtypmod int32
	Paramcollid Oid
	Location    int
}

func (*Param) Pos ¶

func (n *Param) Pos() int

type ParamExecData ¶

type ParamExecData struct {
	ExecPlan interface{}
	Value    Datum
	Isnull   bool
}

func (*ParamExecData) Pos ¶

func (n *ParamExecData) Pos() int

type ParamExternData ¶

type ParamExternData struct {
	Value  Datum
	Isnull bool
	Pflags uint16
	Ptype  Oid
}

func (*ParamExternData) Pos ¶

func (n *ParamExternData) Pos() int

type ParamKind ¶

type ParamKind uint

func (*ParamKind) Pos ¶

func (n *ParamKind) Pos() int

type ParamListInfo ¶

type ParamListInfo ParamListInfoData

func (*ParamListInfo) Pos ¶

func (n *ParamListInfo) Pos() int

type ParamListInfoData ¶

type ParamListInfoData struct {
	ParamFetchArg  interface{}
	ParserSetupArg interface{}
	NumParams      int
	ParamMask      []uint32
}

func (*ParamListInfoData) Pos ¶

func (n *ParamListInfoData) Pos() int

type ParamRef ¶

type ParamRef struct {
	Number   int
	Location int
	Dollar   bool
}

func (*ParamRef) Format ¶ added in v1.23.0

func (n *ParamRef) Format(buf *TrackedBuffer)

func (*ParamRef) Pos ¶

func (n *ParamRef) Pos() int

type PartitionBoundSpec ¶

type PartitionBoundSpec struct {
	Strategy    byte
	Listdatums  *List
	Lowerdatums *List
	Upperdatums *List
	Location    int
}

func (*PartitionBoundSpec) Pos ¶

func (n *PartitionBoundSpec) Pos() int

type PartitionCmd ¶

type PartitionCmd struct {
	Name  *RangeVar
	Bound *PartitionBoundSpec
}

func (*PartitionCmd) Pos ¶

func (n *PartitionCmd) Pos() int

type PartitionElem ¶

type PartitionElem struct {
	Name      *string
	Expr      Node
	Collation *List
	Opclass   *List
	Location  int
}

func (*PartitionElem) Pos ¶

func (n *PartitionElem) Pos() int

type PartitionRangeDatum ¶

type PartitionRangeDatum struct {
	Kind     PartitionRangeDatumKind
	Value    Node
	Location int
}

func (*PartitionRangeDatum) Pos ¶

func (n *PartitionRangeDatum) Pos() int

type PartitionRangeDatumKind ¶

type PartitionRangeDatumKind uint

func (*PartitionRangeDatumKind) Pos ¶

func (n *PartitionRangeDatumKind) Pos() int

type PartitionSpec ¶

type PartitionSpec struct {
	Strategy   *string
	PartParams *List
	Location   int
}

func (*PartitionSpec) Pos ¶

func (n *PartitionSpec) Pos() int

type Pointer ¶

type Pointer byte

func (*Pointer) Pos ¶

func (n *Pointer) Pos() int

type PrepareStmt ¶

type PrepareStmt struct {
	Name     *string
	Argtypes *List
	Query    Node
}

func (*PrepareStmt) Pos ¶

func (n *PrepareStmt) Pos() int

type Query ¶

type Query struct {
	CommandType      CmdType
	QuerySource      QuerySource
	QueryId          uint32
	CanSetTag        bool
	UtilityStmt      Node
	ResultRelation   int
	HasAggs          bool
	HasWindowFuncs   bool
	HasTargetSrfs    bool
	HasSubLinks      bool
	HasDistinctOn    bool
	HasRecursive     bool
	HasModifyingCte  bool
	HasForUpdate     bool
	HasRowSecurity   bool
	CteList          *List
	Rtable           *List
	Jointree         *FromExpr
	TargetList       *List
	Override         OverridingKind
	OnConflict       *OnConflictExpr
	ReturningList    *List
	GroupClause      *List
	GroupingSets     *List
	HavingQual       Node
	WindowClause     *List
	DistinctClause   *List
	SortClause       *List
	LimitOffset      Node
	LimitCount       Node
	RowMarks         *List
	SetOperations    Node
	ConstraintDeps   *List
	WithCheckOptions *List
	StmtLocation     int
	StmtLen          int
}

func (*Query) Pos ¶

func (n *Query) Pos() int

type QuerySource ¶

type QuerySource uint

func (*QuerySource) Pos ¶

func (n *QuerySource) Pos() int

type RTEKind ¶

type RTEKind uint

func (*RTEKind) Pos ¶

func (n *RTEKind) Pos() int

type RangeFunction ¶

type RangeFunction struct {
	Lateral    bool
	Ordinality bool
	IsRowsfrom bool
	Functions  *List
	Alias      *Alias
	Coldeflist *List
}

func (*RangeFunction) Format ¶ added in v1.23.0

func (n *RangeFunction) Format(buf *TrackedBuffer)

func (*RangeFunction) Pos ¶

func (n *RangeFunction) Pos() int

type RangeSubselect ¶

type RangeSubselect struct {
	Lateral  bool
	Subquery Node
	Alias    *Alias
}

func (*RangeSubselect) Format ¶ added in v1.23.0

func (n *RangeSubselect) Format(buf *TrackedBuffer)

func (*RangeSubselect) Pos ¶

func (n *RangeSubselect) Pos() int

type RangeTableFunc ¶

type RangeTableFunc struct {
	Lateral    bool
	Docexpr    Node
	Rowexpr    Node
	Namespaces *List
	Columns    *List
	Alias      *Alias
	Location   int
}

func (*RangeTableFunc) Pos ¶

func (n *RangeTableFunc) Pos() int

type RangeTableFuncCol ¶

type RangeTableFuncCol struct {
	Colname       *string
	TypeName      *TypeName
	ForOrdinality bool
	IsNotNull     bool
	Colexpr       Node
	Coldefexpr    Node
	Location      int
}

func (*RangeTableFuncCol) Pos ¶

func (n *RangeTableFuncCol) Pos() int

type RangeTableSample ¶

type RangeTableSample struct {
	Relation   Node
	Method     *List
	Args       *List
	Repeatable Node
	Location   int
}

func (*RangeTableSample) Pos ¶

func (n *RangeTableSample) Pos() int

type RangeTblEntry ¶

type RangeTblEntry struct {
	Rtekind         RTEKind
	Relid           Oid
	Relkind         byte
	Tablesample     *TableSampleClause
	Subquery        *Query
	SecurityBarrier bool
	Jointype        JoinType
	Joinaliasvars   *List
	Functions       *List
	Funcordinality  bool
	Tablefunc       *TableFunc
	ValuesLists     *List
	Ctename         *string
	Ctelevelsup     Index
	SelfReference   bool
	Coltypes        *List
	Coltypmods      *List
	Colcollations   *List
	Enrname         *string
	Enrtuples       float64
	Alias           *Alias
	Eref            *Alias
	Lateral         bool
	Inh             bool
	InFromCl        bool
	RequiredPerms   AclMode
	CheckAsUser     Oid
	SelectedCols    []uint32
	InsertedCols    []uint32
	UpdatedCols     []uint32
	SecurityQuals   *List
}

func (*RangeTblEntry) Pos ¶

func (n *RangeTblEntry) Pos() int

type RangeTblFunction ¶

type RangeTblFunction struct {
	Funcexpr          Node
	Funccolcount      int
	Funccolnames      *List
	Funccoltypes      *List
	Funccoltypmods    *List
	Funccolcollations *List
	Funcparams        []uint32
}

func (*RangeTblFunction) Pos ¶

func (n *RangeTblFunction) Pos() int

type RangeTblRef ¶

type RangeTblRef struct {
	Rtindex int
}

func (*RangeTblRef) Pos ¶

func (n *RangeTblRef) Pos() int

type RangeVar ¶

type RangeVar struct {
	Catalogname    *string
	Schemaname     *string
	Relname        *string
	Inh            bool
	Relpersistence byte
	Alias          *Alias
	Location       int
}

func (*RangeVar) Format ¶ added in v1.23.0

func (n *RangeVar) Format(buf *TrackedBuffer)

func (*RangeVar) Pos ¶

func (n *RangeVar) Pos() int

type RawStmt ¶

type RawStmt struct {
	Stmt         Node
	StmtLocation int
	StmtLen      int
}

func (*RawStmt) Format ¶ added in v1.23.0

func (n *RawStmt) Format(buf *TrackedBuffer)

func (*RawStmt) Pos ¶

func (n *RawStmt) Pos() int

type ReassignOwnedStmt ¶

type ReassignOwnedStmt struct {
	Roles   *List
	Newrole *RoleSpec
}

func (*ReassignOwnedStmt) Pos ¶

func (n *ReassignOwnedStmt) Pos() int

type RefreshMatViewStmt ¶

type RefreshMatViewStmt struct {
	Concurrent bool
	SkipData   bool
	Relation   *RangeVar
}

func (*RefreshMatViewStmt) Format ¶ added in v1.23.0

func (n *RefreshMatViewStmt) Format(buf *TrackedBuffer)

func (*RefreshMatViewStmt) Pos ¶

func (n *RefreshMatViewStmt) Pos() int

type RegProcedure ¶

type RegProcedure regproc

func (*RegProcedure) Pos ¶

func (n *RegProcedure) Pos() int

type ReindexObjectType ¶

type ReindexObjectType uint

func (*ReindexObjectType) Pos ¶

func (n *ReindexObjectType) Pos() int

type ReindexStmt ¶

type ReindexStmt struct {
	Kind     ReindexObjectType
	Relation *RangeVar
	Name     *string
	Options  int
}

func (*ReindexStmt) Pos ¶

func (n *ReindexStmt) Pos() int

type RelabelType ¶

type RelabelType struct {
	Xpr           Node
	Arg           Node
	Resulttype    Oid
	Resulttypmod  int32
	Resultcollid  Oid
	Relabelformat CoercionForm
	Location      int
}

func (*RelabelType) Pos ¶

func (n *RelabelType) Pos() int

type RenameColumnStmt ¶

type RenameColumnStmt struct {
	Table     *TableName
	Col       *ColumnRef
	NewName   *string
	MissingOk bool
}

func (*RenameColumnStmt) Pos ¶

func (n *RenameColumnStmt) Pos() int

type RenameStmt ¶

type RenameStmt struct {
	RenameType   ObjectType
	RelationType ObjectType
	Relation     *RangeVar
	Object       Node
	Subname      *string
	Newname      *string
	Behavior     DropBehavior
	MissingOk    bool
}

func (*RenameStmt) Pos ¶

func (n *RenameStmt) Pos() int

type RenameTableStmt ¶

type RenameTableStmt struct {
	Table     *TableName
	NewName   *string
	MissingOk bool
}

func (*RenameTableStmt) Pos ¶

func (n *RenameTableStmt) Pos() int

type RenameTypeStmt ¶

type RenameTypeStmt struct {
	Type    *TypeName
	NewName *string
}

func (*RenameTypeStmt) Pos ¶

func (n *RenameTypeStmt) Pos() int

type ReplicaIdentityStmt ¶

type ReplicaIdentityStmt struct {
	IdentityType byte
	Name         *string
}

func (*ReplicaIdentityStmt) Pos ¶

func (n *ReplicaIdentityStmt) Pos() int

type ResTarget ¶

type ResTarget struct {
	Name        *string
	Indirection *List
	Val         Node
	Location    int
}

func (*ResTarget) Format ¶ added in v1.23.0

func (n *ResTarget) Format(buf *TrackedBuffer)

func (*ResTarget) Pos ¶

func (n *ResTarget) Pos() int

type RoleSpec ¶

type RoleSpec struct {
	Roletype RoleSpecType
	Rolename *string
	Location int
}

func (*RoleSpec) Pos ¶

func (n *RoleSpec) Pos() int

type RoleSpecType ¶

type RoleSpecType uint

func (*RoleSpecType) Pos ¶

func (n *RoleSpecType) Pos() int

type RoleStmtType ¶

type RoleStmtType uint

func (*RoleStmtType) Pos ¶

func (n *RoleStmtType) Pos() int

type RowCompareExpr ¶

type RowCompareExpr struct {
	Xpr          Node
	Rctype       RowCompareType
	Opnos        *List
	Opfamilies   *List
	Inputcollids *List
	Largs        *List
	Rargs        *List
}

func (*RowCompareExpr) Pos ¶

func (n *RowCompareExpr) Pos() int

type RowCompareType ¶

type RowCompareType uint

func (*RowCompareType) Pos ¶

func (n *RowCompareType) Pos() int

type RowExpr ¶

type RowExpr struct {
	Xpr       Node
	Args      *List
	RowTypeid Oid
	RowFormat CoercionForm
	Colnames  *List
	Location  int
}

func (*RowExpr) Format ¶ added in v1.23.0

func (n *RowExpr) Format(buf *TrackedBuffer)

func (*RowExpr) Pos ¶

func (n *RowExpr) Pos() int

type RowMarkClause ¶

type RowMarkClause struct {
	Rti        Index
	Strength   LockClauseStrength
	WaitPolicy LockWaitPolicy
	PushedDown bool
}

func (*RowMarkClause) Pos ¶

func (n *RowMarkClause) Pos() int

type RuleStmt ¶

type RuleStmt struct {
	Relation    *RangeVar
	Rulename    *string
	WhereClause Node
	Event       CmdType
	Instead     bool
	Actions     *List
	Replace     bool
}

func (*RuleStmt) Pos ¶

func (n *RuleStmt) Pos() int

type SQLValueFunction ¶

type SQLValueFunction struct {
	Xpr      Node
	Op       SQLValueFunctionOp
	Type     Oid
	Typmod   int32
	Location int
}

func (*SQLValueFunction) Format ¶ added in v1.23.0

func (n *SQLValueFunction) Format(buf *TrackedBuffer)

func (*SQLValueFunction) Pos ¶

func (n *SQLValueFunction) Pos() int

type SQLValueFunctionOp ¶

type SQLValueFunctionOp uint
const (
	SVFOpCurrentDate SQLValueFunctionOp
	SVFOpCurrentTime
	SVFOpCurrentTimeN
	SVFOpCurrentTimestamp
	SVFOpCurrentTimestampN
	SVFOpLocaltime
	SVFOpLocaltimeN
	SVFOpLocaltimestamp
	SVFOpLocaltimestampN
	SVFOpCurrentRole
	SVFOpCurrentUser
	SVFOpUser
	SVFOpSessionUser
	SVFOpCurrentCatalog
	SVFOpCurrentSchema
)

func (*SQLValueFunctionOp) Pos ¶

func (n *SQLValueFunctionOp) Pos() int

type ScalarArrayOpExpr ¶

type ScalarArrayOpExpr struct {
	Xpr         Node
	Opno        Oid
	UseOr       bool
	Inputcollid Oid
	Args        *List
	Location    int
}

func (*ScalarArrayOpExpr) Pos ¶

func (n *ScalarArrayOpExpr) Pos() int

type ScanDirection ¶

type ScanDirection uint

func (*ScanDirection) Pos ¶

func (n *ScanDirection) Pos() int

type SecLabelStmt ¶

type SecLabelStmt struct {
	Objtype  ObjectType
	Object   Node
	Provider *string
	Label    *string
}

func (*SecLabelStmt) Pos ¶

func (n *SecLabelStmt) Pos() int

type SelectStmt ¶

type SelectStmt struct {
	DistinctClause *List
	IntoClause     *IntoClause
	TargetList     *List
	FromClause     *List
	WhereClause    Node
	GroupClause    *List
	HavingClause   Node
	WindowClause   *List
	ValuesLists    *List
	SortClause     *List
	LimitOffset    Node
	LimitCount     Node
	LockingClause  *List
	WithClause     *WithClause
	Op             SetOperation
	All            bool
	Larg           *SelectStmt
	Rarg           *SelectStmt
}

func (*SelectStmt) Format ¶ added in v1.23.0

func (n *SelectStmt) Format(buf *TrackedBuffer)

func (*SelectStmt) Pos ¶

func (n *SelectStmt) Pos() int

type Selectivity ¶

type Selectivity float64

func (*Selectivity) Pos ¶

func (n *Selectivity) Pos() int

type SetOpCmd ¶

type SetOpCmd uint

func (*SetOpCmd) Pos ¶

func (n *SetOpCmd) Pos() int

type SetOpStrategy ¶

type SetOpStrategy uint

func (*SetOpStrategy) Pos ¶

func (n *SetOpStrategy) Pos() int

type SetOperation ¶

type SetOperation uint
const (
	None SetOperation = iota
	Union
	Intersect
	Except
)

func (*SetOperation) Pos ¶

func (n *SetOperation) Pos() int

func (SetOperation) String ¶

func (n SetOperation) String() string

type SetOperationStmt ¶

type SetOperationStmt struct {
	Op            SetOperation
	All           bool
	Larg          Node
	Rarg          Node
	ColTypes      *List
	ColTypmods    *List
	ColCollations *List
	GroupClauses  *List
}

func (*SetOperationStmt) Pos ¶

func (n *SetOperationStmt) Pos() int

type SetToDefault ¶

type SetToDefault struct {
	Xpr       Node
	TypeId    Oid
	TypeMod   int32
	Collation Oid
	Location  int
}

func (*SetToDefault) Pos ¶

func (n *SetToDefault) Pos() int

type SortBy ¶

type SortBy struct {
	Node        Node
	SortbyDir   SortByDir
	SortbyNulls SortByNulls
	UseOp       *List
	Location    int
}

func (*SortBy) Format ¶ added in v1.23.0

func (n *SortBy) Format(buf *TrackedBuffer)

func (*SortBy) Pos ¶

func (n *SortBy) Pos() int

type SortByDir ¶

type SortByDir uint
const (
	SortByDirUndefined SortByDir = 0
	SortByDirDefault   SortByDir = 1
	SortByDirAsc       SortByDir = 2
	SortByDirDesc      SortByDir = 3
	SortByDirUsing     SortByDir = 4
)

func (*SortByDir) Pos ¶

func (n *SortByDir) Pos() int

type SortByNulls ¶

type SortByNulls uint
const (
	SortByNullsUndefined SortByNulls = 0
	SortByNullsDefault   SortByNulls = 1
	SortByNullsFirst     SortByNulls = 2
	SortByNullsLast      SortByNulls = 3
)

func (*SortByNulls) Pos ¶

func (n *SortByNulls) Pos() int

type SortGroupClause ¶

type SortGroupClause struct {
	TleSortGroupRef Index
	Eqop            Oid
	Sortop          Oid
	NullsFirst      bool
	Hashable        bool
}

func (*SortGroupClause) Pos ¶

func (n *SortGroupClause) Pos() int

type Statement ¶

type Statement struct {
	Raw *RawStmt
}

func (*Statement) Pos ¶

func (n *Statement) Pos() int

type String ¶

type String struct {
	Str string
}

func (*String) Format ¶ added in v1.23.0

func (n *String) Format(buf *TrackedBuffer)

func (*String) Pos ¶

func (n *String) Pos() int
type SubLink struct {
	Xpr         Node
	SubLinkType SubLinkType
	SubLinkId   int
	Testexpr    Node
	OperName    *List
	Subselect   Node
	Location    int
}

func (*SubLink) Format ¶ added in v1.23.0

func (n *SubLink) Format(buf *TrackedBuffer)

func (*SubLink) Pos ¶

func (n *SubLink) Pos() int

type SubLinkType ¶

type SubLinkType uint
const (
	EXISTS_SUBLINK SubLinkType = iota
	ALL_SUBLINK
	ANY_SUBLINK
	ROWCOMPARE_SUBLINK
	EXPR_SUBLINK
	MULTIEXPR_SUBLINK
	ARRAY_SUBLINK
	CTE_SUBLINK /* for SubPlans only */
)

type SubPlan ¶

type SubPlan struct {
	Xpr               Node
	SubLinkType       SubLinkType
	Testexpr          Node
	ParamIds          *List
	PlanId            int
	PlanName          *string
	FirstColType      Oid
	FirstColTypmod    int32
	FirstColCollation Oid
	UseHashTable      bool
	UnknownEqFalse    bool
	ParallelSafe      bool
	SetParam          *List
	ParParam          *List
	Args              *List
	StartupCost       Cost
	PerCallCost       Cost
}

func (*SubPlan) Pos ¶

func (n *SubPlan) Pos() int

type SubTransactionId ¶

type SubTransactionId uint32

func (*SubTransactionId) Pos ¶

func (n *SubTransactionId) Pos() int

type TODO ¶

type TODO struct {
}

func (*TODO) Pos ¶

func (n *TODO) Pos() int

type TableFunc ¶

type TableFunc struct {
	NsUris        *List
	NsNames       *List
	Docexpr       Node
	Rowexpr       Node
	Colnames      *List
	Coltypes      *List
	Coltypmods    *List
	Colcollations *List
	Colexprs      *List
	Coldefexprs   *List
	Notnulls      []uint32
	Ordinalitycol int
	Location      int
}

func (*TableFunc) Pos ¶

func (n *TableFunc) Pos() int

type TableLikeClause ¶

type TableLikeClause struct {
	Relation *RangeVar
	Options  uint32
}

func (*TableLikeClause) Pos ¶

func (n *TableLikeClause) Pos() int

type TableLikeOption ¶

type TableLikeOption uint

func (*TableLikeOption) Pos ¶

func (n *TableLikeOption) Pos() int

type TableName ¶

type TableName struct {
	Catalog string
	Schema  string
	Name    string
}

func (*TableName) Format ¶ added in v1.23.0

func (n *TableName) Format(buf *TrackedBuffer)

func (*TableName) Pos ¶

func (n *TableName) Pos() int

type TableSampleClause ¶

type TableSampleClause struct {
	Tsmhandler Oid
	Args       *List
	Repeatable Node
}

func (*TableSampleClause) Pos ¶

func (n *TableSampleClause) Pos() int

type TargetEntry ¶

type TargetEntry struct {
	Xpr             Node
	Expr            Node
	Resno           AttrNumber
	Resname         *string
	Ressortgroupref Index
	Resorigtbl      Oid
	Resorigcol      AttrNumber
	Resjunk         bool
}

func (*TargetEntry) Pos ¶

func (n *TargetEntry) Pos() int

type TrackedBuffer ¶ added in v1.23.0

type TrackedBuffer struct {
	*strings.Builder
}

func NewTrackedBuffer ¶ added in v1.23.0

func NewTrackedBuffer() *TrackedBuffer

NewTrackedBuffer creates a new TrackedBuffer.

type TransactionId ¶

type TransactionId uint32

func (*TransactionId) Pos ¶

func (n *TransactionId) Pos() int

type TransactionStmt ¶

type TransactionStmt struct {
	Kind    TransactionStmtKind
	Options *List
	Gid     *string
}

func (*TransactionStmt) Pos ¶

func (n *TransactionStmt) Pos() int

type TransactionStmtKind ¶

type TransactionStmtKind uint

func (*TransactionStmtKind) Pos ¶

func (n *TransactionStmtKind) Pos() int

type TriggerTransition ¶

type TriggerTransition struct {
	Name    *string
	IsNew   bool
	IsTable bool
}

func (*TriggerTransition) Pos ¶

func (n *TriggerTransition) Pos() int

type TruncateStmt ¶

type TruncateStmt struct {
	Relations   *List
	RestartSeqs bool
	Behavior    DropBehavior
}

func (*TruncateStmt) Format ¶ added in v1.23.0

func (n *TruncateStmt) Format(buf *TrackedBuffer)

func (*TruncateStmt) Pos ¶

func (n *TruncateStmt) Pos() int

type TypeCast ¶

type TypeCast struct {
	Arg      Node
	TypeName *TypeName
	Location int
}

func (*TypeCast) Format ¶ added in v1.23.0

func (n *TypeCast) Format(buf *TrackedBuffer)

func (*TypeCast) Pos ¶

func (n *TypeCast) Pos() int

type TypeName ¶

type TypeName struct {
	Catalog string
	Schema  string
	Name    string

	// From pg.TypeName
	Names       *List
	TypeOid     Oid
	Setof       bool
	PctType     bool
	Typmods     *List
	Typemod     int32
	ArrayBounds *List
	Location    int
}

func (*TypeName) Format ¶ added in v1.23.0

func (n *TypeName) Format(buf *TrackedBuffer)

func (*TypeName) Pos ¶

func (n *TypeName) Pos() int

type UnlistenStmt ¶

type UnlistenStmt struct {
	Conditionname *string
}

func (*UnlistenStmt) Pos ¶

func (n *UnlistenStmt) Pos() int

type UpdateStmt ¶

type UpdateStmt struct {
	Relations     *List
	TargetList    *List
	WhereClause   Node
	FromClause    *List
	LimitCount    Node
	ReturningList *List
	WithClause    *WithClause
}

func (*UpdateStmt) Format ¶ added in v1.23.0

func (n *UpdateStmt) Format(buf *TrackedBuffer)

func (*UpdateStmt) Pos ¶

func (n *UpdateStmt) Pos() int

type VacuumOption ¶

type VacuumOption uint

func (*VacuumOption) Pos ¶

func (n *VacuumOption) Pos() int

type VacuumStmt ¶

type VacuumStmt struct {
	Options  int
	Relation *RangeVar
	VaCols   *List
}

func (*VacuumStmt) Pos ¶

func (n *VacuumStmt) Pos() int

type Var ¶

type Var struct {
	Xpr         Node
	Varno       Index
	Varattno    AttrNumber
	Vartype     Oid
	Vartypmod   int32
	Varcollid   Oid
	Varlevelsup Index
	Varnoold    Index
	Varoattno   AttrNumber
	Location    int
}

func (*Var) Pos ¶

func (n *Var) Pos() int

type VariableSetKind ¶

type VariableSetKind uint

func (*VariableSetKind) Pos ¶

func (n *VariableSetKind) Pos() int

type VariableSetStmt ¶

type VariableSetStmt struct {
	Kind    VariableSetKind
	Name    *string
	Args    *List
	IsLocal bool
}

func (*VariableSetStmt) Pos ¶

func (n *VariableSetStmt) Pos() int

type VariableShowStmt ¶

type VariableShowStmt struct {
	Name *string
}

func (*VariableShowStmt) Pos ¶

func (n *VariableShowStmt) Pos() int

type ViewCheckOption ¶

type ViewCheckOption uint

func (*ViewCheckOption) Pos ¶

func (n *ViewCheckOption) Pos() int

type ViewStmt ¶

type ViewStmt struct {
	View            *RangeVar
	Aliases         *List
	Query           Node
	Replace         bool
	Options         *List
	WithCheckOption ViewCheckOption
}

func (*ViewStmt) Pos ¶

func (n *ViewStmt) Pos() int

type WCOKind ¶

type WCOKind uint

func (*WCOKind) Pos ¶

func (n *WCOKind) Pos() int

type WindowClause ¶

type WindowClause struct {
	Name            *string
	Refname         *string
	PartitionClause *List
	OrderClause     *List
	FrameOptions    int
	StartOffset     Node
	EndOffset       Node
	Winref          Index
	CopiedOrder     bool
}

func (*WindowClause) Pos ¶

func (n *WindowClause) Pos() int

type WindowDef ¶

type WindowDef struct {
	Name            *string
	Refname         *string
	PartitionClause *List
	OrderClause     *List
	FrameOptions    int
	StartOffset     Node
	EndOffset       Node
	Location        int
}

func (*WindowDef) Pos ¶

func (n *WindowDef) Pos() int

type WindowFunc ¶

type WindowFunc struct {
	Xpr         Node
	Winfnoid    Oid
	Wintype     Oid
	Wincollid   Oid
	Inputcollid Oid
	Args        *List
	Aggfilter   Node
	Winref      Index
	Winstar     bool
	Winagg      bool
	Location    int
}

func (*WindowFunc) Pos ¶

func (n *WindowFunc) Pos() int

type WithCheckOption ¶

type WithCheckOption struct {
	Kind     WCOKind
	Relname  *string
	Polname  *string
	Qual     Node
	Cascaded bool
}

func (*WithCheckOption) Pos ¶

func (n *WithCheckOption) Pos() int

type WithClause ¶

type WithClause struct {
	Ctes      *List
	Recursive bool
	Location  int
}

func (*WithClause) Format ¶ added in v1.23.0

func (n *WithClause) Format(buf *TrackedBuffer)

func (*WithClause) Pos ¶

func (n *WithClause) Pos() int

type XmlExpr ¶

type XmlExpr struct {
	Xpr       Node
	Op        XmlExprOp
	Name      *string
	NamedArgs *List
	ArgNames  *List
	Args      *List
	Xmloption XmlOptionType
	Type      Oid
	Typmod    int32
	Location  int
}

func (*XmlExpr) Pos ¶

func (n *XmlExpr) Pos() int

type XmlExprOp ¶

type XmlExprOp uint

func (*XmlExprOp) Pos ¶

func (n *XmlExprOp) Pos() int

type XmlOptionType ¶

type XmlOptionType uint

func (*XmlOptionType) Pos ¶

func (n *XmlOptionType) Pos() int

type XmlSerialize ¶

type XmlSerialize struct {
	Xmloption XmlOptionType
	Expr      Node
	TypeName  *TypeName
	Location  int
}

func (*XmlSerialize) Pos ¶

func (n *XmlSerialize) Pos() int

Source Files ¶

Jump to

Keyboard shortcuts

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