fix bug in sqlite db name parsing (#1096)

This commit is contained in:
BetaCat 2018-09-12 09:44:34 +08:00 committed by Lunny Xiao
parent 270035c70f
commit 45f019c574
1 changed files with 5 additions and 1 deletions

View File

@ -233,7 +233,7 @@ func (db *sqlite3) TableCheckSql(tableName string) (string, []interface{}) {
}
func (db *sqlite3) DropIndexSql(tableName string, index *core.Index) string {
//var unique string
// var unique string
quote := db.Quote
idxName := index.Name
@ -452,5 +452,9 @@ type sqlite3Driver struct {
}
func (p *sqlite3Driver) Parse(driverName, dataSourceName string) (*core.Uri, error) {
if strings.Contains(dataSourceName, "?") {
dataSourceName = dataSourceName[:strings.Index(dataSourceName, "?")]
}
return &core.Uri{DbType: core.SQLITE, DbName: dataSourceName}, nil
}