https://t.me/AnonymousX5
Server : Apache
System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64
User : njnconst ( 1116)
PHP Version : 8.4.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/django/db/models/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/django/db/models/query_utils.pyc
�
r�\c@s�dZddlmZddlmZddlmZddlmZdefd��YZ	de
fd	��YZd
ejfd��YZ
de
fd
��YZed�Zd�Zee_dS(u�
Various data structures used in query construction.

Factored out from django.db.models.query to avoid making the main module very
large and/or so that they can be used by other modules without getting into
circular import difficulties.
i����(tunicode_literals(tutil(tsix(ttreetInvalidQuerycBseZdZRS(uE
    The query passed to raw isn't a safe query to use with raw.
    (t__name__t
__module__t__doc__(((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyRstQueryWrappercBs&eZdZd�Zddd�ZRS(u�
    A type that indicates the contents are an SQL fragment and the associate
    parameters. Can be used to pass opaque data to a where-clause, for example.
    cCs|t|�f|_dS(N(tlisttdata(tselftsqltparams((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt__init__scCs|jS(N(R
(Rtqnt
connection((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pytas_sqlsN(RRRRtNoneR(((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyRs	tQcBsVeZdZdZdZeZd�Zd�Zd�Zd�Z	d�Z
d�ZRS(	ub
    Encapsulates filters as objects that can then be combined logically (using
    & and |).
    uANDuORcOs6tt|�jdt|�ttj|���dS(Ntchildren(tsuperRRR	Rt	iteritems(Rtargstkwargs((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyR+scCsZt|t�st|��nt|��}||_|j||�|j||�|S(N(t
isinstanceRt	TypeErrorttypet	connectortadd(Rtothertconntobj((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt_combine.s	cCs|j||j�S(N(R!tOR(RR((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt__or__7scCs|j||j�S(N(R!tAND(RR((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt__and__:scCs0t|��}|j||j�|j�|S(N(RRR$tnegate(RR ((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt
__invert__=s
cCsw|jjdgd|jd|j�}xI|jD]>}t|d�r_|jj|j��q1|jj|�q1W|S(NRRtnegateduclone(t	__class__t
_new_instanceRR(Rthasattrtappendtclone(RR-tchild((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyR-Cs(RRRR$R"tdefaultRR!R#R%R'R-(((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyR!s						tDeferredAttributecBs2eZdZd�Zd�Zd�Zd�ZRS(u�
    A wrapper for a deferred-loading field. When the value is read from this
    object the first time, the query is executed.
    cCs
||_dS(N(t
field_name(RR1tmodel((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyRRsc
Cs<ddlm}|jj}|j}|dk	s7t�|j}|j|j|�|kr1y|j	|j�d}WnC|k
r�g|j
D]}|j|jkr�|^q�d}nX|j}|j
||�}	|	dkr!t|jj|�j|jj�jd|j�|j�}	n|	||j<n||jS(uz
        Retrieves and caches the value from the datastore on the first lookup.
        Returns the cached value.
        i����(tFieldDoesNotExistitpkN(tdjango.db.models.fieldsR3t_metatproxy_for_modelRtAssertionErrort__dict__tgetR1tget_field_by_nametfieldstattnametnamet_check_parent_chaintgetattrt
_base_managertonlytusingt_statetdbR4(
RtinstancetownerR3tnon_deferred_modeltoptsR
tfR>tval((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt__get__Us(		
&	cCs||j|j<dS(u�
        Deferred loading attributes can be set normally (which means there will
        never be a database lookup involved.
        N(R9R1(RRFtvalue((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt__set__xscCsW|j}|j|�d}|j|j�}|jrS||krSt||j�SdS(u�
        Check if the field value can be fetched from a parent field already
        loaded in the instance. This can be done if the to-be fetched
        field is a primary key field.
        iN(R6R;tget_ancestor_linkR2tprimary_keyR@R=R(RRFR>RIRJt
link_field((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyR?s	(RRRRRLRNR?(((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyR0Ms
		#	c	Cs�|js
tS|jjr$|r$tS|rc|rF|j�|krFtS|rc|j|krctSn|rw|jrwtS|r�|j|kr�|r�|j|kr�td|jjj	|jf��ntSnt
S(uv
    Returns True if this field should be used to descend deeper for
    select_related() purposes. Used by both the query construction code
    (sql.query.fill_related_selections()) and the model instance creation code
    (query.get_klass_info()).

    Arguments:
     * field - the field to be checked
     * restricted - a boolean field, indicating if the field list has been
       manually restricted using a requested clause)
     * requested - The select_related() dictionary.
     * load_fields - the set of fields to be loaded on this model
     * reverse - boolean, True if we are checking a reverse select related
    uXField %s.%s cannot be both deferred and traversed using select_related at the same time.(treltFalsetparent_linktrelated_query_nameR>tnullRR2R6tobject_nametTrue(tfieldt
restrictedt	requestedtload_fieldstreverse((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pytselect_related_descend�s$	cs�dd�fd��Y}d�jdjtt|���f}tj|dd�}t�fd�|D��}||d<�j|d	<t|d
<t	t
|��f|�S(u�
    Returns a class object that is a copy of "model" with the specified "attrs"
    being replaced with DeferredAttribute objects. The "pk_value" ties the
    deferred attributes to a particular instance of the model.
    tMetacseZeZ�jjZRS((RRRXtproxyR6t	app_label((R2(s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyR_�su%s_Deferred_%su_iPi c3s$|]}|t|��fVqdS(N(R0(t.0tattr(R2(s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pys	<genexpr>�suMetau
__module__u	_deferred((RtjointsortedR	Rt
truncate_nametdictRRXRtstr(R2tattrsR_R>t	overrides((R2s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pytdeferred_class_factory�s(


N(Rt
__future__Rtdjango.db.backendsRtdjango.utilsRRt	ExceptionRtobjectRtNodeRR0RSR^RkRXt__safe_for_unpickling__(((s>/tmp/pip-install-XxeQeY/django/django/db/models/query_utils.pyt<module>s,@'	

https://t.me/AnonymousX5 - 2025