From cd7922db15712ef4372c06f59937859e789b7974 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 14 Feb 2017 20:25:31 +0000 Subject: [PATCH] Enable query params for LIMIT and START in queries --- sql/select.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/select.go b/sql/select.go index 5caac283..bf1939b3 100644 --- a/sql/select.go +++ b/sql/select.go @@ -258,7 +258,7 @@ func (p *parser) parseLimit() (Expr, error) { _, _, _ = p.mightBe(BY) - tok, lit, err := p.shouldBe(NUMBER) + tok, lit, err := p.shouldBe(NUMBER, PARAM) if err != nil { return nil, &ParseError{Found: lit, Expected: []string{"limit number"}} } @@ -283,7 +283,7 @@ func (p *parser) parseStart() (Expr, error) { _, _, _ = p.mightBe(AT) - tok, lit, err := p.shouldBe(NUMBER) + tok, lit, err := p.shouldBe(NUMBER, PARAM) if err != nil { return nil, &ParseError{Found: lit, Expected: []string{"start number"}} }