langchain.indexes.base.RecordManager¶
class langchain.indexes.base.RecordManager(namespace: str)[source]¶
An abstract base class representing the interface for a record manager.
Initialize the record manager.
Parameters
namespace (str) – The namespace for the record manager.
Methods
__init__(namespace)
Initialize the record manager.
create_schema()
Create the database schema for the record manager.
delete_keys(keys)
Delete specified records from the database.
exists(keys)
Check if the provided keys exist in the database.
get_time()
Get the current server time as a high resolution timestamp!
list_keys(*[, before, after, group_ids, limit])
List records in the database based on the provided filters.
update(keys, *[, group_ids, time_at_least])
Upsert records into the database.
__init__(namespace: str) → None[source]¶
Initialize the record manager.
Parameters
namespace (str) – The namespace for the record manager.
abstract create_schema() → None[source]¶
Create the database schema for the record manager.
abstract delete_keys(keys: Sequence[str]) → None[source]¶
Delete specified records from the database.
Parameters
keys – A list of keys to delete.
abstract exists(keys: Sequence[str]) → List[bool][source]¶
Check if the provided keys exist in the database.
Parameters
keys – A list of keys to check.
Returns
A list of boolean values indicating the existence of each key.
abstract get_time() → float[source]¶
Get the current server time as a high resolution timestamp!
It’s important to get this from the server to ensure a monotonic clock,
otherwise there may be data loss when cleaning up old documents!
Returns
The current server time as a float timestamp.