connection updates
This commit is contained in:
@@ -683,6 +683,7 @@ final class DatabaseModel: ObservableObject {
|
||||
saveActiveQuery()
|
||||
if let oldID = selectedID { NativeMySQLRunner.disconnect(profileID: oldID) }
|
||||
result = QueryResult()
|
||||
isRunning = false
|
||||
selectedID = id
|
||||
UserDefaults.standard.set(id.uuidString, forKey: "DBSyn.selectedConnectionID")
|
||||
selectedDatabase = profile.database
|
||||
@@ -887,7 +888,7 @@ final class DatabaseModel: ObservableObject {
|
||||
introspect(database: usedSchema)
|
||||
}
|
||||
}
|
||||
guard selectedID == profile.id else { isRunning = false; return }
|
||||
guard selectedID == profile.id else { return }
|
||||
if listingDatabases {
|
||||
databases = lastResult.rows.compactMap { $0.first }
|
||||
status = "Connected to \(profile.name)"
|
||||
@@ -914,7 +915,7 @@ final class DatabaseModel: ObservableObject {
|
||||
if !listingDatabases {
|
||||
queryDurationText = String(format: "%.3f s", Date().timeIntervalSince(queryStarted))
|
||||
}
|
||||
isRunning = false
|
||||
if selectedID == profile.id { isRunning = false }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user