(n *pg.Constraint)
| 894 | } |
| 895 | |
| 896 | func convertConstraint(n *pg.Constraint) *ast.Constraint { |
| 897 | if n == nil { |
| 898 | return nil |
| 899 | } |
| 900 | return &ast.Constraint{ |
| 901 | Contype: ast.ConstrType(n.Contype), |
| 902 | Conname: makeString(n.Conname), |
| 903 | Deferrable: n.Deferrable, |
| 904 | Initdeferred: n.Initdeferred, |
| 905 | Location: int(n.Location), |
| 906 | IsNoInherit: n.IsNoInherit, |
| 907 | RawExpr: convertNode(n.RawExpr), |
| 908 | CookedExpr: makeString(n.CookedExpr), |
| 909 | GeneratedWhen: makeByte(n.GeneratedWhen), |
| 910 | Keys: convertSlice(n.Keys), |
| 911 | Exclusions: convertSlice(n.Exclusions), |
| 912 | Options: convertSlice(n.Options), |
| 913 | Indexname: makeString(n.Indexname), |
| 914 | Indexspace: makeString(n.Indexspace), |
| 915 | AccessMethod: makeString(n.AccessMethod), |
| 916 | WhereClause: convertNode(n.WhereClause), |
| 917 | Pktable: convertRangeVar(n.Pktable), |
| 918 | FkAttrs: convertSlice(n.FkAttrs), |
| 919 | PkAttrs: convertSlice(n.PkAttrs), |
| 920 | FkMatchtype: makeByte(n.FkMatchtype), |
| 921 | FkUpdAction: makeByte(n.FkUpdAction), |
| 922 | FkDelAction: makeByte(n.FkDelAction), |
| 923 | OldConpfeqop: convertSlice(n.OldConpfeqop), |
| 924 | OldPktableOid: ast.Oid(n.OldPktableOid), |
| 925 | SkipValidation: n.SkipValidation, |
| 926 | InitiallyValid: n.InitiallyValid, |
| 927 | } |
| 928 | } |
| 929 | |
| 930 | func convertConstraintsSetStmt(n *pg.ConstraintsSetStmt) *ast.ConstraintsSetStmt { |
| 931 | if n == nil { |
no test coverage detected