Browse Source

fix bug in sqlite db name parsing

xormplus 7 năm trước cách đây
mục cha
commit
daa49c437c
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      dialect_sqlite3.go

+ 4 - 0
dialect_sqlite3.go

@@ -457,5 +457,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
 }