U
    cc                     @   s2   d dl mZmZ G dd dZG dd deZdS )    )JSONDecoderJSONEncoderc                   @   sf   e Zd ZdZe e fddZdddZdd Zd	d
 Z	dd Z
dd Zdd Zdd ZdddZdS )RedisModuleCommandszoThis class contains the wrapper functions to bring supported redis
    modules into the command namespace.
    c                 C   s   ddl m} || ||d}|S )z<Access the json namespace, providing support for redis json.   )JSON)clientencoderdecoder)jsonr   )selfr   r	   r   Zjj r   U/var/www/html/project/venv/lib/python3.8/site-packages/redis/commands/redismodules.pyr
   	   s    zRedisModuleCommands.jsonidxc                 C   s   ddl m} || |d}|S )@Access the search namespace, providing support for redis search.r   )Searchr   
index_name)searchr   )r   r   r   sr   r   r   ft   s    zRedisModuleCommands.ftc                 C   s   ddl m} || d}|S )^Access the timeseries namespace, providing support for
        redis timeseries data.
        r   )
TimeSeriesr   )Z
timeseriesr   )r   r   r   r   r   r   ts   s    
zRedisModuleCommands.tsc                 C   s   ddl m} || d}|S )Access the bloom namespace.r   )BFBloomr   )bfr   )r   r   r   r   r   r   r   #   s    
zRedisModuleCommands.bfc                 C   s   ddl m} || d}|S )r   r   )CFBloomr   )r   r   )r   r   cfr   r   r   r   +   s    
zRedisModuleCommands.cfc                 C   s   ddl m} || d}|S )r   r   )CMSBloomr   )r   r   )r   r   cmsr   r   r   r    3   s    
zRedisModuleCommands.cmsc                 C   s   ddl m} || d}|S )r   r   )	TOPKBloomr   )r   r!   )r   r!   topkr   r   r   r"   ;   s    
zRedisModuleCommands.topkc                 C   s   ddl m} || d}|S )r   r   )TDigestBloomr   )r   r#   )r   r#   tdigestr   r   r   r$   C   s    
zRedisModuleCommands.tdigestc                 C   s   ddl m} || |d}|S )r   r   )Graph)r   name)graphr%   )r   r   r%   gr   r   r   r'   K   s    zRedisModuleCommands.graphN)r   )r   )__name__
__module____qualname____doc__r   r   r
   r   r   r   r   r    r"   r$   r'   r   r   r   r   r      s   

r   c                   @   s   e Zd ZdddZdS )AsyncRedisModuleCommandsr   c                 C   s   ddl m} || |d}|S )r   r   )AsyncSearchr   )r   r.   )r   r   r.   r   r   r   r   r   W   s    zAsyncRedisModuleCommands.ftN)r   )r)   r*   r+   r   r   r   r   r   r-   V   s   r-   N)r
   r   r   r   r-   r   r   r   r   <module>   s   R