extract_pgvector_collection#

langchain_postgres.utils.pgvector_migrator.extract_pgvector_collection(
engine: PGEngine,
collection_name: str,
batch_size: int = 1000,
) Iterator[Sequence[RowMapping]][source]#

Extract all data belonging to a PGVector collection.

Parameters:
  • engine (PGEngine) – The PG engine corresponding to the Database.

  • collection_name (str) – The name of the collection to get the data for.

  • batch_size (int) – The batch size for collection extraction. Default: 1000. Optional.

Yields:

The data present in the collection.

Return type:

Iterator[Sequence[RowMapping]]