CollectionStore#

class langchain_community.vectorstores.pgembedding.CollectionStore(**kwargs)[source]#

Collection store.

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

Attributes

cmetadata

embeddings

metadata

name

registry

uuid

Methods

__init__(**kwargs)

A simple constructor that allows initialization from kwargs.

get_by_name(session, name)

get_or_create(session, name[, cmetadata])

Get or create a collection.

__init__(**kwargs)#

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

classmethod get_by_name(session: Session, name: str) CollectionStore | None[source]#
Parameters:
  • session (Session) –

  • name (str) –

Return type:

CollectionStore | None

classmethod get_or_create(session: Session, name: str, cmetadata: dict | None = None) Tuple[CollectionStore, bool][source]#

Get or create a collection. Returns [Collection, bool] where the bool is True if the collection was created.

Parameters:
  • session (Session) –

  • name (str) –

  • cmetadata (dict | None) –

Return type:

Tuple[CollectionStore, bool]