+
     h(  c                   s    ^ RI Ht ^ RIHt ^RIHt ^RIHt ^RIH	t	H
t
 RtRtRtR	tR
tRtRtRt ! R R4      t ! R R]4      tR# )i    )	DataError)ResponseError)VersionMismatchException)ExecutionPlan)AsyncQueryResultQueryResultzGRAPH.PROFILEzGRAPH.RO_QUERYzGRAPH.QUERYzGRAPH.DELETEzGRAPH.SLOWLOGzGRAPH.CONFIGz
GRAPH.LISTzGRAPH.EXPLAINc                   s|   a  ] tR t^t o RtR tRR ltR tR tR t	R t
R	 tR
 tRR ltR tRR ltRR ltRtV tR# )GraphCommandszRedisGraph Commandsc           	     s   \        V P                  4      ^ 8X  d   \        V P                  4      ^ 8X  d   R# RpV P                  P                  4        F  w  r#V\	        V4      R,           ,          pK   	  TRP                  V P                   Uu. uF  p\	        V4      NK  	  up4      ,          pVR,          R8X  d   VRR pV P                  V4      # u upi )z
Create entire graph.
NzCREATE Z,i)ZlennodesedgesZitemsstrjoinquery)selfr   Z_ZnodeZedges   &    B/usr/lib/python3.14/site-packages/redis/commands/graph/commands.pycommitZGraphCommands.commit   s     tzz?aC

Oq$8zz'')GASY_$E * 	<3t9<== 9#2JEzz%   =s   C
Nc                s^   TpV P                  V4      V,           pV'       d   \        pMV'       d   \        M\        pWpP                  VR.p\        V\        4      '       d   VP                  RV.4       MVe   \        R4      h V P                  ! V!  p	\        W	V4      #   \         d9   p
R\        T
4      9   d"   T'       d   T P                  YTRR7      u Rp
?
# T
hRp
?
i\         d>   p
T
P                  T n        T P!                  4        T P                  YY44      u Rp
?
# Rp
?
ii ; i)a  
Executes a query against the graph.
For more information see `GRAPH.QUERY <https://redis.io/commands/graph.query>`_. # noqa

Args:

q : str
    The query.
params : dict
    Query parameters.
timeout : int
    Maximum runtime for read queries in milliseconds.
read_only : bool
    Executes a readonly query if set to True.
profile : bool
    Return details on results produced by and time
    spent in each operation.
	--compacttimeoutN+Timeout argument must be a positive integerunknown commandF	read_only)_build_params_headerPROFILE_CMDRO_QUERY_CMD	QUERY_CMDname
isinstanceintextend	Exceptionexecute_commandr   r   r	   r   r   version_refresh_schemar   Zqparamsr   r   profiler   ZcmdZcommandZresponseZe   &&&&&&     r   r   ZGraphCommands.query(   s   *  ))&1E9
 C"+,C		5+6 gs##NNIw/0 IJJ	=++W5Htw77 	 CF*yzz!WzFFG' 	= 99DL  "::a<<	=sB   B# #D,.C!C!D,C!!D,.D,/2D'!D,'D,c                sL    RpV\        V4      ,          pV P                  V4      # )z
Merge pattern.
zMERGE )r	   r   )r   Zpatternr   s   && r   mergeZGraphCommands.mergeb   s&     Wzz%      c                sb    V P                  4        V P                  \        V P                  4      # )zd
Deletes graph.
For more information see `DELETE <https://redis.io/commands/graph.delete>`_. # noqa
)Z_clear_schemar   
DELETE_CMDr   r      &r   deleteZGraphCommands.deletek   s'    
 	##J		::r&   c                sB    V P                  4        / V n        . V n        R# zD
Commit the graph and reset the edges and the nodes to zero length.
Nr   r   r   r(   r)   r   flushZGraphCommands.flusht   s     	

r&   c                s    \        R4      h)zInternal only. Not supported.zVGRAPH.BULK is internal only. Use https://github.com/redisgraph/redisgraph-bulk-loader.)ZNotImplementedError)r   Zkwargss   &,r   bulkZGraphCommands.bulk|   s    !H
 	
r&   c                s(    V P                  VRR7      # )aB  
Execute a query and produce an execution plan augmented with metrics
for each operation's execution. Return a string representation of a
query execution plan, with details on results produced by and time
spent in each operation.
For more information see `GRAPH.PROFILE <https://redis.io/commands/graph.profile>`_. # noqa
T)r#   )r   )r   r   s   &&r   r#   ZGraphCommands.profile   s     zz%z..r&   c                sB    V P                  \        V P                  4      # )a  
Get a list containing up to 10 of the slowest queries issued
against the given graph ID.
For more information see `GRAPH.SLOWLOG <https://redis.io/commands/graph.slowlog>`_. # noqa

Each item in the list has the following structure:
1. A unix timestamp at which the log entry was processed.
2. The issued command.
3. The issued query.
4. The amount of time needed for its execution, in milliseconds.
)r   SLOWLOG_CMDr   r(   r)   r   slowlogZGraphCommands.slowlog   s     ##K;;r&   c                s    V'       d   RMRV.pVe&   V'       d   VP                  V4       M\        R4      hV P                  ! \        .VO5!  # )aB  
Retrieve or update a RedisGraph configuration.
For more information see `<https://redis.io/commands/graph.config-get/>`__.

Args:

name : str
    The name of the configuration
value :
    The value we want to set (can be used only when `set` is on)
set : bool
    Turn on to set a configuration. Default behavior is get.
ZSETZGETz3``value`` can be provided only when ``set`` is True)Zappendr    r   
CONFIG_CMD)r   r   ZvalueZsetr"   s   &&&& r   configZGraphCommands.config   sO     %E40e$I  ##J888r&   c                s,    V P                  \        4      # )z}
Lists all graph keys in the keyspace.
For more information see `GRAPH.LIST <https://redis.io/commands/graph.list>`_. # noqa
)r   LIST_CMDr(   r)   r   	list_keysZGraphCommands.list_keys   s    
 ##H--r&   c                s   V P                  V4      V,           pV P                  \        V P                  V4      p\	        V^ ,          \
        4      '       d   V Uu. uF  qDP                  4       NK  	  ppRP                  V4      # u upi )
Get the execution plan for given query,
GRAPH.EXPLAIN returns an array of operations.

Args:
    query: the query that will be executed
    params: query parameters

r   r   EXPLAIN_CMDr   r   ZbytesZdecoder
   r   r   r"   planZb   &&&  r   execution_planZGraphCommands.execution_plan   sm     ))&1E9##KEBd1gu%%(,-1HHJD-yy .s   Bc                s    V P                  V4      V,           pV P                  \        V P                  V4      p\	        V4      # )a   
Get the execution plan for given query,
GRAPH.EXPLAIN returns ExecutionPlan object.
For more information see `GRAPH.EXPLAIN <https://redis.io/commands/graph.explain>`_. # noqa

Args:
    query: the query that will be executed
    params: query parameters
r   r   r8   r   r   r   r   r"   r:      &&& r   explainZGraphCommands.explain   s<     ))&1E9##KEBT""r&   r   r   r   NNFF)NFN)__name__
__module____qualname____firstlineno__Z__doc__r   r   r%   r*   r-   r.   r#   r0   r2   r4   r<   r@   __static_attributes____classdictcell__Z__classdict__   @r   r   r      sJ     !&8=t!;
/<90. # #r&   r   c                   sD   a  ] tR t^t o RR ltRR ltRR ltR tRtV t	R# )	AsyncGraphCommandsNc                s  "   TpV P                  V4      V,           pV'       d   \        pMV'       d   \        M\        pWpP                  VR.p\        V\        4      '       d   VP                  RV.4       MVe   \        R4      h V P                  ! V!  G Rj  xL
 p	\        4       P                  W	V4      G Rj  xL
 #  L& L  \         dB   p
R\        T
4      9   d+   T'       d#   T P                  YTRR7      G Rj  xL 
 u Rp
?
# T
hRp
?
i\         dG   p
T
P                   T n        T P#                  4        T P                  YY44      G Rj  xL 
 u Rp
?
# Rp
?
ii ; i5i)a  
Executes a query against the graph.
For more information see `GRAPH.QUERY <https://oss.redis.com/redisgraph/master/commands/#graphquery>`_. # noqa

Args:

q : str
    The query.
params : dict
    Query parameters.
timeout : int
    Maximum runtime for read queries in milliseconds.
read_only : bool
    Executes a readonly query if set to True.
profile : bool
    Return details on results produced by and time
    spent in each operation.
r   r   Nr   r   Fr   )r   r   r   r   r   r   r   r   r   r   r   Z
initializer   r	   r   r   r   r    r!   r$   r   r   ZAsyncGraphCommands.query   s*    *  ))&1E9
 C"+,C		5+6 gs##NNIw/0 IJJ	C!117;;H)+66twOOO <O 	 CF*y!ZZ7eZLLLLG' 	C 99DL  "AwBBBB	Cs   1E%AE%	C C!C >C?C E%C C E"D*DDDE"E%DE"E"6EEEE"E%E""E%c                s2  "   V P                  V4      V,           pV P                  \        V P                  V4      G Rj  xL
 p\	        V^ ,          \
        4      '       d   V Uu. uF  qDP                  4       NK  	  ppRP                  V4      #  LPu upi 5i)r5   Nr6   r7   r9   r;   r   r<   Z!AsyncGraphCommands.execution_plan  sw      ))&1E9))+tyy%HHd1gu%%(,-1HHJD-yy I-s"   =BB %B%B=BBc                s   "   V P                  V4      V,           pV P                  \        V P                  V4      G Rj  xL
 p\	        V4      #  L5i)z
Get the execution plan for given query,
GRAPH.EXPLAIN returns ExecutionPlan object.

Args:
    query: the query that will be executed
    params: query parameters
Nr=   r>   r?   r   r@   ZAsyncGraphCommands.explain%  sH      ))&1E9))+tyy%HHT"" Is   =AA Ac                s^   "   V P                  4       G Rj  xL
  / V n        . V n        R#  L5ir+   r,   r(   r)   r   r-   ZAsyncGraphCommands.flush3  s)      kkm

 	s   -+-rA   rB   rC   )
rD   rE   rF   rG   r   r<   r@   r-   rH   rI   rJ   rK   r   rL   rL      s      8Ct # r&   rL   N)Zredisr    Zredis.exceptionsr   Z
exceptionsr   r<   r   Zquery_resultr   r   r   r   r   r'   r/   r1   r3   r8   r   rL   ) r&   r   <module>rM      sW     * 0 ) 7	

E# E#P_ _r&   