graflo.db.connection.config_mapping¶
get_config_class(db_type)
¶
Get the appropriate config class for a database type.
This factory function breaks the circular dependency by moving the lookup logic out of the DBType enum.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
db_type
|
DBType
|
The database type enum value |
required |
Returns:
| Type | Description |
|---|---|
Type[DBConfig]
|
The corresponding DBConfig subclass |
Raises:
| Type | Description |
|---|---|
KeyError
|
If the db_type is not in the mapping |