removed unnecessary helper method and updated index parser regex

This commit is contained in:
Gani Georgiev
2023-03-19 22:15:18 +02:00
parent 29621303df
commit 1b45e23c81
32 changed files with 40 additions and 49 deletions
+3 -1
View File
@@ -32,7 +32,8 @@ func TestParseIndex(t *testing.T) {
// all fields
{
`CREATE UNIQUE INDEX IF NOT EXISTS "schemaname".[indexname] on 'tablename' (
col1,
col0,
` + "`" + `col1` + "`" + `,
json_extract("col2", "$.a") asc,
"col3" collate NOCASE,
"col4" collate RTRIM desc
@@ -44,6 +45,7 @@ func TestParseIndex(t *testing.T) {
IndexName: "indexname",
TableName: "tablename",
Columns: []dbutils.IndexColumn{
{Name: "col0"},
{Name: "col1"},
{Name: `json_extract("col2", "$.a")`, Sort: "ASC"},
{Name: `col3`, Collate: "NOCASE"},