ElCarroDocumentSaver(
    elcarro_engine: langchain_google_el_carro.engine.ElCarroEngine,
    table_name: str,
    content_column: typing.Optional[str] = None,
    metadata_json_column: typing.Optional[str] = None,
)A class for saving langchain documents into an ElCarro-Oracle database table.
Methods
ElCarroDocumentSaver
ElCarroDocumentSaver(
    elcarro_engine: langchain_google_el_carro.engine.ElCarroEngine,
    table_name: str,
    content_column: typing.Optional[str] = None,
    metadata_json_column: typing.Optional[str] = None,
)ElCarroDocumentSaver allows for saving of langchain documents in an ElCarro-Oracle database. If the table doesn't exist, a table with default schema will be created. The default schema:
- page_content (type: text)
- langchain_metadata (type: JSON)
| Parameters | |
|---|---|
| Name | Description | 
| elcarro_engine | ElCarroEngineElCarroEngine object to connect to the ElCarro-Oracle database. | 
| table_name | strThe name of table for saving documents. | 
| content_column | strThe column to store document content. Default:  | 
| metadata_json_column | strThe name of the JSON column to use as the metadata’s base dictionary. Default:  | 
_parse_row_from_doc
_parse_row_from_doc(
    column_names: typing.Iterable[str],
    doc: langchain_core.documents.base.Document,
    content_column: str = "page_content",
    metadata_json_column: str = "langchain_metadata",
    json_as_string=True,
) -> typing.DictConvert a Document into a dictionary according to the table schema:
    Store Doc.page_content in result[content_column]
    If a Doc metadata fields exist in the Table Schema, add them to the result
If there's a JSON metadata column in the table, unpack remaining Doc metadata
    to result[metadata_json_column]
add_documents
add_documents(docs: typing.List[langchain_core.documents.base.Document]) -> NoneSave documents in the DocumentSaver table. Document’s metadata is added to columns if found or stored in langchain_metadata JSON column.
Args: docs (List[langchain_core.documents.Document]): a list of documents to be saved.
delete
delete(docs: typing.List[langchain_core.documents.base.Document]) -> NoneDelete all instances of a document from the DocumentSaver table by matching the entire Document object.
| Parameter | |
|---|---|
| Name | Description | 
| docs | List[langchain_core.documents.Document]a list of documents |