Format formats the node.
(buf *nodeBuffer)
| 948 | |
| 949 | // Format formats the node. |
| 950 | func (ed *ExclusionDefinition) Format(buf *nodeBuffer) { |
| 951 | if !ed.ConstraintName.IsEmpty() { |
| 952 | buf.Printf("constraint %v ", ed.ConstraintName) |
| 953 | } |
| 954 | buf.Printf("exclude") |
| 955 | if !ed.IndexType.IsEmpty() { |
| 956 | buf.Printf(" using %v", ed.IndexType) |
| 957 | } |
| 958 | buf.Printf(" (") |
| 959 | for i, ex := range ed.Exclusions { |
| 960 | if i > 0 { |
| 961 | buf.Printf(", ") |
| 962 | } |
| 963 | buf.Printf("%v with %s", ex.Expression, ex.Operator) |
| 964 | } |
| 965 | buf.Printf(")") |
| 966 | if ed.Where != nil && ed.Where.Expr != nil { |
| 967 | buf.Printf(" where (%v)", ed.Where.Expr) |
| 968 | } |
| 969 | } |
| 970 | |
| 971 | // Format returns a canonical string representation of the type and all relevant options |
| 972 | func (ct *ColumnType) Format(buf *nodeBuffer) { |