snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
Some checks failed
kotlin / test (push) Has been skipped
python / test (push) Has been skipped
typescript / test (push) Has been skipped
go / build darwin/amd64 (push) Has been cancelled
go / build linux/amd64 (push) Has been cancelled
go / build windows/amd64 (push) Has been cancelled
go / build darwin/arm64 (push) Has been cancelled
go / build linux/arm64 (push) Has been cancelled
go / build windows/arm64 (push) Has been cancelled
go / test (push) Has been cancelled
go / vuln_check (push) Has been cancelled
This commit is contained in:
36
internal/sql/ast/constraint.go
Normal file
36
internal/sql/ast/constraint.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package ast
|
||||
|
||||
type Constraint struct {
|
||||
Tag NodeTag[Constraint] `json:"tag"`
|
||||
|
||||
Contype ConstrType `json:"contype"`
|
||||
Conname *string `json:"conname,omitempty"`
|
||||
Deferrable bool `json:"deferrable"`
|
||||
Initdeferred bool `json:"initdeferred"`
|
||||
Location int `json:"location"`
|
||||
IsNoInherit bool `json:"is_no_inherit"`
|
||||
RawExpr Node `json:"raw_expr,omitempty"`
|
||||
CookedExpr *string `json:"cooked_expr,omitempty"`
|
||||
GeneratedWhen byte `json:"generated_when"`
|
||||
Keys *List `json:"keys,omitempty"`
|
||||
Exclusions *List `json:"exclusions,omitempty"`
|
||||
Options *List `json:"options,omitempty"`
|
||||
Indexname *string `json:"indexname,omitempty"`
|
||||
Indexspace *string `json:"indexspace,omitempty"`
|
||||
AccessMethod *string `json:"access_method,omitempty"`
|
||||
WhereClause Node `json:"where_clause,omitempty"`
|
||||
Pktable *RangeVar `json:"pktable,omitempty"`
|
||||
FkAttrs *List `json:"fk_attrs,omitempty"`
|
||||
PkAttrs *List `json:"pk_attrs,omitempty"`
|
||||
FkMatchtype byte `json:"fk_matchtype"`
|
||||
FkUpdAction byte `json:"fk_upd_action"`
|
||||
FkDelAction byte `json:"fk_del_action"`
|
||||
OldConpfeqop *List `json:"old_conpfeqop,omitempty"`
|
||||
OldPktableOid Oid `json:"old_pktable_oid"`
|
||||
SkipValidation bool `json:"skip_validation"`
|
||||
InitiallyValid bool `json:"initially_valid"`
|
||||
}
|
||||
|
||||
func (n *Constraint) Pos() int {
|
||||
return n.Location
|
||||
}
|
||||
Reference in New Issue
Block a user