(n *pg.Query)
| 2137 | } |
| 2138 | |
| 2139 | func convertQuery(n *pg.Query) *ast.Query { |
| 2140 | if n == nil { |
| 2141 | return nil |
| 2142 | } |
| 2143 | return &ast.Query{ |
| 2144 | CommandType: ast.CmdType(n.CommandType), |
| 2145 | QuerySource: ast.QuerySource(n.QuerySource), |
| 2146 | CanSetTag: n.CanSetTag, |
| 2147 | UtilityStmt: convertNode(n.UtilityStmt), |
| 2148 | ResultRelation: int(n.ResultRelation), |
| 2149 | HasAggs: n.HasAggs, |
| 2150 | HasWindowFuncs: n.HasWindowFuncs, |
| 2151 | HasTargetSrfs: n.HasTargetSrfs, |
| 2152 | HasSubLinks: n.HasSubLinks, |
| 2153 | HasDistinctOn: n.HasDistinctOn, |
| 2154 | HasRecursive: n.HasRecursive, |
| 2155 | HasModifyingCte: n.HasModifyingCte, |
| 2156 | HasForUpdate: n.HasForUpdate, |
| 2157 | HasRowSecurity: n.HasRowSecurity, |
| 2158 | CteList: convertSlice(n.CteList), |
| 2159 | Rtable: convertSlice(n.Rtable), |
| 2160 | Jointree: convertFromExpr(n.Jointree), |
| 2161 | TargetList: convertSlice(n.TargetList), |
| 2162 | Override: ast.OverridingKind(n.Override), |
| 2163 | OnConflict: convertOnConflictExpr(n.OnConflict), |
| 2164 | ReturningList: convertSlice(n.ReturningList), |
| 2165 | GroupClause: convertSlice(n.GroupClause), |
| 2166 | GroupingSets: convertSlice(n.GroupingSets), |
| 2167 | HavingQual: convertNode(n.HavingQual), |
| 2168 | WindowClause: convertSlice(n.WindowClause), |
| 2169 | DistinctClause: convertSlice(n.DistinctClause), |
| 2170 | SortClause: convertSlice(n.SortClause), |
| 2171 | LimitOffset: convertNode(n.LimitOffset), |
| 2172 | LimitCount: convertNode(n.LimitCount), |
| 2173 | RowMarks: convertSlice(n.RowMarks), |
| 2174 | SetOperations: convertNode(n.SetOperations), |
| 2175 | ConstraintDeps: convertSlice(n.ConstraintDeps), |
| 2176 | WithCheckOptions: convertSlice(n.WithCheckOptions), |
| 2177 | StmtLocation: int(n.StmtLocation), |
| 2178 | StmtLen: int(n.StmtLen), |
| 2179 | } |
| 2180 | } |
| 2181 | |
| 2182 | func convertRangeFunction(n *pg.RangeFunction) *ast.RangeFunction { |
| 2183 | if n == nil { |
no test coverage detected