diff --git a/sql/parser.go b/sql/parser.go index 26f0276f..84a0fbec 100644 --- a/sql/parser.go +++ b/sql/parser.go @@ -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() diff --git a/sql/token.go b/sql/token.go index 376963d9..f6d2eeb2 100644 --- a/sql/token.go +++ b/sql/token.go @@ -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",