allow no space between the index table name and columns list

This commit is contained in:
Gani Georgiev
2023-07-06 15:47:16 +03:00
parent a4101f7670
commit 8ef00efe84
33 changed files with 52 additions and 41 deletions
+13 -2
View File
@@ -18,9 +18,20 @@ func TestParseIndex(t *testing.T) {
`invalid`,
dbutils.Index{},
},
// simple
// simple (multiple spaces between the table and columns list)
{
`create index indexname on tablename (col1)`,
`create index indexname on tablename (col1)`,
dbutils.Index{
IndexName: "indexname",
TableName: "tablename",
Columns: []dbutils.IndexColumn{
{Name: "col1"},
},
},
},
// simple (no space between the table and the columns list)
{
`create index indexname on tablename(col1)`,
dbutils.Index{
IndexName: "indexname",
TableName: "tablename",