Skip to content

Commit

Permalink
allow number in identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwalguptaofficial committed Jul 27, 2020
1 parent 63a59b7 commit 40eb74c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/grammar/common.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ColumnValue= "'" val:Word "'" {
return val;
}

Identifier "identifier"= val:[a-zA-Z_]+ {
Identifier "identifier"= val:[a-zA-Z0-9_]+ {
return val.join("");
}

Expand Down
6 changes: 5 additions & 1 deletion test/cases/create/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ function getDbSchema() {
)
`

var tblQueryTest1 = `Define table Test1(
SupplierID primaryKey autoIncrement,
image1 notNull string
)`
return query + tblQueryCustomer + tblQueryCategories + tblQueryEmployees +
tblQueryOrderDetails + tblQueryOrders + tblQueryProducts + tblQueryShippers +
tblQuerySuppliers
tblQuerySuppliers + tblQueryTest1
}

0 comments on commit 40eb74c

Please sign in to comment.