Files
upstream-sqlc/internal/sql/ast/constraint.go
upstream-mirror 0f4df23290
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
snapshot of https://github.com/sqlc-dev/sqlc.git (main, 2026-09-16; blobs > 131072B omitted)
2026-09-16 02:17:34 +05:00

37 lines
1.5 KiB
Go

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
}