Database
Driver
Bases: str
, Enum
Enum representing database drivers.
Attributes:
Name | Type | Description |
---|---|---|
MYSQL |
str
|
MySQL driver. |
POSTGRES |
str
|
PostgreSQL driver. |
SQLITE |
str
|
SQLite driver. |
MARIADB |
str
|
MariaDB driver. |
CUSTOM |
str
|
Custom driver. |
DatabaseAdapter
Dialect
Bases: Protocol
Protocol representing a database dialect.
Attributes:
Name | Type | Description |
---|---|---|
default_port |
int
|
The default port for the database dialect. |
driver |
Driver
|
The driver associated with the dialect. |
dialect_name |
str
|
The name of the database dialect. |
async_driver |
str
|
The asynchronous driver name. |
sync_driver |
str
|
The synchronous driver name. |
only_host |
bool
|
Indicates if the dialect supports only host connections. |
DialectInfo
Represents information about a database dialect.
Attributes:
Name | Type | Description |
---|---|---|
default_port |
int
|
The default port for the database dialect. |
driver |
Driver
|
The driver associated with the dialect. |
dialect_name |
str
|
The name of the database dialect. |
async_driver |
str
|
The asynchronous driver name. |
sync_driver |
str
|
The synchronous driver name. |
only_host |
bool
|
Indicates if the dialect supports only host connections. |
resolve_driver(driver)
Resolve a driver to its associated DialectInfo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
driver |
Driver
|
The database driver. |
required |
Returns:
Name | Type | Description |
---|---|---|
Dialect |
Dialect
|
The DialectInfo associated with the provided driver. |