File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,7 +324,7 @@ final class PluginManager {
324324 /// All database types with loaded plugins, ordered by display name.
325325 var availableDatabaseTypes : [ DatabaseType ] {
326326 var types : [ DatabaseType ] = [ ]
327- for entry in plugins {
327+ for entry in plugins where entry . isEnabled {
328328 if let typeId = entry. databaseTypeId {
329329 types. append ( DatabaseType ( rawValue: typeId) )
330330 }
Original file line number Diff line number Diff line change @@ -91,6 +91,23 @@ struct DatabaseTypeTests {
9191 #expect( DatabaseType . clickhouse. iconName == " clickhouse-icon " )
9292 }
9393
94+ // MARK: - Plugin Type ID Alias Tests
95+
96+ @Test ( " MariaDB pluginTypeId maps to MySQL plugin " )
97+ func testMariaDBPluginTypeId( ) {
98+ #expect( DatabaseType . mariadb. pluginTypeId == " MySQL " )
99+ }
100+
101+ @Test ( " Redshift pluginTypeId maps to PostgreSQL plugin " )
102+ func testRedshiftPluginTypeId( ) {
103+ #expect( DatabaseType . redshift. pluginTypeId == " PostgreSQL " )
104+ }
105+
106+ @Test ( " Unknown type pluginTypeId falls back to rawValue " )
107+ func testUnknownPluginTypeIdFallback( ) {
108+ #expect( DatabaseType ( rawValue: " FutureDB " ) . pluginTypeId == " FutureDB " )
109+ }
110+
94111 // MARK: - Struct Behavior Tests
95112
96113 @Test ( " Struct equality via rawValue " )
You can’t perform that action at this time.
0 commit comments