+
    iE                    v   ^ RI Ht ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RIH
t
 ^ R	IHt ^R
IHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ]	'       dU   ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RI H!t! ^RI"H#t# ^RI$H%t% ^RI&H't' ^RI&H(t( ^RI&H)t) ^RI&H*t* ^RIH+t+ ^RI,H-t- ]
! R ]R!7      t.]
! R"]R!7      t/]P`                  3R# R$ llt]P`                  3R% R& llt1 ! R' R(]Pd                  ].,          4      t3 ! R) R*]Ph                  ].,          4      t4R+ R, lt5R# )-    )annotationsN)Any)Iterable)Optional)Sequence)TYPE_CHECKING)TypeVar)Union)CONTAINED_BY)CONTAINS)OVERLAP)types)util)
expression)	operators)InternalTraversal)Dialect)_ColumnExpressionArgument)_TypeEngineArgument)ColumnElement)Grouping)BindParameter)OperatorType)_SelectIterable)_BindProcessorType)_LiteralProcessorType)_ResultProcessorType)
TypeEngine)_TraverseInternalsType)Self_T)bound_CTc               (    V ^8  d   QhRRRRRRRR/# 	   other
typing_Anyarrexprz_ColumnExpressionArgument[_T]operatorr   returnColumnElement[bool] )formats   "~C:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO\maestro-backend\venv\Lib\site-packages\sqlalchemy/dialects/postgresql/array.py__annotate__r0   2   0     
( 
(
(*
( 
( 	
(    c                $    VP                  W4      # )zbA synonym for the ARRAY-level :meth:`.ARRAY.Comparator.any` method.
See that method for details.

)anyr'   r)   r*   s   &&&r/   r   r   2        ;;u''r2   c               (    V ^8  d   QhRRRRRRRR/# r%   r-   )r.   s   "r/   r0   r0   ?   r1   r2   c                $    VP                  W4      # )zbA synonym for the ARRAY-level :meth:`.ARRAY.Comparator.all` method.
See that method for details.

)allr5   s   &&&r/   Allr:   ?   r6   r2   c                     a  ] tR t^Lt$ RtR tRtR]P                  3R]P                  3.t
R]R&   RR/R	 V 3R
 lllt]R R l4       tRR R lltRR R lltRtV ;t# )arraya  A PostgreSQL ARRAY literal.

This is used to produce ARRAY literals in SQL expressions, e.g.::

    from sqlalchemy.dialects.postgresql import array
    from sqlalchemy.dialects import postgresql
    from sqlalchemy import select, func

    stmt = select(array([1, 2]) + array([3, 4, 5]))

    print(stmt.compile(dialect=postgresql.dialect()))

Produces the SQL:

.. sourcecode:: sql

    SELECT ARRAY[%(param_1)s, %(param_2)s] ||
        ARRAY[%(param_3)s, %(param_4)s, %(param_5)s]) AS anon_1

An instance of :class:`.array` will always have the datatype
:class:`_types.ARRAY`.  The "inner" type of the array is inferred from the
values present, unless the :paramref:`_postgresql.array.type_` keyword
argument is passed::

    array(["foo", "bar"], type_=CHAR)

When constructing an empty array, the :paramref:`_postgresql.array.type_`
argument is particularly important as PostgreSQL server typically requires
a cast to be rendered for the inner type in order to render an empty array.
SQLAlchemy's compilation for the empty array will produce this cast so
that::

    stmt = array([], type_=Integer)
    print(stmt.compile(dialect=postgresql.dialect()))

Produces:

.. sourcecode:: sql

    ARRAY[]::INTEGER[]

As required by PostgreSQL for empty arrays.

.. versionadded:: 2.0.40 added support to render empty PostgreSQL array
   literals with a required cast.

Multidimensional arrays are produced by nesting :class:`.array` constructs.
The dimensionality of the final :class:`_types.ARRAY`
type is calculated by
recursively adding the dimensions of the inner :class:`_types.ARRAY`
type::

    stmt = select(
        array(
            [array([1, 2]), array([3, 4]), array([column("q"), column("x")])]
        )
    )
    print(stmt.compile(dialect=postgresql.dialect()))

Produces:

.. sourcecode:: sql

    SELECT ARRAY[
        ARRAY[%(param_1)s, %(param_2)s],
        ARRAY[%(param_3)s, %(param_4)s],
        ARRAY[q, x]
    ] AS anon_1

.. versionadded:: 1.3.6 added support for multidimensional array literals

.. seealso::

    :class:`_postgresql.ARRAY`


postgresqlclausestyper   _traverse_internalstype_Nc               $    V ^8  d   QhRRRRRR/# )r&   r>   zIterable[_T]rA   z!Optional[_TypeEngineArgument[_T]]kwr(   r-   )r.   s   "r/   r0   array.__annotate__   s(     !) !)!) 1	!)
 !)r2   c                 < \         SV `  ! \        P                  .VO5/ VB  Ve   TM>V P                  '       d   V P                  ^ ,          P
                  M\        P                  p\        V\        4      '       d@   \        VP                  VP                  e   VP                  ^,           M^R7      V n        R# \        V4      V n        R# )zConstruct an ARRAY literal.

:param clauses: iterable, such as a list, containing elements to be
 rendered in the array
:param type\_: optional type.  If omitted, the type is inferred
 from the contents of the array.

N)
dimensions)super__init__r   comma_opr>   r?   sqltypesNULLTYPE
isinstanceARRAY	item_typerF   )selfr>   rA   rC   	main_type	__class__s   &&$, r/   rH   array.__init__   s     	++<g<<   )-a%%8;L;L 	 i''## !++7 ((1,DI i(DIr2   c                   V ^8  d   QhRR/# )r&   r+   r   r-   )r.   s   "r/   r0   rD      s      / r2   c                	    V 3# Nr-   rO   s   &r/   _select_iterablearray._select_iterable   s	    wr2   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r&   r*   r   objr(   rA   zOptional[TypeEngine[_T]]_assume_scalarboolr+   zBindParameter[_T]r-   )r.   s   "r/   r0   rD      s<        (	
  
r2   c                	    V'       g   V\         P                  J d'   \        P                  ! R VVVV P                  RR7      # \        V Uu. uF  pV P                  WRVR7      NK  	  up4      # u upi )NT)_compared_to_operatorrA   _compared_to_typeunique)r[   rA   )r   getitemr   r   r?   r<   _bind_param)rO   r*   rZ   rA   r[   os   &&&&& r/   rb   array._bind_param   s     X):)::++&."&))  
 !	 ! $$ D %  !	 s   A0c                    V ^8  d   QhRRRR/# )r&   againstzOptional[OperatorType]r+   zUnion[Self, Grouping[_T]]r-   )r.   s   "r/   r0   rD      s      -	"r2   c                	    V\         P                  \         P                  \         P                  39   d   \        P
                  ! V 4      # V # rU   )r   any_opall_opra   r   r   )rO   rf   s   &&r/   
self_grouparray.self_group   s;     y'')9)99;L;LMM&&t,,Kr2   )r?   )NFrU   )__name__
__module____qualname____firstlineno____doc____visit_name__stringify_dialectr   dp_clauseelement_tupledp_typer@   __annotations__rH   propertyrW   rb   rj   __static_attributes____classcell__)rQ   s   @r/   r<   r<   L   s    KZ N$ 
%<<=	"**+3/ 
!) 48	!) !)F  6 r2   r<   c                      ] tR t^tRtRR R llt ! R R]P                  P                  ]	,          4      t]t
]P                  R R l4       tR	 R
 ltR R ltR R ltRtR# )rM   a	  PostgreSQL ARRAY type.

The :class:`_postgresql.ARRAY` type is constructed in the same way
as the core :class:`_types.ARRAY` type; a member type is required, and a
number of dimensions is recommended if the type is to be used for more
than one dimension::

    from sqlalchemy.dialects import postgresql

    mytable = Table(
        "mytable",
        metadata,
        Column("data", postgresql.ARRAY(Integer, dimensions=2)),
    )

The :class:`_postgresql.ARRAY` type provides all operations defined on the
core :class:`_types.ARRAY` type, including support for "dimensions",
indexed access, and simple matching such as
:meth:`.types.ARRAY.Comparator.any` and
:meth:`.types.ARRAY.Comparator.all`.  :class:`_postgresql.ARRAY`
class also
provides PostgreSQL-specific methods for containment operations, including
:meth:`.postgresql.ARRAY.Comparator.contains`
:meth:`.postgresql.ARRAY.Comparator.contained_by`, and
:meth:`.postgresql.ARRAY.Comparator.overlap`, e.g.::

    mytable.c.data.contains([1, 2])

Indexed access is one-based by default, to match that of PostgreSQL;
for zero-based indexed access, set
:paramref:`_postgresql.ARRAY.zero_indexes`.

Additionally, the :class:`_postgresql.ARRAY`
type does not work directly in
conjunction with the :class:`.ENUM` type.  For a workaround, see the
special type at :ref:`postgresql_array_of_enum`.

.. container:: topic

    **Detecting Changes in ARRAY columns when using the ORM**

    The :class:`_postgresql.ARRAY` type, when used with the SQLAlchemy ORM,
    does not detect in-place mutations to the array. In order to detect
    these, the :mod:`sqlalchemy.ext.mutable` extension must be used, using
    the :class:`.MutableList` class::

        from sqlalchemy.dialects.postgresql import ARRAY
        from sqlalchemy.ext.mutable import MutableList


        class SomeOrmClass(Base):
            # ...

            data = Column(MutableList.as_mutable(ARRAY(Integer)))

    This extension will allow "in-place" changes such to the array
    such as ``.append()`` to produce events which will be detected by the
    unit of work.  Note that changes to elements **inside** the array,
    including subarrays that are mutated in place, are **not** detected.

    Alternatively, assigning a new array value to an ORM element that
    replaces the old one will always trigger a change event.

.. seealso::

    :class:`_types.ARRAY` - base array type

    :class:`_postgresql.array` - produces a literal array value.

Nc               (    V ^8  d   QhRRRRRRRR/# )r&   rN   z_TypeEngineArgument[_T]as_tupler\   rF   zOptional[int]zero_indexesr-   )r.   s   "r/   r0   ARRAY.__annotate__6  s2     1) 1)*1) 1) "	1)
 1)r2   c                    \        V\        4      '       d   \        R4      h\        V\        4      '       d   V! 4       pWn        W n        W0n        W@n        R# )au  Construct an ARRAY.

E.g.::

  Column("myarray", ARRAY(Integer))

Arguments are:

:param item_type: The data type of items of this array. Note that
  dimensionality is irrelevant here, so multi-dimensional arrays like
  ``INTEGER[][]``, are constructed as ``ARRAY(Integer)``, not as
  ``ARRAY(ARRAY(Integer))`` or such.

:param as_tuple=False: Specify whether return results
  should be converted to tuples from lists. DBAPIs such
  as psycopg2 return lists by default. When tuples are
  returned, the results are hashable.

:param dimensions: if non-None, the ARRAY will assume a fixed
 number of dimensions.  This will cause the DDL emitted for this
 ARRAY to include the exact number of bracket clauses ``[]``,
 and will also optimize the performance of the type overall.
 Note that PG arrays are always implicitly "non-dimensioned",
 meaning they can store any number of dimensions no matter how
 they were declared.

:param zero_indexes=False: when True, index values will be converted
 between Python zero-based and PostgreSQL one-based indexes, e.g.
 a value of one will be added to all index values before passing
 to the database.

zUDo not nest ARRAY types; ARRAY(basetype) handles multi-dimensional arrays of basetypeN)rL   rM   
ValueErrorr?   rN   r{   rF   r|   )rO   rN   r{   rF   r|   s   &&&&&r/   rH   ARRAY.__init__6  sO    N i''?  i&&!I" $(r2   c                  >    ] tR tRtRtR R ltR R ltR R ltR	tR
# )ARRAY.Comparatorii  a  Define comparison operations for :class:`_types.ARRAY`.

Note that these operations are in addition to those provided
by the base :class:`.types.ARRAY.Comparator` class, including
:meth:`.types.ARRAY.Comparator.any` and
:meth:`.types.ARRAY.Comparator.all`.

c               $    V ^8  d   QhRRRRRR/# )r&   r'   r(   kwargsr+   r,   r-   )r.   s   "r/   r0   ARRAY.Comparator.__annotate__s  s)     		O 		O#		O/9		O 		Or2   c                N    V P                  \        V\        P                  R7      # )zBoolean expression.  Test if elements are a superset of the
elements of the argument array expression.

kwargs may be ignored by this operator but are required for API
conformance.
result_type)operater   rJ   Boolean)rO   r'   r   s   &&,r/   containsARRAY.Comparator.containss  s     <<%X=M=M<NNr2   c                    V ^8  d   QhRRRR/# r&   r'   r(   r+   r,   r-   )r.   s   "r/   r0   r   ~  s     	 	j 	5H 	r2   c                N    V P                  \        V\        P                  R7      # )zlBoolean expression.  Test if elements are a proper subset of the
elements of the argument array expression.
r   )r   r   rJ   r   rO   r'   s   &&r/   contained_byARRAY.Comparator.contained_by~  s'     <<e1A1A    r2   c                    V ^8  d   QhRRRR/# r   r-   )r.   s   "r/   r0   r     s     	N 	N 	N0C 	Nr2   c                N    V P                  \        V\        P                  R7      # )z]Boolean expression.  Test if array has elements in common with
an argument array expression.
r   )r   r   rJ   r   r   s   &&r/   overlapARRAY.Comparator.overlap  s     <<H<L<L<MMr2   r-   N)	rl   rm   rn   ro   rp   r   r   r   rw   r-   r2   r/   
Comparatorr   i  s    			O		N 	Nr2   r   c                   V ^8  d   QhRR/# )r&   r+   r\   r-   )r.   s   "r/   r0   r}     s     
 
d 
r2   c                	    \        V P                  \        P                  4      ;'       d    V P                  P                  # rU   )rL   rN   rJ   Enumnative_enumrV   s   &r/   _against_native_enumARRAY._against_native_enum  s2     t~~x}}5 + +**	
r2   c                    V ^8  d   QhRRRR/# )r&   dialectr   r+   z#Optional[_LiteralProcessorType[_T]]r-   )r.   s   "r/   r0   r}     s      	,r2   c                	   a aa S P                   P                  V4      P                  V4      oSf   R # R R loR VV V3R llpV# )Nc                    V ^8  d   QhRRRR/# )r&   elementszIterable[typing_Any]r+   strr-   )r.   s   "r/   r0   -ARRAY.literal_processor.<locals>.__annotate__  s     	3 	31 	3c 	3r2   c                ,    R RP                  V 4       R2# )zARRAY[z, ])join)r   s   &r/   to_str'ARRAY.literal_processor.<locals>.to_str  s    DIIh/022r2   c                    V ^8  d   QhRRRR/# )r&   valueSequence[typing_Any]r+   r   r-   )r.   s   "r/   r0   r     s     	 	/ 	C 	r2   c                D   < SP                  V SSP                  S4      pV# rU   )_apply_item_processorrF   )r   inner	item_procrO   r   s   & r/   process(ARRAY.literal_processor.<locals>.process  s'    ..y$//6E Lr2   )rN   dialect_implliteral_processor)rO   r   r   r   r   s   f& @@r/   r   ARRAY.literal_processor  sH     NN//8JJ
	 	3	 	 r2   c                    V ^8  d   QhRRRR/# )r&   r   r   r+   z2Optional[_BindProcessorType[Sequence[typing_Any]]]r-   )r.   s   "r/   r0   r}     s      	;r2   c                	r   a a S P                   P                  V4      P                  V4      oR  VV 3R llpV# )c                    V ^8  d   QhRRRR/# )r&   r   Optional[Sequence[typing_Any]]r+   zOptional[list[typing_Any]]r-   )r.   s   "r/   r0   *ARRAY.bind_processor.<locals>.__annotate__  s     	 	1	'	r2   c                T   < V f   V # SP                  V SSP                  \        4      # rU   )r   rF   listr   r   rO   s   &r/   r   %ARRAY.bind_processor.<locals>.process  s/     }119doot r2   )rN   r   bind_processor)rO   r   r   r   s   f& @r/   r   ARRAY.bind_processor  s8     NN//8GG
		 	 r2   c               $    V ^8  d   QhRRRRRR/# )r&   r   r   coltypeobjectr+   z*_ResultProcessorType[Sequence[typing_Any]]r-   )r.   s   "r/   r0   r}     s$     * **)/*	3*r2   c                	   a aaaa S P                   P                  V4      P                  W4      oR  VV 3R llpS P                  '       d,   Vo\        P
                  ! R4      oR V3R lloR VV3R llpV# )c                    V ^8  d   QhRRRR/# r&   r   r   r+   r   r-   )r.   s   "r/   r0   ,ARRAY.result_processor.<locals>.__annotate__  s     	 	'	+	r2   c                   < V f   V # SP                  T SSP                  SP                  '       d   \        4      # \        4      # rU   )r   rF   r{   tupler   r   s   &r/   r   'ARRAY.result_processor.<locals>.process  sI     }11OO!]]]E	  15	 r2   z^{(.*)}$c                    V ^8  d   QhRRRR/# )r&   r   r   r+   Sequence[Optional[str]]r-   )r.   s   "r/   r0   r     s     1 1 11H 1r2   c                Z   < SP                  V 4      P                  ^4      p\        V4      # )   )matchgroup_split_enum_values)r   r   patterns   & r/   handle_raw_string1ARRAY.result_processor.<locals>.handle_raw_string  s'    e,2215)%00r2   c                    V ^8  d   QhRRRR/# r   r-   )r.   s   "r/   r0   r     s      +/r2   c                d   < V f   V # S! \        V \        4      '       d   S! V 4      4      # T 4      # rU   )rL   r   )r   r   super_rps   &r/   r   r     sD     = L  !%-- &e,   r2   )rN   r   result_processorr   recompile)rO   r   r   r   r   r   r   r   s   f&& @@@@r/   r   ARRAY.result_processor  sm     NN//8II
		 	 $$$Hjj-G1 1  r2   )r{   rF   rN   r|   )FNF)rl   rm   rn   ro   rp   rH   rJ   rM   r   r#   comparator_factoryr   memoized_propertyr   r   r   r   rw   r-   r2   r/   rM   rM      sa    EN1)f!NX^^..s3 !NF $	
 
(&* *r2   rM   c                    V ^8  d   QhRRRR/# )r&   array_stringr   r+   r   r-   )r.   s   "r/   r0   r0     s      S -D r2   c                   R V 9  d5   V '       d   V P                  R4      M.  Uu. uF  pVR8w  d   TMRNK  	  up# V P                  RR4      pVP                  RR4      p. p\        P                   ! RV4      pR	pV F}  pVR 8X  d
   V'       * pK  V'       d$   VP                  VP                  RR 4      4       K>  TP	                  \        P
                  ! R
V4       Uu. uF  pVR8w  d   TMRNK  	  up4       K  	  V# u upi u upi )",NULLNz\"z_$ESC_QUOTE$_z\\\z(")Fz([^\s,]+),?)splitreplacer   appendextendfindall)r   rtextresult	on_quotes	in_quotestoks   &      r/   r   r     s   
, 2>l((-2E
E fA$&E
 	
 7D<<t$DF&II#:%IMM#++os;< MM  ZZ<< fA$.<  M7
,s   D D
)6
__future__r   r   typingr   r(   r   r   r   r   r	   r
   r   r   r   r    r   rJ   r   sqlr   sql.visitorsr   engine.interfacesr   sql._typingr   r   sql.elementsr   r   sql.expressionr   sql.operatorsr   sql.selectabler   sql.type_apir   r   r   r   r   util.typingr    r!   r#   eqr:   ExpressionClauseListr<   rM   r   r-   r2   r/   <module>r      s    # 	 $        #   !    -,82-(/-1254*6# T$e:& '\\
(  '\\
(_J++B/ _DxHNN2 xvr2   