sub_link.go 495 B

1234567891011121314151617181920212223242526272829303132
  1. package pg
  2. import (
  3. "github.com/kyleconroy/sqlc/internal/sql/ast"
  4. )
  5. type SubLinkType uint
  6. const (
  7. EXISTS_SUBLINK SubLinkType = iota
  8. ALL_SUBLINK
  9. ANY_SUBLINK
  10. ROWCOMPARE_SUBLINK
  11. EXPR_SUBLINK
  12. MULTIEXPR_SUBLINK
  13. ARRAY_SUBLINK
  14. CTE_SUBLINK /* for SubPlans only */
  15. )
  16. type SubLink struct {
  17. Xpr ast.Node
  18. SubLinkType SubLinkType
  19. SubLinkId int
  20. Testexpr ast.Node
  21. OperName *ast.List
  22. Subselect ast.Node
  23. Location int
  24. }
  25. func (n *SubLink) Pos() int {
  26. return n.Location
  27. }