(ctx Context, sel *qcode.Select)
| 53 | } |
| 54 | |
| 55 | func (d *SQLiteDialect) RenderLimit(ctx Context, sel *qcode.Select) { |
| 56 | if sel.Paging.NoLimit { |
| 57 | return |
| 58 | } |
| 59 | |
| 60 | ctx.WriteString(` LIMIT `) |
| 61 | if sel.Paging.LimitVar != "" { |
| 62 | ctx.AddParam(Param{Name: sel.Paging.LimitVar, Type: "integer"}) |
| 63 | } else { |
| 64 | ctx.Write(fmt.Sprintf("%d", sel.Paging.Limit)) |
| 65 | } |
| 66 | |
| 67 | if sel.Paging.OffsetVar != "" { |
| 68 | ctx.WriteString(` OFFSET `) |
| 69 | ctx.AddParam(Param{Name: sel.Paging.OffsetVar, Type: "integer"}) |
| 70 | } else if sel.Paging.Offset != 0 { |
| 71 | ctx.WriteString(` OFFSET `) |
| 72 | ctx.Write(fmt.Sprintf("%d", sel.Paging.Offset)) |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | func (d *SQLiteDialect) RenderJSONRoot(ctx Context, sel *qcode.Select) { |
| 77 | ctx.WriteString(`SELECT json_object(`) |
nothing calls this directly
no test coverage detected