(f *FetchClause)
| 1364 | } |
| 1365 | |
| 1366 | func fetchSQL(f *FetchClause) string { |
| 1367 | sb := getBuilder() |
| 1368 | defer putBuilder(sb) |
| 1369 | if f.OffsetValue != nil { |
| 1370 | fmt.Fprintf(sb, " OFFSET %d ROWS", *f.OffsetValue) |
| 1371 | } |
| 1372 | fmt.Fprintf(sb, " FETCH %s", f.FetchType) |
| 1373 | if f.FetchValue != nil { |
| 1374 | fmt.Fprintf(sb, " %d", *f.FetchValue) |
| 1375 | } |
| 1376 | if f.IsPercent { |
| 1377 | sb.WriteString(" PERCENT") |
| 1378 | } |
| 1379 | sb.WriteString(" ROWS") |
| 1380 | if f.WithTies { |
| 1381 | sb.WriteString(" WITH TIES") |
| 1382 | } else { |
| 1383 | sb.WriteString(" ONLY") |
| 1384 | } |
| 1385 | return sb.String() |
| 1386 | } |
| 1387 | |
| 1388 | func forSQL(f *ForClause) string { |
| 1389 | sb := getBuilder() |
no test coverage detected