Apache Cassandra® database wrapper.
CassandraDatabase(
self,
session: Optional[Session] = None,
exclude_tables: Optional[List[str]] = None,
include_tables: Optional[List[str]] = None,
cassio_init_kwargs: Optional[Dict[str, Any]] = None
)Execute a CQL query and return the results.
Get the Table objects for the specified keyspace.
Get data from the specified table in the specified keyspace.
Return db context that you may want in agent prompt.
Generates a markdown representation of the schema for a specific keyspace by iterating over all tables within that keyspace and calling their as_markdown method.
Generates a markdown representation of the schema for all keyspaces and tables within the CassandraDatabase instance. This method utilizes the format_keyspace_to_markdown method to create markdown sections for each keyspace, assembling them into a comprehensive schema document.
Iterates through each keyspace in the database, utilizing format_keyspace_to_markdown to generate markdown for each keyspace's schema, including details of its tables. These sections are concatenated to form a single markdown document that represents the schema of the entire database or the subset of keyspaces that have been resolved in this instance.