§ <ˆj—1ãó¦—dZddlmZddlmZddlmZddlmZddlm Z dd lm Z dd lmZdd l m Z d gZ e jGd „d e¦«¦«ZdS)z|MapperProperty implementations. This is a private module which defines the behavior of individual ORM- mapped attributes. é)Úabsolute_importé)Ú attributes)ÚPropComparator)ÚStrategizedProperty)Ú_orm_full_deannotateé)Úlog)Úutil©Ú expressionÚColumnPropertycó‡—eZdZdZdZdZejd¬¦«ˆfd„¦«Zej dd¦«d „¦«Z d „Z e d „¦«Z d „Zˆfd „Zd„Zejfd„Zd„ZGd„deje¦«Zd„ZˆxZS)rz�Describes an object attribute that corresponds to a table column. Public constructor is the :func:`_orm.column_property` function. Úcolumn)Ú _orig_columnsÚcolumnsÚgroupÚdeferredÚ instrumentÚcomparator_factoryÚ descriptorÚ extensionÚactive_historyÚexpire_on_flushÚinfoÚdocÚ strategy_keyÚ_creation_orderÚ_is_polymorphic_discriminatorÚ_mapped_by_synonymÚ_deferred_column_loader)z0.7zÃ:class:`.AttributeExtension` is deprecated in favor of the :class:`.AttributeEvents` listener interface. The :paramref:`.column_property.extension` parameter will be removed in a future release.)rc óF•—tt|¦« ¦«d„|D¦«|_d„|D¦«|_| dd¦«|_| dd¦«|_| dd¦«|_| d |j j ¦«|_ | d d¦«|_ | d d¦«|_ | d d¦«|_| d d¦«|_d|vr| d¦«|_d|vr| d¦«|_n:t%|j¦«D]}t'|dd¦«}|� ||_nŒd|_|rPt)|j j›dd t/| ¦«¦«¦«›�¦«‚t3j|¦«d|jfd|jff|_dS)a· Provide a column-level property for use with a mapping. Column-based properties can normally be applied to the mapper's ``properties`` dictionary using the :class:`_schema.Column` element directly. Use this function when the given column is not directly present within the mapper's selectable; examples include SQL expressions, functions, and scalar SELECT queries. The :func:`_orm.column_property` function returns an instance of :class:`.ColumnProperty`. Columns that aren't present in the mapper's selectable won't be persisted by the mapper and are effectively "read-only" attributes. :param \*cols: list of Column objects to be mapped. :param active_history=False: When ``True``, indicates that the "previous" value for a scalar attribute should be loaded when replaced, if not already loaded. Normally, history tracking logic for simple non-primary-key scalar values only needs to be aware of the "new" value in order to perform a flush. This flag is available for applications that make use of :func:`.attributes.get_history` or :meth:`.Session.is_modified` which also need to know the "previous" value of the attribute. :param comparator_factory: a class which extends :class:`.ColumnProperty.Comparator` which provides custom SQL clause generation for comparison operations. :param group: a group name for this property when marked as deferred. :param deferred: when True, the column property is "deferred", meaning that it does not load immediately, and is instead loaded when the attribute is first accessed on an instance. See also :func:`~sqlalchemy.orm.deferred`. :param doc: optional string that will be applied as the doc on the class-bound descriptor. :param expire_on_flush=True: Disable expiry on flush. A column_property() which refers to a SQL expression (and not a single table-bound column) is considered to be a "read only" property; populating it has no effect on the state of data, and it can only return database state. For this reason a column_property()'s value is expired whenever the parent object is involved in a flush, that is, has any kind of "dirty" state within a flush. Setting this parameter to ``False`` will have the effect of leaving any existing value present after the flush proceeds. Note however that the :class:`.Session` with default expiration settings still expires all attributes after a :meth:`.Session.commit` call, however. :param info: Optional data dictionary which will be populated into the :attr:`.MapperProperty.info` attribute of this object. :param extension: an :class:`.AttributeExtension` instance, or list of extensions, which will be prepended to the list of attribute listeners for the resulting descriptor placed on the class. .. seealso:: :ref:`column_property_options` - to map columns while including mapping options :ref:`mapper_column_property_sql_expressions` - to map SQL expressions có6—g|]}tj|¦«‘ŒS©)r Ú_labeled©Ú.0Úcs úP/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/orm/properties.pyú z+ColumnProperty.__init__..’s#€ÐFÐFÐF¸�jÔ1°!Ñ4Ô4ÐFÐFÐFócóP—g|]#}tjt|¦«¦«‘Œ$Sr$)r r%rr&s r)r*z+ColumnProperty.__init__..“s9€ð ð ð Ø=>�JÔ Õ 4°QÑ 7Ô 7Ñ 8Ô 8ð ð ð r+rNrFÚ _instrumentTrrrrrrrz* received unexpected keyword argument(s): z, r)ÚsuperrÚ__init__rrÚpoprrrÚ __class__Ú ComparatorrrrrrrrÚreversedÚgetattrÚ TypeErrorÚ__name__ÚjoinÚsortedÚkeysr Úset_creation_orderr)ÚselfrÚkwargsÚcolrr1s €r)r/zColumnProperty.__init__:s ø€õn �n˜dÑ#Ô#×,Ò,Ñ.Ô.Ð.ØFÐF¸gÐFÑFÔFˆÔð ð ØBIð ñ ô ˆŒ ð—Z’Z ¨Ñ.Ô.ˆŒ ØŸ š  :¨uÑ5Ô5ˆŒ Ø Ÿ*š* ]°DÑ9Ô9ˆŒØ"(§*¢*Ø  $¤.Ô";ñ# ô# ˆÔð!Ÿ*š* \°4Ñ8Ô8ˆŒØŸš K°Ñ6Ô6ˆŒØ$ŸjšjÐ)9¸5ÑAÔAˆÔØ%ŸzšzÐ*;¸TÑBÔBˆÔà �VÐ Ð ØŸ š  6Ñ*Ô*ˆDŒIà �Fˆ?ˆ?Ø—z’z %Ñ(Ô(ˆDŒHˆHå ¤ Ñ-Ô-ð ð �ݘc 5¨$Ñ/Ô/�Ø�?Ø"�D”HØ�Eð#ð �”à ð Ýà”>Ô*Ð*Ð*¨D¯IªIµf¸V¿[º[¹]¼]Ñ6KÔ6KÑ,LÔ,LÐ,LðNñôð õ Ô Ñ%Ô%Ð%ð˜œÐ 'Ø ˜4œ?Ð +ð ˆÔÐÐr+zsqlalchemy.orm.statezsqlalchemy.orm.strategiescóˆ—|j |jj| |j¦«|j¦«S©N)Ú InstanceStateÚ"_instance_level_callable_processorÚparentÚ class_managerÚLoadDeferredColumnsÚkey)r;ÚstateÚ strategiess r)Ú&_memoized_attr__deferred_column_loaderz5ColumnProperty._memoized_attr__deferred_column_loader¼s=€àÔ"×EÒEØ ŒKÔ %Ø × *Ò *¨4¬8Ñ 4Ô 4Ø ŒHñ ô ð r+có—|jS)zsAllow the ColumnProperty to work in expression before it is turned into an instrumented attribute. r ©r;s r)Ú__clause_element__z!ColumnProperty.__clause_element__Äs €ð ŒÐr+có—|jdS)aÊReturn the primary column or expression for this ColumnProperty. E.g.:: class File(Base): # ... name = Column(String(64)) extension = Column(String(8)) filename = column_property(name + '.' + extension) path = column_property('C:/' + filename.expression) .. seealso:: :ref:`mapper_column_property_sql_expressions_composed` r)rrJs r)r zColumnProperty.expressionËs€ð(Œ|˜AŒÐr+có�—|jsdStj|j|j| ||¦«||j¬¦«dS)N)Ú comparatorÚ parententityr)rrÚregister_descriptorÚclass_rErr)r;Úmappers r)Úinstrument_classzColumnProperty.instrument_classásZ€ØŒð Ø ˆFåÔ&Ø ŒMØ ŒHØ×.Ò.¨t°VÑ<Ô<ØØ”ð  ñ ô ð ð ð r+c ór•—tt|¦« ¦«t|j¦«dkrtt |jj¦« |j¦«rEtj d|j›d|jd›d|jd›d|j ›d� ¦«dSdSdS)Nrz On mapper z, primary key column 'z6' is being combined with distinct primary key column 'rz' in attribute 'zM'. Use explicit properties to give each column its own mapped attribute name.) r.rÚdo_initÚlenrÚsetrBÚ primary_keyÚ issupersetr ÚwarnrE)r;r1s €r)rUzColumnProperty.do_initís¼ø€Ý �n˜dÑ#Ô#×+Ò+Ñ-Ô-Ð-Ý ˆtŒ|Ñ Ô ˜qÒ Ð ¥S¨¬Ô)@Ñ%AÔ%A×%LÒ%LØ ŒLñ& ô& Ð õ ŒIˆIð”;�;�; ¤ ¨Q¤  °´¸a´°°À$Ä(À(À(ð Lñ ô ð ð ð ð !Ð Ð Ð r+cóF—t|j|j|j|jdœŽS)N)rrr)rrrrrrJs r)ÚcopyzColumnProperty.copyüs2€ÝðŒ\ð”]Ø”*ØÔ.ð ð ð ð r+cób—| |j¦« |||¬¦«S)N)Úpassive)Úget_implrEÚget_committed_value)r;rFÚdict_rr^s r)Ú _getcommittedzColumnProperty._getcommitteds6€ð�~Š~˜dœhÑ'Ô'×;Ò;Ø �5 'ð<ñ ô ð r+c ó,—|jsdS|j|vrO||j} |s | ||j<dS| |j¦«} |  ||| d¦«dS|jr)|j|vr"| ||jgd¬¦«dSdSdS)NT)Ú no_loader)rrEr_rWÚ has_identityÚ_expire_attributes) r;ÚsessionÚ source_stateÚ source_dictÚ dest_stateÚ dest_dictÚloadÚ _recursiveÚ_resolve_conflict_mapÚvalueÚimpls r)ÚmergezColumnProperty.merge sÒ€ðŒð Ø ˆFØ ŒX˜Ð $Ð $Ø ¤Ô)ˆEàð =Ø&+� ˜$œ(Ñ#Ð#Ð#à!×*Ò*¨4¬8Ñ4Ô4�Ø—’˜ Y°°tÑ<Ô<Ð<Ð<Ð<Ø Ô $𠨬¸Ð)BÐ)BØ × )Ò )ؘDœH˜:°ð *ñ ô ð ð ð ð ð Ð)BÐ)Br+có:—eZdZdZdZd„Zd„Zd„Zd„Zd„Z d„Z d S) úColumnProperty.Comparatora€Produce boolean, comparison, and other operators for :class:`.ColumnProperty` attributes. See the documentation for :class:`.PropComparator` for a brief overview. .. seealso:: :class:`.PropComparator` :class:`.ColumnOperators` :ref:`types_operators` :attr:`.TypeEngine.comparator_factory` )rKrÚ expressionscó¾—|jr%| |jjd¦«S|jjd |j|jdœ¦«S)Nr)rOÚ parentmapper)ÚadapterÚproprÚ _annotateÚ _parententityrJs r)Ú#_memoized_method___clause_element__z=ColumnProperty.Comparator._memoized_method___clause_element__:sb€ØŒ|ð Ø—|’| D¤IÔ$5°aÔ$8Ñ9Ô9Ð9ð”yÔ(¨Ô+×5Ò5à(,Ô(:Ø(,Ô(:ððñôðr+cór—| ¦«} |jS#t$r|jjcYSwxYw)z(The .info dictionary for this attribute.)rKrÚAttributeErrorrx)r;Úces r)Ú_memoized_attr_infoz-ColumnProperty.Comparator._memoized_attr_infoGsL€ð×(Ò(Ñ*Ô*ˆBð &Ø”w�øÝ!ð &ð &ð &Ø”y”~Ð%Ð%Ð%ð &øøøs –�6µ6cór‡—‰jrˆfd„‰jjD¦«Sˆfd„‰jjD¦«S)z¡The full sequence of columns referenced by this attribute, adjusted for any aliasing in progress. .. versionadded:: 1.3.17 có:•—g|]}‰ |¦«‘ŒSr$)rw©r'r=r;s €r)r*zHColumnProperty.Comparator._memoized_attr_expressions..Xs%ø€ÐGÐGÐG¨c˜Ÿ š  SÑ)Ô)ÐGÐGÐGr+cój•—g|]/}| ‰j‰j‰jjdœ¦«‘Œ0S))rOrvÚorm_key)ryrzrxrEr‚s €r)r*zHColumnProperty.Comparator._memoized_attr_expressions..\sVø€ð ð ð ðð—M’Mà,0Ô,>Ø,0Ô,>Ø'+¤y¤}ððñôð ð ð r+)rwrxrrJs`r)Ú_memoized_attr_expressionsz4ColumnProperty.Comparator._memoized_attr_expressionsPs`ø€ðŒ|ð ØGÐGÐGÐG°T´YÔ5FÐGÑGÔGÐGð ð ð ð ð $œyÔ0ð ñ ô ð r+cóF—t| ¦«|¦«S)z‡proxy attribute access down to the mapped column. this allows user-defined comparison methods to be accessed. )r4rK)r;rEs r)Ú_fallback_getattrz+ColumnProperty.Comparator._fallback_getattrgs €õ ˜4×2Ò2Ñ4Ô4°cÑ:Ô:Ð :r+có>—|| ¦«g|¢Ri|¤ŽSr?)rK)r;ÚopÚotherr<s r)Úoperatez!ColumnProperty.Comparator.operatens.€Ø�2�d×-Ò-Ñ/Ô/ÐB°%ÐBÐBÐB¸6ÐBÐBÐ Br+c óf—| ¦«}|| ||¦«|fi|¤ŽSr?)rKÚ _bind_param)r;r‰rŠr<r=s r)Úreverse_operatez)ColumnProperty.Comparator.reverse_operateqs;€Ø×)Ò)Ñ+Ô+ˆCØ�2�c—o’o b¨%Ñ0Ô0°#Ð@Ð@¸Ð@Ð@Ð @r+N) r6Ú __module__Ú __qualname__Ú__doc__Ú __slots__r{rr…r‡r‹rŽr$r+r)r2rs%sˆ€€€€€ð ð ð$@ˆ ð ð ð ð &ð &ð &ð ð ð ð. ;ð ;ð ;ð Cð Cð Cð Að Að Að Að Ar+r2cóT—t|jjj¦«dz|jzS)Nú.)ÚstrrBrQr6rErJs r)Ú__str__zColumnProperty.__str__us$€Ý�4”;Ô%Ô.Ñ/Ô/°#Ñ5¸¼Ñ@Ð@r+)r6r�r�r‘Ústrategy_wildcard_keyr’r Údeprecated_paramsr/Ú dependenciesrHrKÚpropertyr rSrUr\rÚ PASSIVE_OFFrbrqÚ MemoizedSlotsrr2r–Ú __classcell__)r1s@r)rrs�ø€€€€€ððð %Ðð€Ið(€TÔð ðñôðw ðw ðw ðw ñôðw ðr€TÔÐ-Ð/JÑKÔKð ð ñLÔKð ððððððñ„Xðð*  ð  ð  ð ð ð ð ð ð ð ð ð-7Ô,Bð ð ð ð ðððð4NAðNAðNAðNAðNA�TÔ'¨ñNAôNAðNAð`AðAðAðAðAðAðAr+N)r‘Ú __future__rÚrÚ interfacesrrr rr Úsqlr Ú__all__Ú class_loggerrr$r+r)úr¤sðððð 'Ð&Ð&Ð&Ð&Ð&àÐÐÐÐÐØ&Ð&Ð&Ð&Ð&Ð&Ø+Ð+Ð+Ð+Ð+Ð+Ø&Ð&Ð&Ð&Ð&Ð&ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐð Ð €ðÔðYAðYAðYAðYAðYAÐ(ñYAôYAñÔðYAðYAðYAr+