constraint.go 761 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package pg
  2. import (
  3. "github.com/kyleconroy/sqlc/internal/sql/ast"
  4. )
  5. type Constraint struct {
  6. Contype ConstrType
  7. Conname *string
  8. Deferrable bool
  9. Initdeferred bool
  10. Location int
  11. IsNoInherit bool
  12. RawExpr ast.Node
  13. CookedExpr *string
  14. GeneratedWhen byte
  15. Keys *ast.List
  16. Exclusions *ast.List
  17. Options *ast.List
  18. Indexname *string
  19. Indexspace *string
  20. AccessMethod *string
  21. WhereClause ast.Node
  22. Pktable *RangeVar
  23. FkAttrs *ast.List
  24. PkAttrs *ast.List
  25. FkMatchtype byte
  26. FkUpdAction byte
  27. FkDelAction byte
  28. OldConpfeqop *ast.List
  29. OldPktableOid Oid
  30. SkipValidation bool
  31. InitiallyValid bool
  32. }
  33. func (n *Constraint) Pos() int {
  34. return n.Location
  35. }