
    ,h
                         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
)   )typesc                       \ rS rSrSrSrg)JSON   a  SQLite JSON type.

SQLite supports JSON as of version 3.9 through its JSON1_ extension. Note
that JSON1_ is a
`loadable extension <https://www.sqlite.org/loadext.html>`_ and as such
may not be available, or may require run-time loading.

:class:`_sqlite.JSON` is used automatically whenever the base
:class:`_types.JSON` datatype is used against a SQLite backend.

.. seealso::

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

The :class:`_sqlite.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 wrapped in the ``JSON_QUOTE`` function at the database level.
Extracted values are quoted in order to ensure that the results are
always JSON string values.


.. versionadded:: 1.3


.. _JSON1: https://www.sqlite.org/json1.html

 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       W/var/www/auris/envauris/lib/python3.13/site-packages/sqlalchemy/dialects/sqlite/json.pyr   r      s    r   r   c                   &    \ rS rSrS rS rS rSrg)_FormatTypeMixin/   c                     [        5       eN)NotImplementedErrorselfvalues     r   _format_value_FormatTypeMixin._format_value0   s    !##r   c                 :   ^ ^ T R                  U5      mU U4S 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>.process6   %    &&u-E"5)Lr   )string_bind_processorr   dialectr    r   s   `  @r   bind_processor_FormatTypeMixin.bind_processor3   s    //8
	 r   c                 :   ^ ^ T R                  U5      mU U4S 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>.processA   r"   r   )string_literal_processorr$   s   `  @r   literal_processor"_FormatTypeMixin.literal_processor>   s    227;
	 r   r   N)r   r	   r
   r   r   r&   r,   r   r   r   r   r   r   /   s    $		r   r   c                       \ rS rSrS rSrg)JSONIndexTypeJ   c                 H    [        U[        5      (       a  SU-  nU$ SU-  nU$ )Nz$[%s]z$."%s")
isinstanceintr   s     r   r   JSONIndexType._format_valueK   s0    eS!!eOE  u$Er   r   Nr   r	   r
   r   r   r   r   r   r   r/   r/   J   s    r   r/   c                       \ rS rSrS rSrg)JSONPathTypeS   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")joinr2   r3   )r   r   elems      r   r   JSONPathType._format_valueT   sV    GG !& % &0c%:%:FTM$N %
 	
s   )A
r   Nr5   r   r   r   r7   r7   S   s    
r   r7   N)r:   r   sqltypesr   r   r/   r7   r   r   r   <module>r?      sW    "8== F 6$hmm&A&A 	
#X]]%?%? 	
r   