
    Bh
                    $   S SK Jr  S SKJr  S SKJr  SSKJr  \(       a  SSKJ	r	  SSK
Jr  SSK
Jr   " S	 S
\R                  5      r " S S5      r " S S\\R                  R                  5      r " S S\\R                  R                   5      rg)    )annotations)Any)TYPE_CHECKING   )types)Dialect)_BindProcessorType)_LiteralProcessorTypec                      \ rS rSrSrSrg)JSON   ac  MySQL JSON type.

MySQL supports JSON as of version 5.7.
MariaDB supports JSON (as an alias for LONGTEXT) as of version 10.2.

:class:`_mysql.JSON` is used automatically whenever the base
:class:`_types.JSON` datatype is used against a MySQL or MariaDB backend.

.. seealso::

    :class:`_types.JSON` - main documentation for the generic
    cross-platform JSON datatype.

The :class:`.mysql.JSON` type supports persistence of JSON values
as well as the core index operations provided by :class:`_types.JSON`
datatype, by adapting the operations to render the ``JSON_EXTRACT``
function at the database level.

 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       a/home/kali/devsecops-assessor/venv/lib/python3.13/site-packages/sqlalchemy/dialects/mysql/json.pyr   r      s    ( 	r   r   c                  :    \ rS rSrSS jrSS jr    S	S jrSrg)
_FormatTypeMixin,   c                    [        5       eN)NotImplementedError)selfvalues     r   _format_value_FormatTypeMixin._format_value-   s    !##r   c                >   ^ ^ T R                  U5      mSU U4S jjnU$ )Nc                H   > TR                  U 5      n T(       a  T" U 5      n U $ r   r   r   r   
super_procs    r   process0_FormatTypeMixin.bind_processor.<locals>.process3   %    &&u-E"5)Lr   )r   r   returnr   )string_bind_processorr   dialectr&   r%   s   `  @r   bind_processor_FormatTypeMixin.bind_processor0   s$    //8
	 	 r   c                >   ^ ^ T R                  U5      mSU U4S jjnU$ )Nc                H   > TR                  U 5      n T(       a  T" U 5      n U $ r   r#   r$   s    r   r&   3_FormatTypeMixin.literal_processor.<locals>.process@   r(   r   r   r   r)   str)string_literal_processorr+   s   `  @r   literal_processor"_FormatTypeMixin.literal_processor;   s&     227;
	 	 r   r   Nr2   )r,   r   r)   z_BindProcessorType[Any])r,   r   r)   z_LiteralProcessorType[Any])r   r   r   r   r   r-   r5   r   r   r   r   r   r   ,   s!    $		#r   r   c                      \ rS rSrSS jrSrg)JSONIndexTypeI   c                H    [        U[        5      (       a  SU-  nU$ SU-  nU$ )Nz$[%s]z$."%s")
isinstanceint)r   r   formatted_values      r   r   JSONIndexType._format_valueJ   s2    eS!!%oO  '.Or   r   Nr2   r   r   r   r   r   r   r   r   r   r8   r8   I   s    r   r8   c                      \ rS rSrSS jrSrg)JSONPathTypeR   c           
         SSR                  U Vs/ s H"  n[        U[        5      (       a  SU-  OSU-  PM$     sn5      -  $ s  snf )Nz$%s z[%s]z."%s")joinr;   r<   )r   r   elems      r   r   JSONPathType._format_valueS   sV    GG !& % &0c%:%:FTM$N %
 	
s   )A
r   Nr2   r?   r   r   r   rA   rA   R   s    
r   rA   N)
__future__r   typingr   r   rD   r   sqltypesengine.interfacesr   sql.type_apir	   r
   r   r   r8   rA   r   r   r   <module>rM      sk    #    !,25	8== 	0 :$hmm&A&A 	
#X]]%?%? 	
r   