a
    bgG                     @  sX   d dl mZ d dlZd dlmZmZ d dlmZmZm	Z	 ej
ddZG dd deZdS )	    )annotationsN)ABCabstractmethod)ListOptionalSequencei  )intc                   @  sD  e Zd ZdZdddddZedddd	Zeddd
dZeddddZeddddZ	eddddddddddZ
eddddddddddZedddddZeddddd Zeddddd!ddd"d#d$d%d&d'Zeddddd!ddd"d#d$d%d(d)Zedddd*d+Zedddd,d-ZdS ).RecordManagerz)Abstract base class for a record manager.strNone)	namespacereturnc                 C  s
   || _ dS )zyInitialize the record manager.

        Args:
            namespace (str): The namespace for the record manager.
        N)r   )selfr    r   n/var/www/html/cobodadashboardai.evdpl.com/venv/lib/python3.9/site-packages/langchain_community/indexes/base.py__init__   s    	zRecordManager.__init__)r   c                 C  s   dS z2Create the database schema for the record manager.Nr   r   r   r   r   create_schema   s    zRecordManager.create_schemac                   s   dS r   r   r   r   r   r   acreate_schema   s    zRecordManager.acreate_schemafloatc                 C  s   dS a*  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.
        Nr   r   r   r   r   get_time    s    zRecordManager.get_timec                   s   dS r   r   r   r   r   r   	aget_time+   s    zRecordManager.aget_timeN)	group_idstime_at_leastzSequence[str]z!Optional[Sequence[Optional[str]]]zOptional[float])keysr   r   r   c                C  s   dS a  Upsert records into the database.

        Args:
            keys: A list of record keys to upsert.
            group_ids: A list of group IDs corresponding to the keys.
            time_at_least: if provided, updates should only happen if the
              updated_at field is at least this time.

        Raises:
            ValueError: If the length of keys doesn't match the length of group_ids.
        Nr   r   r   r   r   r   r   r   update6   s    zRecordManager.updatec                  s   dS r   r   r   r   r   r   aupdateJ   s    zRecordManager.aupdatez
List[bool])r   r   c                 C  s   dS zCheck if the provided keys exist in the database.

        Args:
            keys: A list of keys to check.

        Returns:
            A list of boolean values indicating the existence of each key.
        Nr   r   r   r   r   r   exists^   s    zRecordManager.existsc                   s   dS r!   r   r"   r   r   r   aexistsi   s    zRecordManager.aexists)beforeafterr   limitzOptional[Sequence[str]]zOptional[int]z	List[str])r%   r&   r   r'   r   c                C  s   dS a  List records in the database based on the provided filters.

        Args:
            before: Filter to list records updated before this time.
            after: Filter to list records updated after this time.
            group_ids: Filter to list records with specific group IDs.
            limit: optional limit on the number of records to return.

        Returns:
            A list of keys for the matching records.
        Nr   r   r%   r&   r   r'   r   r   r   	list_keyst   s    	zRecordManager.list_keysc                  s   dS r(   r   r)   r   r   r   
alist_keys   s    	zRecordManager.alist_keysc                 C  s   dS zoDelete specified records from the database.

        Args:
            keys: A list of keys to delete.
        Nr   r"   r   r   r   delete_keys   s    zRecordManager.delete_keysc                   s   dS r,   r   r"   r   r   r   adelete_keys   s    zRecordManager.adelete_keys)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r    r#   r$   r*   r+   r-   r.   r   r   r   r   r	   
   sL   



r	   )
__future__r   uuidabcr   r   typingr   r   r   UUIDZNAMESPACE_UUIDr	   r   r   r   r   <module>   s
   