Remove unused and backup SQL keywords

This commit is contained in:
Tobie Morgan Hitchcock 2016-10-30 14:05:29 +00:00
parent 151d73b954
commit feea12f93d
2 changed files with 4 additions and 8 deletions

View file

@ -115,7 +115,7 @@ func (p *parser) parseMulti() (*Query, error) {
// parseSingle parses a single SQL SELECT statement.
func (p *parser) parseSingle() (Statement, error) {
tok, _, err := p.shouldBe(USE, INFO, LET, BEGIN, CANCEL, COMMIT, ROLLBACK, RETURN, SELECT, CREATE, UPDATE, INSERT, UPSERT, DELETE, RELATE, DEFINE, REMOVE)
tok, _, err := p.shouldBe(USE, LET, INFO, BEGIN, CANCEL, COMMIT, RETURN, SELECT, CREATE, UPDATE, DELETE, RELATE, DEFINE, REMOVE)
switch tok {
@ -130,7 +130,7 @@ func (p *parser) parseSingle() (Statement, error) {
case BEGIN:
return p.parseBeginStatement()
case CANCEL, ROLLBACK:
case CANCEL:
return p.parseCancelStatement()
case COMMIT:
return p.parseCommitStatement()
@ -139,9 +139,9 @@ func (p *parser) parseSingle() (Statement, error) {
case SELECT:
return p.parseSelectStatement()
case CREATE, INSERT:
case CREATE:
return p.parseCreateStatement()
case UPDATE, UPSERT:
case UPDATE:
return p.parseUpdateStatement()
case DELETE:
return p.parseDeleteStatement()

View file

@ -136,7 +136,6 @@ const (
IN
INDEX
INFO
INSERT
INTO
IS
LET
@ -166,7 +165,6 @@ const (
RELATE
REMOVE
RETURN
ROLLBACK
RULES
SCHEMAFULL
SCHEMALESS
@ -303,7 +301,6 @@ var tokens = [...]string{
IN: "IN",
INDEX: "INDEX",
INFO: "INFO",
INSERT: "INSERT",
INTO: "INTO",
IS: "IS",
LET: "LET",
@ -332,7 +329,6 @@ var tokens = [...]string{
RELATE: "RELATE",
REMOVE: "REMOVE",
RETURN: "RETURN",
ROLLBACK: "ROLLBACK",
RULES: "RULES",
SCHEMAFULL: "SCHEMAFULL",
SCHEMALESS: "SCHEMALESS",