From b5c8b21eb67881fe2f9fc85d3a8c5400cec819e7 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 4 Nov 2016 10:04:55 +0000 Subject: [PATCH] =?UTF-8?q?Enable=20durations=20to=20be=20specified=20with?= =?UTF-8?q?out=20=E2=80=9C=E2=80=9D=20marks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/scanner.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/scanner.go b/sql/scanner.go index 8d50c0f7..c0da5390 100644 --- a/sql/scanner.go +++ b/sql/scanner.go @@ -547,6 +547,10 @@ func (s *scanner) scanNumber(chp ...rune) (tok Token, lit string, val interface{ } } + if val, err := time.ParseDuration(buf.String()); err == nil { + return DURATION, buf.String(), val + } + return tok, buf.String(), nil }