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
ElCarroEngine
ElCarroEngine object to connect to the ElCarro-Oracle database.
table_name
str
The name of table for saving documents.
content_column
str
The column to store document content. Default: page_content. Optional.
metadata_json_column
str
The name of the JSON column to use as the metadata’s base dictionary. Default: langchain_metadata. Optional.
Convert 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]
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Class ElCarroDocumentSaver (0.2.0)\n\n ElCarroDocumentSaver(\n elcarro_engine: langchain_google_el_carro.engine.ElCarroEngine,\n table_name: str,\n content_column: typing.Optional[str] = None,\n metadata_json_column: typing.Optional[str] = None,\n )\n\nA class for saving langchain documents into an ElCarro-Oracle database\ntable.\n\nMethods\n-------\n\n### ElCarroDocumentSaver\n\n ElCarroDocumentSaver(\n elcarro_engine: langchain_google_el_carro.engine.ElCarroEngine,\n table_name: str,\n content_column: typing.Optional[str] = None,\n metadata_json_column: typing.Optional[str] = None,\n )\n\nElCarroDocumentSaver allows for saving of langchain documents in an\nElCarro-Oracle database. If the table doesn't exist, a table with\ndefault schema will be created. The default schema:\n\n- page_content (type: text)\n- langchain_metadata (type: JSON)\n\n### _parse_row_from_doc\n\n _parse_row_from_doc(\n column_names: typing.Iterable[str],\n doc: langchain_core.documents.base.Document,\n content_column: str = \"page_content\",\n metadata_json_column: str = \"langchain_metadata\",\n json_as_string=True,\n ) -\u003e typing.Dict\n\nConvert a Document into a dictionary according to the table schema:\nStore Doc.`page_content` in result\\[`content_column`\\]\nIf a Doc metadata fields exist in the Table Schema, add them to the result \n\n If there's a JSON metadata column in the table, unpack remaining Doc metadata\n to result[metadata_json_column]\n\n### add_documents\n\n add_documents(docs: typing.List[langchain_core.documents.base.Document]) -\u003e None\n\nSave documents in the DocumentSaver table. Document's metadata is\nadded to columns if found or stored in langchain_metadata JSON column.\n\nArgs: docs (List\\[langchain_core.documents.Document\\]): a list of\ndocuments to be saved.\n\n### delete\n\n delete(docs: typing.List[langchain_core.documents.base.Document]) -\u003e None\n\nDelete all instances of a document from the DocumentSaver table by\nmatching the entire Document object."]]