(n *nodes.ColumnDef)
| 12 | } |
| 13 | |
| 14 | func isNotNull(n *nodes.ColumnDef) bool { |
| 15 | if n.IsNotNull { |
| 16 | return true |
| 17 | } |
| 18 | for _, c := range n.Constraints { |
| 19 | switch inner := c.Node.(type) { |
| 20 | case *nodes.Node_Constraint: |
| 21 | if inner.Constraint.Contype == nodes.ConstrType_CONSTR_NOTNULL { |
| 22 | return true |
| 23 | } |
| 24 | if inner.Constraint.Contype == nodes.ConstrType_CONSTR_PRIMARY { |
| 25 | return true |
| 26 | } |
| 27 | } |
| 28 | } |
| 29 | return false |
| 30 | } |
| 31 | |
| 32 | func IsNamedParamFunc(node *nodes.Node) bool { |
| 33 | fun, ok := node.Node.(*nodes.Node_FuncCall) |