THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class MySQL(BaseEntity): (source)
Data class to represent the MySQL database configuration.
| Method | __post |
Validate connection settings and normalize MySQL options. |
| Method | __validate |
Validate and normalize the MySQL charset. |
| Method | __validate |
Validate and normalize the MySQL collation. |
| Method | __validate |
Validate and normalize the MySQL storage engine. |
| Instance Variable | charset |
The charset used for the connection. |
| Instance Variable | collation |
The collation for the database. |
| Instance Variable | database |
The name of the MySQL database. |
| Instance Variable | driver |
The database driver being used, e.g., 'mysql'. |
| Instance Variable | engine |
The storage engine for the MySQL database (optional). |
| Instance Variable | host |
The host address for the MySQL server. |
| Instance Variable | password |
The password for the MySQL database. |
| Instance Variable | port |
The port for connecting to the MySQL server. |
| Instance Variable | prefix |
Prefix for table names. |
| Instance Variable | prefix |
Whether to prefix index names. |
| Instance Variable | strict |
Whether to enforce strict SQL mode. |
| Instance Variable | unix |
The path to the Unix socket for MySQL connections (optional). |
| Instance Variable | username |
The username for connecting to the MySQL database. |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | get |
Describe field names, normalized types, defaults, and metadata. |
| Method | to |
Convert the dataclass instance to a recursively copied dictionary. |
| Class Variable | __slots__ |
Undocumented |
Validate connection settings and normalize MySQL options.
| Parameters | |
self:MySQL | Instance of the MySQL configuration entity. |
| Returns | |
None | This method validates the entity in place and returns no value. |
| Raises | |
TypeError | If a setting has an invalid type. |
ValueError | If a setting has an invalid value. |
Validate and normalize the MySQL charset.
Accept a non-empty string or a MySQLCharset member and store the corresponding canonical enum value.
| Parameters | |
self:MySQL | Instance of the MySQL configuration entity. |
| Returns | |
None | This method does not return a value. |
| Raises | |
TypeError | If charset is not a string or MySQLCharset enum. |
ValueError | If charset is not a valid MySQLCharset option. |
Validate and normalize the MySQL collation.
Accept a non-empty string or a MySQLCollation member and store the corresponding canonical enum value.
| Parameters | |
self:MySQL | Instance of the MySQL configuration entity. |
| Returns | |
None | This method does not return a value. |
| Raises | |
TypeError | If collation is not a string or MySQLCollation enum. |
ValueError | If collation is not a valid MySQLCollation option. |
Validate and normalize the MySQL storage engine.
Accept a string or MySQLEngine member and store the corresponding canonical enum value when an engine is configured.
| Parameters | |
self:MySQL | Instance of the MySQL configuration entity. |
| Returns | |
None | This method does not return a value. |
| Raises | |
TypeError | If engine is not a string or MySQLEngine enum. |
ValueError | If engine is not a valid MySQLEngine option. |