From 45b06dfd9b6eb05b669d39d1e194d5f67a2e99d9 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Thu, 10 Nov 2016 12:35:39 +0000 Subject: [PATCH] Remove unused SQL tokens --- sql/token.go | 8 -------- sql/type.go | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/sql/token.go b/sql/token.go index d2516d09..f322245b 100644 --- a/sql/token.go +++ b/sql/token.go @@ -113,7 +113,6 @@ const ( CONTAINSSOME CONTENT CREATE - CUSTOM DATABASE DEFAULT DEFINE @@ -129,13 +128,11 @@ const ( FOR FROM GROUP - HISTORY ID IF IN INDEX INFO - INTO IS LET LIMIT @@ -146,7 +143,6 @@ const ( MERGE MIN MISSING - MULTI NAMESPACE NONE NONECONTAINEDIN @@ -277,7 +273,6 @@ var tokens = [...]string{ CONTAINSSOME: "CONTAINSSOME", CONTENT: "CONTENT", CREATE: "CREATE", - CUSTOM: "CUSTOM", DATABASE: "DATABASE", DEFAULT: "DEFAULT", DEFINE: "DEFINE", @@ -293,13 +288,11 @@ var tokens = [...]string{ FOR: "FOR", FROM: "FROM", GROUP: "GROUP", - HISTORY: "HISTORY", ID: "ID", IF: "IF", IN: "IN", INDEX: "INDEX", INFO: "INFO", - INTO: "INTO", IS: "IS", LET: "LET", LIMIT: "LIMIT", @@ -310,7 +303,6 @@ var tokens = [...]string{ MERGE: "MERGE", MIN: "MIN", MISSING: "MISSING", - MULTI: "MULTI", NAMESPACE: "NAMESPACE", NONE: "NONE", NONECONTAINEDIN: "NONECONTAINEDIN", diff --git a/sql/type.go b/sql/type.go index 7b84a7e1..568ba48d 100644 --- a/sql/type.go +++ b/sql/type.go @@ -18,7 +18,7 @@ func (p *parser) parseType() (exp string, err error) { allowed := []string{"any", "url", "uuid", "color", "email", "phone", "array", "object", "domain", "record", "string", "number", "double", "custom", "boolean", "datetime", "latitude", "longitude"} - _, lit, err := p.shouldBe(IDENT, CUSTOM) + _, lit, err := p.shouldBe(IDENT) if err != nil { return string(""), &ParseError{Found: lit, Expected: allowed} }