(w *WindowSpec)
| 1340 | } |
| 1341 | |
| 1342 | func windowSpecSQL(w *WindowSpec) string { |
| 1343 | var parts []string |
| 1344 | if w.Name != "" { |
| 1345 | parts = append(parts, w.Name) |
| 1346 | } |
| 1347 | if len(w.PartitionBy) > 0 { |
| 1348 | parts = append(parts, "PARTITION BY "+exprListSQL(w.PartitionBy)) |
| 1349 | } |
| 1350 | if len(w.OrderBy) > 0 { |
| 1351 | parts = append(parts, "ORDER BY "+orderBySQL(w.OrderBy)) |
| 1352 | } |
| 1353 | if w.FrameClause != nil { |
| 1354 | parts = append(parts, windowFrameSQL(w.FrameClause)) |
| 1355 | } |
| 1356 | return strings.Join(parts, " ") |
| 1357 | } |
| 1358 | |
| 1359 | func windowFrameSQL(f *WindowFrame) string { |
| 1360 | if f.End != nil { |
no test coverage detected