
    dhG                    r    S SK Jr  S SKrS SKJrJr  S SKJrJrJ	r	  \R                  " SS9r " S S\5      rg)	    )annotationsN)ABCabstractmethod)ListOptionalSequencei  )intc                     \ rS rSrSr    SS jr\SS j5       r\SS j5       r\SS j5       r	\SS j5       r
\SSS	.       SS
 jj5       r\SSS	.       SS jj5       r\SS j5       r\SS j5       r\SSSSS.         SS jj5       r\SSSSS.         SS jj5       r\SS j5       r\SS j5       rSrg)RecordManager
   z)Abstract base class for a record manager.c                    Xl         g)zaInitialize the record manager.

Args:
    namespace (str): The namespace for the record manager.
N	namespace)selfr   s     X/var/www/html/shao/venv/lib/python3.13/site-packages/langchain_community/indexes/base.py__init__RecordManager.__init__   s	     #    c                    gz2Create the database schema for the record manager.N r   s    r   create_schemaRecordManager.create_schema       r   c                   #    g7fr   r   r   s    r   acreate_schemaRecordManager.acreate_schema           c                    g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   s    r   get_timeRecordManager.get_time    r   r   c                   #    g7fr"   r   r   s    r   	aget_timeRecordManager.aget_time+   r   r    N)	group_idstime_at_leastc                   gaX  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   keysr(   r)   s       r   updateRecordManager.update6   r   r   c                  #    g7fr+   r   r,   s       r   aupdateRecordManager.aupdateJ   r   r    c                    g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-   s     r   existsRecordManager.exists^   r   r   c                   #    g7fr4   r   r5   s     r   aexistsRecordManager.aexistsi   r   r    )beforeafterr(   limitc                   gao  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=   s        r   	list_keysRecordManager.list_keyst   r   r   c                  #    g7fr?   r   r@   s        r   
alist_keysRecordManager.alist_keys   r   r    c                    gzWDelete specified records from the database.

Args:
    keys: A list of keys to delete.
Nr   r5   s     r   delete_keysRecordManager.delete_keys   r   r   c                   #    g7frG   r   r5   s     r   adelete_keysRecordManager.adelete_keys   r   r    r   )r   strreturnNone)rN   rO   )rN   float)r-   Sequence[str]r(   z!Optional[Sequence[Optional[str]]]r)   Optional[float]rN   rO   )r-   rQ   rN   z
List[bool])
r;   rR   r<   rR   r(   zOptional[Sequence[str]]r=   zOptional[int]rN   z	List[str])r-   rQ   rN   rO   )__name__
__module____qualname____firstlineno____doc__r   r   r   r   r#   r&   r.   r1   r6   r9   rA   rD   rH   rK   __static_attributes__r   r   r   r   r   
   s   3	#	# 
	# A A A A     
 8<)- 5	
 ' 
 & 
 8<)- 5	
 ' 
 &      #'!%-1#   	
 +  
 (  #'!%-1#   	
 +  
 (    r   r   )
__future__r   uuidabcr   r   typingr   r   r   UUIDNAMESPACE_UUIDr   r   r   r   <module>r_      s0    "  # + +t$bC br   