relational_adapter¶
Relational database adapter mixin for SQLAlchemy-based database operations.
- class mcp_ohmy_sql.adapter.relational_adapter.RelationalAdapterMixin[source]¶
Adapter mixin for relational database operations using SQLAlchemy and the db/relational module.
- get_relational_schema_info(database: Database, schema: Schema) SchemaInfo[source]¶
Retrieves the schema information for a specific database and schema.
- Parameters:
database – The database object that contains the SQLAlchemy engine and metadata.
schema – The schema object containing the name and table filters.
- Returns:
A SchemaInfo object containing the schema details.
- get_relational_database_info(database: Database) DatabaseInfo[source]¶
Retrieves the database information for a specific database.
- Parameters:
database – The database object that contains the SQLAlchemy engine and metadata.
- Returns:
A DatabaseInfo object containing the all schema details.