https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/django/db/models/sql/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/django/db/models/sql/__pycache__/datastructures.cpython-310.pyc
o

3�a��@sRdZddlmZmZGdd�de�ZGdd�d�ZGdd�d�ZGd	d
�d
�ZdS)z]
Useful auxiliary data structures for query construction. Not useful outside
the SQL domain.
�)�INNER�LOUTERc@seZdZdZdd�ZdS)�	MultiJoinz�
    Used by join construction code to indicate the point at which a
    multi-valued join was attempted (if the caller wants to treat that
    exceptionally).
    cC�||_||_dS�N)�level�names_with_path)�self�	names_pos�path_with_names�r�E/usr/lib/python3/dist-packages/django/db/models/sql/datastructures.py�__init__s
zMultiJoin.__init__N)�__name__�
__module__�__qualname__�__doc__rrrrr
rsrc@seZdZdS)�EmptyN)rrrrrrr
rsrc@s`eZdZdZ	ddd�Zdd�Zdd�Zed	d
��Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dS)�Joina�
    Used by sql.Query and sql.SQLCompiler to generate JOIN clauses into the
    FROM entry. For example, the SQL generated could be
        LEFT OUTER JOIN "sometable" T1 ON ("othertable"."sometable_id" = "sometable"."id")

    This class is primarily used in Query.alias_map. All entries in alias_map
    must be Join compatible by providing the following attributes and methods:
        - table_name (string)
        - table_alias (possible alias for the table, can be None)
        - join_type (can be None for those entries that aren't joined from
          anything)
        - parent_alias (which table is this join's parent, can be None similarly
          to join_type)
        - as_sql()
        - relabeled_clone()
    NcCs8||_||_||_||_|��|_||_||_||_dSr)	�
table_name�parent_alias�table_alias�	join_type�get_joining_columns�	join_cols�
join_field�nullable�filtered_relation)r	rrrrrrrrrr
r)s

z
Join.__init__c	Cs*g}g}|j}|jj}|jD]\}}|�d||j�||�||j�||�f�q|j�|j	j
|j|j�}	|	rI|�|	�\}
}|�d|
�|�|�|j
rb|�|j
�\}
}|
rb|�d|
�|�|�|sst|jd|j�}td|j��d�|�}
|j|jkr�dnd|j}d|j||j�||
f}||fS)	z�
        Generate the full
           LEFT OUTER JOIN sometable ON sometable.somecol = othertable.othercol, params
        clause for this join.
        z
%s.%s = %s.%sz(%s)�fieldzaJoin generated an empty ON clause. %s did not yield either joining columns or extra restrictions.z AND �� %sz%s %s%s ON (%s))�quote_name_unless_alias�ops�
quote_namer�appendrrr�get_extra_restriction�query�where_class�compile�extendr�getattr�
ValueError�	__class__�joinrr)r	�compiler�
connection�join_conditions�params�qn�qn2�lhs_col�rhs_col�
extra_cond�	extra_sql�extra_params�declared_field�
on_clause_sql�	alias_str�sqlrrr
�as_sql;sD
�	�

��
zJoin.as_sqlc	sr��|j|j�}��|j|j�}|jdur'|j��}�fdd�|jjD�|_nd}|j|j|||j|j	|j
|d�S)Ncsg|]}��||��qSr)�get)�.0�p��
change_maprr
�
<listcomp>msz(Join.relabeled_clone.<locals>.<listcomp>)r)r>rrr�clone�pathr,rrrr)r	rB�new_parent_alias�new_table_aliasrrrAr
�relabeled_clonehs


�zJoin.relabeled_clonecCs|j|j|j|j|jfSr)r,rrrr�r	rrr
�identityus�z
Join.identitycC�t|t�stS|j|jkSr)�
isinstancer�NotImplementedrJ�r	�otherrrr
�__eq__�
zJoin.__eq__cC�
t|j�Sr��hashrJrIrrr
�__hash__��
z
Join.__hash__cCs(|r||kS|jdd�|jdd�kS)N����rJ�r	rO�with_filtered_relationrrr
�equals�szJoin.equalscC�|�i�}t|_|Sr)rHrr�r	�newrrr
�demote��
zJoin.demotecCr\r)rHrrr]rrr
�promote�r`zJoin.promoter)rrrrrr=rH�propertyrJrPrUr[r_rarrrr
rs
�-
	rc@sXeZdZdZdZdZdZdd�Zdd�Zdd�Z	e
d	d
��Zdd�Zd
d�Z
dd�ZdS)�	BaseTablez�
    The BaseTable class is used for base table references in FROM clause. For
    example, the SQL "foo" in
        SELECT * FROM "foo" WHERE somecond
    could be generated by this class.
    NcCrr)rr)r	r�aliasrrr
r�s
zBaseTable.__init__cCs2|j|jkrdnd|j}|�|j�}||gfS)Nrr )rrr!)r	r.r/r;�base_sqlrrr
r=�szBaseTable.as_sqlcCs|�|j|�|j|j��Sr)r,rr>r)r	rBrrr
rH�szBaseTable.relabeled_clonecCs|j|j|jfSr)r,rrrIrrr
rJ�szBaseTable.identitycCrKr)rLrcrMrJrNrrr
rP�rQzBaseTable.__eq__cCrRrrSrIrrr
rU�rVzBaseTable.__hash__cCs|j|jkSrrXrYrrr
r[�szBaseTable.equals)rrrrrrrrr=rHrbrJrPrUr[rrrr
rc�s
rcN)	r�django.db.models.sql.constantsrr�	Exceptionrrrrcrrrr
�<module>s

https://t.me/RX1948 - 2025