@@ -13,12 +13,12 @@ import (
13
13
14
14
var (
15
15
sqliteSeparator = "`|\" |'|\t "
16
- indexRegexp = regexp .MustCompile (fmt .Sprintf (" (?is)CREATE(?: UNIQUE)? INDEX [%v]?[\\ w \\ d-]+[%v]? ON (.*)$" , sqliteSeparator , sqliteSeparator ))
17
- tableRegexp = regexp .MustCompile (fmt .Sprintf (" (?is)(CREATE TABLE [%v]?[\\ w \\ d-]+[%v]?)(?:\\ s*\\ ((.*)\\ ))?" , sqliteSeparator , sqliteSeparator ))
16
+ indexRegexp = regexp .MustCompile (fmt .Sprintf (` (?is)CREATE(?: UNIQUE)? INDEX [%v]?[\w\ d-]+[%v]? ON (.*)$` , sqliteSeparator , sqliteSeparator ))
17
+ tableRegexp = regexp .MustCompile (fmt .Sprintf (` (?is)(CREATE TABLE [%v]?[\w\ d-]+[%v]?)(?:\s*\((.*)\))?` , sqliteSeparator , sqliteSeparator ))
18
18
separatorRegexp = regexp .MustCompile (fmt .Sprintf ("[%v]" , sqliteSeparator ))
19
- columnsRegexp = regexp .MustCompile (fmt .Sprintf (" [(,][%v]?(\\ w+)[%v]?" , sqliteSeparator , sqliteSeparator ))
20
- columnRegexp = regexp .MustCompile (fmt .Sprintf (" ^[%v]?([\\ w \\ d]+)[%v]?\\ s+([\\ w \\ ( \\ ) \\ d]+)(.*)$" , sqliteSeparator , sqliteSeparator ))
21
- defaultValueRegexp = regexp .MustCompile (" (?i) DEFAULT \\ (?(.+)?\\ )?( |COLLATE|GENERATED|$)" )
19
+ columnsRegexp = regexp .MustCompile (fmt .Sprintf (` [(,][%v]?(\w+)[%v]?` , sqliteSeparator , sqliteSeparator ))
20
+ columnRegexp = regexp .MustCompile (fmt .Sprintf (` ^[%v]?([\w\ d]+)[%v]?\s+([\w\(\)\ d]+)(.*)$` , sqliteSeparator , sqliteSeparator ))
21
+ defaultValueRegexp = regexp .MustCompile (` (?i) DEFAULT \(?(.+)?\)?( |COLLATE|GENERATED|$)` )
22
22
regRealDataType = regexp .MustCompile (`[^\d](\d+)[^\d]?` )
23
23
)
24
24
0 commit comments