def build_database_chunks()

in src/databao_context_engine/plugins/databases/database_chunker.py [0:0]


def build_database_chunks(result: DatabaseIntrospectionResult) -> list[EmbeddableChunk]:
    chunks = []
    for catalog in result.catalogs:
        for schema in catalog.schemas:
            for table in schema.tables:
                chunks.append(_create_table_chunk(catalog.name, schema.name, table))

                for column in table.columns:
                    chunks.append(_create_column_chunk(catalog.name, schema.name, table.name, column))

    return chunks