U
    h
                     @  s   d dl mZ d dlmZmZ d dlmZ er|ddlmZm	Z	m
Z
mZmZ ddlmZ ddlmZmZ ddlmZ dd	lmZ G d
d dZG dd deZdS )    )annotations)JSONDecoderJSONEncoder)TYPE_CHECKING   )BFBloomCFBloomCMSBloomTDigestBloom	TOPKBloomJSON)AsyncSearchSearch
TimeSeries	VectorSetc                   @  s   e Zd ZdZe e fddddZd dddd	Zd
dddZddddZ	ddddZ
ddddZddddZddddZddddZdS )!RedisModuleCommandszoThis class contains the wrapper functions to bring supported redis
    modules into the command namespace.
    r   returnc                 C  s   ddl m} || ||d}|S )z<Access the json namespace, providing support for redis json.r   r   )clientencoderdecoder)jsonr   )selfr   r   r   Zjj r   ?/tmp/pip-unpacked-wheel-4avdqdik/redis/commands/redismodules.pyr      s    zRedisModuleCommands.jsonidxr   c                 C  s   ddl m} || |d}|S )@Access the search namespace, providing support for redis search.r   )r   r   
index_name)searchr   )r   r!   r   sr   r   r   ft   s    zRedisModuleCommands.ftr   c                 C  s   ddl m} || d}|S )z^Access the timeseries namespace, providing support for
        redis timeseries data.
        r   r   r   )
timeseriesr   )r   r   r#   r   r   r   ts#   s    
zRedisModuleCommands.tsr   c                 C  s   ddl m} || d}|S )Access the bloom namespace.r   )r   r%   )bfr   )r   r   r)   r   r   r   r)   -   s    
zRedisModuleCommands.bfr   c                 C  s   ddl m} || d}|S )r(   r   )r   r%   )r)   r   )r   r   cfr   r   r   r*   5   s    
zRedisModuleCommands.cfr	   c                 C  s   ddl m} || d}|S )r(   r   )r	   r%   )r)   r	   )r   r	   cmsr   r   r   r+   =   s    
zRedisModuleCommands.cmsr   c                 C  s   ddl m} || d}|S )r(   r   )r   r%   )r)   r   )r   r   topkr   r   r   r,   E   s    
zRedisModuleCommands.topkr
   c                 C  s   ddl m} || d}|S )r(   r   )r
   r%   )r)   r
   )r   r
   tdigestr   r   r   r-   M   s    
zRedisModuleCommands.tdigestr   c                 C  s   ddl m} || d}|S )z(Access the VectorSet commands namespace.r   r   r%   )	vectorsetr   )r   r   vsetr   r   r   r/   U   s    
zRedisModuleCommands.vsetN)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ddZdS )AsyncRedisModuleCommandsr   r   r   c                 C  s   ddl m} || |d}|S )r   r   )r   r    )r"   r   )r   r!   r   r#   r   r   r   r$   _   s    zAsyncRedisModuleCommands.ftN)r   )r0   r1   r2   r$   r   r   r   r   r4   ^   s   r4   N)
__future__r   r   r   r   typingr   r)   r   r   r	   r
   r   r   r"   r   r   r&   r   r.   r   r   r4   r   r   r   r   <module>   s   P