PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php:1) in /home/u866776246/domains/wisatalogung.com/public_html/uploads/produk/1775157541_x.php on line 131
 ec@sdZddlmZddlmZddlmZddlmZddlmZddlmZddlmZ dd l m Z dd l m Z dd l m Z dd l mZdd l mZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddl"m#Z#ddl"m$Z$d dlmZej%e&Z'd!d"Z(d#e eeefd$YZ)d%efd&YZ*d'efd(YZ+d)e,fd*YZ-e-Z.e-je._e-d+e/Z0d,e)fd-YZ1d.e$fd/YZ2d0ej3e2e1fd1YZ4e(d2ee(d3ed4e4fd5YZ5d6e4fd7YZ6d8e4fd9YZ7d:e7fd;YZ8d<e7fd=YZ9d>e7fd?YZ:d@e7fdAYZ;dBe4fdCYZ<dDe4fdEYZ=dFe4fdGYZ>dHe4fdIYZ?dJe4fdKYZ@dLe6fdMYZAdNe6fdOYZBdPe6fdQYZCdRe6fdSYZDdTe6fdUYZEdVe6fdWYZFdXe6fdYYZGdZe6fd[YZHd\e6fd]YZId^e4fd_YZJd`e4fdaYZKdbeKfdcYZLddeKfdeYZMdfeKfdgYZNdhe4fdiYZOdje4fdkYZPdle4fdmYZQdne4fdoYZRdpe4fdqYZSdre4fdsYZTdte4fduYZUdvS(ws6SQL function API, factories, and built-in functions. i(t annotation(t coercions(t operators(troles(tschema(tsqltypes(tutil(t_entity_namespace(tColumnCollection(t Executable(t Generative(t HasMemoized(t_type_from_args(tBinaryExpression(t BindParameter(tCast(t ClauseList(t ColumnElement(tExtract(tFunctionFilter(tGrouping(tliteral_column(t NamedColumn(tOver(t WithinGroup(t FromClause(tSelect(tTableValuedAlias(tInternalTraversal(tTraversibleTypeit_defaultcCsRt|}tj|j}||krDtjdj|n|||>> from sqlalchemy import func, select >>> fn = func.jsonb_each("{'k', 'v'}").scalar_table_valued("key") >>> print(select(fn)) SELECT (jsonb_each(:jsonb_each_1)).key .. versionadded:: 1.4.0b2 .. seealso:: :meth:`_functions.FunctionElement.table_valued` :meth:`_functions.FunctionElement.alias` :meth:`_functions.FunctionElement.column_valued` (tScalarFunctionColumn(R:R-ttype_((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytscalar_table_valuedscOs|j}|jdd}|jdd}|jdd}|ra||f7}t|_ntj||_|_|j d|d|S(sS Return a :class:`_sql.TableValuedAlias` representation of this :class:`_functions.FunctionElement` with table-valued expressions added. e.g.:: >>> fn = ( ... func.generate_series(1, 5). ... table_valued("value", "start", "stop", "step") ... ) >>> print(select(fn)) SELECT anon_1.value, anon_1.start, anon_1.stop, anon_1.step FROM generate_series(:generate_series_1, :generate_series_2) AS anon_1 >>> print(select(fn.c.value, fn.c.stop).where(fn.c.value > 2)) SELECT anon_1.value, anon_1.stop FROM generate_series(:generate_series_1, :generate_series_2) AS anon_1 WHERE anon_1.value > :value_1 A WITH ORDINALITY expression may be generated by passing the keyword argument "with_ordinality":: >>> fn = func.generate_series(4, 1, -1).table_valued("gen", with_ordinality="ordinality") >>> print(select(fn)) SELECT anon_1.gen, anon_1.ordinality FROM generate_series(:generate_series_1, :generate_series_2, :generate_series_3) WITH ORDINALITY AS anon_1 :param \*expr: A series of string column names that will be added to the ``.c`` collection of the resulting :class:`_sql.TableValuedAlias` construct as columns. :func:`_sql.column` objects with or without datatypes may also be used. :param name: optional name to assign to the alias name that's generated. If omitted, a unique anonymizing name is used. :param with_ordinality: string name that when present results in the ``WITH ORDINALITY`` clause being added to the alias, and the given string name will be added as a column to the .c collection of the resulting :class:`_sql.TableValuedAlias`. :param joins_implicitly: when True, the table valued function may be used in the FROM clause without any explicit JOIN to other tables in the SQL query, and no "cartesian product" warning will be generated. May be useful for SQL functions such as ``func.json_each()``. .. versionadded:: 1.4.33 .. versionadded:: 1.4.0b2 .. seealso:: :ref:`tutorial_functions_table_valued` - in the :ref:`unified_tutorial` :ref:`postgresql_table_valued` - in the :ref:`postgresql_toplevel` documentation :meth:`_functions.FunctionElement.scalar_table_valued` - variant of :meth:`_functions.FunctionElement.table_valued` which delivers the complete table valued expression as a scalar column expression :meth:`_functions.FunctionElement.column_valued` :meth:`_sql.TableValuedAlias.render_derived` - renders the alias using a derived column clause, e.g. ``AS name(col1, col2, ...)`` twith_ordinalitytjoins_implicitlyR-N( t _generatetpopR4R8R+RtTableValueTypettypeR,talias(R:texprtkwtnew_funcRKRLR-((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt table_valuedsD   cCs|jd|d|jS(s%Return this :class:`_functions.FunctionElement` as a column expression that selects from itself as a FROM clause. E.g.:: >>> from sqlalchemy import select, func >>> gs = func.generate_series(1, 5, -1).column_valued() >>> print(select(gs)) SELECT anon_1 FROM generate_series(:generate_series_1, :generate_series_2, :generate_series_3) AS anon_1 This is shorthand for:: gs = func.generate_series(1, 5, -1).alias().column :param name: optional name to assign to the alias name that's generated. If omitted, a unique anonymizing name is used. :param joins_implicitly: when True, the "table" portion of the column valued function may be a member of the FROM clause without any explicit JOIN to other tables in the SQL query, and no "cartesian product" warning will be generated. May be useful for SQL functions such as ``func.json_array_elements()``. .. versionadded:: 1.4.46 .. seealso:: :ref:`tutorial_functions_column_valued` - in the :ref:`unified_tutorial` :ref:`postgresql_column_valued` - in the :ref:`postgresql_toplevel` documentation :meth:`_functions.FunctionElement.table_valued` R-RL(RQtcolumn(R:R-RL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt column_valueds%cCs,tdg|jD]}|j|f^qS(sThe set of columns exported by this :class:`.FunctionElement`. This is a placeholder collection that allows the function to be placed in the FROM clause of a statement:: >>> from sqlalchemy import column, select, func >>> stmt = select(column('x'), column('y')).select_from(func.myfunction()) >>> print(stmt) SELECT x, y FROM myfunction() The above form is a legacy feature that is now superseded by the fully capable :meth:`_functions.FunctionElement.table_valued` method; see that method for details. .. seealso:: :meth:`_functions.FunctionElement.table_valued` - generates table-valued SQL function expressions. tcolumns(Rt_all_selected_columnstkey(R:tcol((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRX)scCs1|jjr|jj}n|jdg}|S(N(RPt_is_table_valuet _elementstlabelR4(R:tcols((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRYDs cCs|jS(N(RX(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytexported_columnsMscCs |jjS(s}Return the underlying :class:`.ClauseList` which contains the arguments for this :class:`.FunctionElement`. (R*telement(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR;Qsc Cs"t|d|d|d|d|S(sAProduce an OVER clause against this function. Used against aggregate or so-called "window" functions, for database backends that support window functions. The expression:: func.row_number().over(order_by='x') is shorthand for:: from sqlalchemy import over over(func.row_number(), order_by='x') See :func:`_expression.over` for a full description. .. seealso:: :func:`_expression.over` :ref:`tutorial_window_functions` - in the :ref:`unified_tutorial` t partition_bytorder_bytrowstrange_(R(R:RbRcRdRe((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytoverYs cGs t||S(sProduce a WITHIN GROUP (ORDER BY expr) clause against this function. Used against so-called "ordered set aggregate" and "hypothetical set aggregate" functions, including :class:`.percentile_cont`, :class:`.rank`, :class:`.dense_rank`, etc. See :func:`_expression.within_group` for a full description. .. versionadded:: 1.1 .. seealso:: :ref:`tutorial_functions_within_group` - in the :ref:`unified_tutorial` (R(R:Rc((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt within_groupyscGs|s |St||S(sGProduce a FILTER clause against this function. Used against aggregate and window functions, for database backends that support the "FILTER" clause. The expression:: func.count(1).filter(True) is shorthand for:: from sqlalchemy import funcfilter funcfilter(func.count(1), True) .. versionadded:: 1.0.0 .. seealso:: :ref:`tutorial_functions_within_group` - in the :ref:`unified_tutorial` :class:`.FunctionFilter` :func:`.funcfilter` (R(R:t criterion((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytfilterscCst|||S(s^ Interpret this expression as a boolean comparison between two values. This method is used for an ORM use case described at :ref:`relationship_custom_operator_sql_function`. A hypothetical SQL function "is_equal()" which compares to values for equality would be written in the Core expression language as:: expr = func.is_equal("a", "b") If "is_equal()" above is comparing "a" and "b" for equality, the :meth:`.FunctionElement.as_comparison` method would be invoked as:: expr = func.is_equal("a", "b").as_comparison(1, 2) Where above, the integer value "1" refers to the first argument of the "is_equal()" function and the integer value "2" refers to the second. This would create a :class:`.BinaryExpression` that is equivalent to:: BinaryExpression("a", "b", operator=op.eq) However, at the SQL level it would still render as "is_equal('a', 'b')". The ORM, when it loads a related object or collection, needs to be able to manipulate the "left" and "right" sides of the ON clause of a JOIN expression. The purpose of this method is to provide a SQL function construct that can also supply this information to the ORM, when used with the :paramref:`_orm.relationship.primaryjoin` parameter. The return value is a containment object called :class:`.FunctionAsBinary`. An ORM example is as follows:: class Venue(Base): __tablename__ = 'venue' id = Column(Integer, primary_key=True) name = Column(String) descendants = relationship( "Venue", primaryjoin=func.instr( remote(foreign(name)), name + "/" ).as_comparison(1, 2) == 1, viewonly=True, order_by=name ) Above, the "Venue" class can load descendant "Venue" objects by determining if the name of the parent Venue is contained within the start of the hypothetical descendant value's name, e.g. "parent1" would match up to "parent1/child1", but not to "parent2/child1". Possible use cases include the "materialized path" example given above, as well as making use of special SQL functions such as geometric functions to create join conditions. :param left_index: the integer 1-based index of the function argument that serves as the "left" side of the expression. :param right_index: the integer 1-based index of the function argument that serves as the "right" side of the expression. .. versionadded:: 1.3 .. seealso:: :ref:`relationship_custom_operator_sql_function` - example use within the ORM (tFunctionAsBinary(R:t left_indext right_index((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt as_comparisonsHcCs |jjS(N(R;t _from_objects(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRnscCsdS(sFor types that define their return type as based on the criteria within a WITHIN GROUP (ORDER BY) expression, called by the :class:`.WithinGroup` construct. Returns None by default, in which case the function's normal ``.type`` is used. N(R4(R:Rg((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytwithin_group_types cCstj||d|jd|S(s Produce a :class:`_expression.Alias` construct against this :class:`.FunctionElement`. .. tip:: The :meth:`_functions.FunctionElement.alias` method is part of the mechanism by which "table valued" SQL functions are created. However, most use cases are covered by higher level methods on :class:`_functions.FunctionElement` including :meth:`_functions.FunctionElement.table_valued`, and :meth:`_functions.FunctionElement.column_valued`. This construct wraps the function in a named alias which is suitable for the FROM clause, in the style accepted for example by PostgreSQL. A column expression is also provided using the special ``.column`` attribute, which may be used to refer to the output of the function as a scalar value in the columns or where clause, for a backend such as PostgreSQL. For a full table-valued expression, use the :meth:`_functions.FunctionElement.table_valued` method first to establish named columns. e.g.:: >>> from sqlalchemy import func, select, column >>> data_view = func.unnest([1, 2, 3]).alias("data_view") >>> print(select(data_view.column)) SELECT data_view FROM unnest(:unnest_1) AS data_view The :meth:`_functions.FunctionElement.column_valued` method provides a shortcut for the above pattern:: >>> data_view = func.unnest([1, 2, 3]).column_valued("data_view") >>> print(select(data_view)) SELECT data_view FROM unnest(:unnest_1) AS data_view .. versionadded:: 1.4.0b2 Added the ``.column`` accessor :param name: alias name, will be rendered as ``AS `` in the FROM clause :param joins_implicitly: when True, the table valued function may be used in the FROM clause without any explicit JOIN to other tables in the SQL query, and no "cartesian product" warning will be generated. May be useful for SQL functions such as ``func.json_each()``. .. versionadded:: 1.4.33 .. seealso:: :ref:`tutorial_functions_table_valued` - in the :ref:`unified_tutorial` :meth:`_functions.FunctionElement.table_valued` :meth:`_functions.FunctionElement.scalar_table_valued` :meth:`_functions.FunctionElement.column_valued` ttable_value_typeRL(Rt _constructRP(R:R-RL((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRQs C cCs1tj|}|jr-|j|j}n|S(sProduce a :func:`_expression.select` construct against this :class:`.FunctionElement`. This is shorthand for:: s = select(function_element) (Rt_create_selectt_execution_optionsRF(R:ts((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytselectRs  s:meth:`.FunctionElement.scalar`t alternativesScalar execution in SQLAlchemy 2.0 is performed by the :meth:`_engine.Connection.scalar` method of :class:`_engine.Connection`, or in the ORM by the :meth:`.Session.scalar` method of :class:`.Session`.cCs|jjjS(sExecute this :class:`.FunctionElement` against an embedded 'bind' and return a scalar value. This first calls :meth:`~.FunctionElement.select` to produce a SELECT construct. Note that :class:`.FunctionElement` can be passed to the :meth:`.Connectable.scalar` method of :class:`_engine.Connection` or :class:`_engine.Engine`. (Rutexecutetscalar(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRx`ss :meth:`.FunctionElement.execute`sAll statement execution in SQLAlchemy 2.0 is performed by the :meth:`_engine.Connection.execute` method of :class:`_engine.Connection`, or in the ORM by the :meth:`.Session.execute` method of :class:`.Session`.cCs|jjS(sgExecute this :class:`.FunctionElement` against an embedded 'bind'. This first calls :meth:`~.FunctionElement.select` to produce a SELECT construct. Note that :class:`.FunctionElement` can be passed to the :meth:`.Connectable.execute` method of :class:`_engine.Connection` or :class:`_engine.Engine`. (RuRw(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRwvsc Ks+td|d|d|jdtd||S(Nt_compared_to_operatort_compared_to_typetuniqueRI(RR4RPR8(R:R/tobjRIRS((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt _bind_params cCsK|tjkr.t|jtjr.t|Stt|j d|SdS(Ntagainst( Rtgetitemt isinstanceRPRtARRAYRR@R)R9(R:R~((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR9s cCs t|jS(szoverrides FromClause.entity_namespace as functions are generally column expressions and not FromClauses. (RR*(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytentity_namespaces(N(+t__name__t __module__t__doc__Rtdp_clauseelementt dp_booleantdp_has_cache_keyt_traverse_internalst packagenamestFalseR5R+R4R,R?t_non_anon_labeltpropertyRARGRJRURWRXRYR`R tmemoized_attributeR;RfRgRiRmRnRoRQRuRt deprecated_20RxRwR}R9R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR)EsH      T'   J J  RjcBseZdejfdejfdejfdejfgZdZdZe dZ e j dZ e dZ e j d Z RS( t sql_functionRkRlt modifierscCstj|||S(N(Rt_gen_cache_key(R:tanon_mapt bindparams((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRscCsR||_||_||_tj|_tj|_d|_ t |_ i|_ dS(N(RRkRlRtfunction_as_comparison_opR/Rt BOOLEANTYPERPR4tnegateR8t_is_implicitly_booleanR(R:R%RkRl((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s       cCs|jjj|jdS(Ni(RR;Rk(R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytleftscCs||jjj|jd>> print(func.count(1)) count(:param_1) The returned object is an instance of :class:`.Function`, and is a column-oriented SQL element like any other, and is used in that way:: >>> print(select(func.count(table.c.id))) SELECT count(sometable.id) FROM sometable Any name can be given to :data:`.func`. If the function name is unknown to SQLAlchemy, it will be rendered exactly as is. For common SQL functions which SQLAlchemy is aware of, the name may be interpreted as a *generic function* which will be compiled appropriately to the target database:: >>> print(func.current_timestamp()) CURRENT_TIMESTAMP To call functions which are present in dot-separated packages, specify them in the same manner:: >>> print(func.stats.yield_curve(5, 10)) stats.yield_curve(:yield_curve_1, :yield_curve_2) SQLAlchemy can be made aware of the return type of functions to enable type-specific lexical and result-based behavior. For example, to ensure that a string-based function returns a Unicode value and is similarly treated as a string in expressions, specify :class:`~sqlalchemy.types.Unicode` as the type: >>> print(func.my_string(u'hi', type_=Unicode) + ' ' + ... func.my_string(u'there', type_=Unicode)) my_string(:my_string_1) || :my_string_2 || my_string(:my_string_3) The object returned by a :data:`.func` call is usually an instance of :class:`.Function`. This object meets the "column" interface, including comparison and labeling functions. The object can also be passed the :meth:`~.Connectable.execute` method of a :class:`_engine.Connection` or :class:`_engine.Engine`, where it will be wrapped inside of a SELECT statement first:: print(connection.execute(func.current_timestamp()).scalar()) In a few exception cases, the :data:`.func` accessor will redirect a name to a built-in expression such as :func:`.cast` or :func:`.extract`, as these names have well-known meaning but are not exactly the same as "functions" from a SQLAlchemy perspective. Functions which are interpreted as "generic" functions know how to calculate their return type automatically. For a listing of known generic functions, see :ref:`generic_functions`. .. note:: The :data:`.func` construct has only limited support for calling standalone "stored procedures", especially those with special parameterization concerns. See the section :ref:`stored_procedures` for details on how to use the DBAPI-level ``callproc()`` method for fully traditional stored procedures. .. seealso:: :ref:`tutorial_functions` - in the :ref:`unified_tutorial` :class:`.Function` cKsg|_||_dS(N(t_FunctionGenerator__namestopts(R:R((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?4s cCs|jdrAy|j|SWq`tk r=t|q`Xn|jdr`|dd!}nt|j}t|j|g|_|S(Nt__t_ii( t startswitht__dict__tKeyErrortAttributeErrortendswithRRtlistR(R:R-tf((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt __getattr__8s cOs|jj}|j|t|j}|dkrI|j\}}n)|dkrld|jd}}nd}|dk rt|j|j}|dk r|||Snt |jddt |jdd!||S(NiiRiiR( RtcopytupdatetlenRR4RtgetR!tFunctionttuple(R:R=R<tottokensR&tfnametfunc((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt__call__Fs     (RRRR?RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRsK  tgroupRcBs~eZdZdZejdejfdejfdej fgZe j Z e jdd dZd Zd d ZRS( sDescribe a named SQL function. The :class:`.Function` object is typically generated from the :data:`.func` generation object. :param \*clauses: list of column expressions that form the arguments of the SQL function call. :param type\_: optional :class:`.TypeEngine` datatype object that will be used as the return value of the column expression generated by this function call. :param packagenames: a string which indicates package prefix names to be prepended to the function name when the SQL is generated. The :data:`.func` generator creates these when it is called using dotted format, e.g.:: func.mypackage.some_function(col1, col2) .. seealso:: :ref:`tutorial_functions` - in the :ref:`unified_tutorial` :data:`.func` - namespace which produces registered or ad-hoc :class:`.Function` instances. :class:`.GenericFunction` - allows creation of registered function types. tfunctionRR-RPtbinds2.0s\The :paramref:`_sql.text.bind` argument is deprecated and will be removed in SQLAlchemy 2.0.cOsk|jddpd|_||_|j||_tj|jdd|_ t j |||dS(sConstruct a :class:`.Function`. The :data:`.func` construct is normally used to construct new :class:`.Function` instances. RRIN(( RNR4RR-t _get_bindt_bindRRRRPR)R?(R:R-R;RS((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s  cCs%d|kr!tjd|dSdS(NRsOThe Function.bind argument is deprecated and will be removed in SQLAlchemy 2.0.(Rtwarn_deprecated_20(R:RS((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs c Ks.t|j|d|d|jd|dt|S(NRyRzRIR{(RR-RPR8(R:R/R|RIRS((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR}s (s2.0s\The :paramref:`_sql.text.bind` argument is deprecated and will be removed in SQLAlchemy 2.0.N(RRRRR)RRRt dp_stringRRtNULLTYPERPRtdeprecated_paramsR?RR4R}(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRcs     t _GenericMetacBseZdZRS(cCstj|jkr|jd||_}|jd||_}|jdd}d|krr|d|_nt|dt |_ |j rt |||qt |_ nt t |j|||dS(NR-R$R&Rt__return_type__t _register(Rt Annotatedt__mro__RR-R$RNRPR3R8RR(R@RR?(tclstclsnametbasestclsdictR-R$R&((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s   (RRR?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstGenericFunctioncBs)eZdZeZeZeZdZRS(sK Define a 'generic' function. A generic function is a pre-established :class:`.Function` class that is instantiated automatically when called by name from the :data:`.func` attribute. Note that calling any name from :data:`.func` has the effect that a new :class:`.Function` instance is created automatically, given that name. The primary use case for defining a :class:`.GenericFunction` class is so that a function of a particular name may be given a fixed return type. It can also include custom argument parsing schemes as well as additional methods. Subclasses of :class:`.GenericFunction` are automatically registered under the name of the class. For example, a user-defined function ``as_utc()`` would be available immediately:: from sqlalchemy.sql.functions import GenericFunction from sqlalchemy.types import DateTime class as_utc(GenericFunction): type = DateTime inherit_cache = True print(select(func.as_utc())) User-defined generic functions can be organized into packages by specifying the "package" attribute when defining :class:`.GenericFunction`. Third party libraries containing many functions may want to use this in order to avoid name conflicts with other systems. For example, if our ``as_utc()`` function were part of a package "time":: class as_utc(GenericFunction): type = DateTime package = "time" inherit_cache = True The above function would be available from :data:`.func` using the package name ``time``:: print(select(func.time.as_utc())) A final option is to allow the function to be accessed from one name in :data:`.func` but to render as a different name. The ``identifier`` attribute will override the name used to access the function as loaded from :data:`.func`, but will retain the usage of ``name`` as the rendered name:: class GeoBuffer(GenericFunction): type = Geometry package = "geo" name = "ST_Buffer" identifier = "buffer" inherit_cache = True The above function will render as follows:: >>> print(func.geo.buffer()) ST_Buffer() The name will be rendered as is, however without quoting unless the name contains special characters that require quoting. To force quoting on or off for the name, use the :class:`.sqlalchemy.sql.quoted_name` construct:: from sqlalchemy.sql import quoted_name class GeoBuffer(GenericFunction): type = Geometry package = "geo" name = quoted_name("ST_Buffer", True) identifier = "buffer" inherit_cache = True The above function will render as:: >>> print(func.geo.buffer()) "ST_Buffer"() .. versionadded:: 1.3.13 The :class:`.quoted_name` construct is now recognized for quoting when used with the "name" attribute of the object, so that quoting can be forced on or off for the function name. c Os|jdd}|dkrXg|D]*}tjtj|d|jd|^q%}n|jpjt||_d|_ |j ||_ t dt jdt|j|_tj|jddpt|dd|_dS( Nt _parsed_argsR-R.R/R0RIRP((RNR4RR1RR2R-R5R6RRRRRR7R8R9R*RRR3RP(R:R>R<t parsed_argsR=((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?=s 7 ( RRRR8tcoerce_argumentsRRt inherit_cacheR?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs Ytcasttextractt next_valuecBsSeZdZejZdZdejfgZ dZ dZ e dZ RS(sRepresent the 'next value', given a :class:`.Sequence` as its single argument. Compiles into the appropriate function on each backend, or will raise NotImplementedError if used on a backend that does not provide support for sequences. RtsequencecKsdt|tjstd|j||_||_tj|j pWt |dd|_ dS(Ns0next_value() accepts a Sequence object as input.RP( RRtSequencetAssertionErrorRRRRRt data_typeR3R4RP(R:tseqRS((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?is  cKs%t|to$|jj|jjkS(N(RRRR-(R:totherRS((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pytcomparesscCsgS(N((R:((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRnys(RRRRtIntegerRPR-Rtdp_named_ddl_elementRR?RRRn(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRXs  t AnsiFunctioncBseZdZeZdZRS(sEDefine a function in "ansi" format, which doesn't render parenthesis.cOstj|||dS(N(RR?(R:R>R<((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s(RRRR8RR?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR~stReturnTypeFromArgscBseZdZeZdZRS(sADefine a function whose return type is the same as its arguments.c Ostg|D]*}tjtj|d|jd|^q}|jdt|||dR<R=((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s 4 (RRRR8RR?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstcoalescecBseZeZeZRS((RRR8R5R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstmaxcBseZdZeZRS(s!The SQL MAX() aggregate function.(RRRR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstmincBseZdZeZRS(s!The SQL MIN() aggregate function.(RRRR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstsumcBseZdZeZRS(s!The SQL SUM() aggregate function.(RRRR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstnowcBseZdZejZeZRS(sThe SQL now() datetime function. SQLAlchemy dialects will usually render this particular function in a backend-specific way, such as rendering it as ``CURRENT_TIMESTAMP``. (RRRRtDateTimeRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs tconcatcBseZdZejZeZRS(sThe SQL CONCAT() function, which concatenates strings. E.g.:: >>> print(select(func.concat('a', 'b'))) SELECT concat(:concat_2, :concat_3) AS concat_1 String concatenation in SQLAlchemy is more commonly available using the Python ``+`` operator with string datatypes, which will render a backend-specific concatenation operator, such as :: >>> print(select(literal("a") + "b")) SELECT :param_1 || :param_2 AS anon_1 (RRRRtStringRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs t char_lengthcBs&eZdZejZeZdZRS(sThe CHAR_LENGTH() SQL function.cKstj|||dS(N(RR?(R:targR<((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s( RRRRRRPR8RR?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs trandomcBseZdZeZeZRS(sThe RANDOM() SQL function.(RRRR8R5R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRstcountcBs)eZdZejZeZddZ RS(sThe ANSI COUNT aggregate function. With no arguments, emits COUNT \*. E.g.:: from sqlalchemy import func from sqlalchemy import select from sqlalchemy import table, column my_table = table('some_table', column('id')) stmt = select(func.count()).select_from(my_table) Executing ``stmt`` would emit:: SELECT count(*) AS count_1 FROM some_table cKs8|dkrtd}ntt|j||dS(Nt*(R4RR@RR?(R:t expressionR<((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?s N( RRRRRRPR8RR4R?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs t current_datecBseZdZejZeZRS(s The CURRENT_DATE() SQL function.(RRRRtDateRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs t current_timecBseZdZejZeZRS(s The CURRENT_TIME() SQL function.(RRRRtTimeRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR s tcurrent_timestampcBseZdZejZeZRS(s%The CURRENT_TIMESTAMP() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs t current_usercBseZdZejZeZRS(s The CURRENT_USER() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs t localtimecBseZdZejZeZRS(sThe localtime() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs tlocaltimestampcBseZdZejZeZRS(s"The localtimestamp() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR&s t session_usercBseZdZejZeZRS(s The SESSION_USER() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR-s tsysdatecBseZdZejZeZRS(sThe SYSDATE() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR4s tusercBseZdZejZeZRS(sThe USER() SQL function.(RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR;s t array_aggcBs&eZdZejZeZdZRS(sSupport for the ARRAY_AGG function. The ``func.array_agg(expr)`` construct returns an expression of type :class:`_types.ARRAY`. e.g.:: stmt = select(func.array_agg(table.c.values)[2:5]) .. versionadded:: 1.1 .. seealso:: :func:`_postgresql.array_agg` - PostgreSQL-specific version that returns :class:`_postgresql.ARRAY`, which has PG-specific operators added. cOsg|D]!}tjtj|d|^q}|jdtj}d|krt|}t|tjrz||dR<R=tdefault_array_typettype_from_args((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR?Ys+    ( RRRRRRPR8RR?(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRBs t OrderedSetAggcBs#eZdZeZeZdZRS(sDefine a function where the return type is based on the sort expression type as defined by the expression passed to the :meth:`.FunctionElement.within_group` method.cCs_|jj}tj|j}|jrPt|jdkrPtj |dj S|dj SdS(Nii( R*Ratsqlutiltunwrap_order_byRctarray_for_multi_clauseRR;RRRP(R:Rgt func_clausesRc((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRous  (RRRRRR8RRo(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRmstmodecBseZdZeZRS(s*Implement the ``mode`` ordered-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is the same as the sort expression. .. versionadded:: 1.1 (RRRR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR~s tpercentile_contcBseZdZeZeZRS(sImplement the ``percentile_cont`` ordered-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is the same as the sort expression, or if the arguments are an array, an :class:`_types.ARRAY` of the sort expression's type. .. versionadded:: 1.1 (RRRR8RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs tpercentile_disccBseZdZeZeZRS(sImplement the ``percentile_disc`` ordered-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is the same as the sort expression, or if the arguments are an array, an :class:`_types.ARRAY` of the sort expression's type. .. versionadded:: 1.1 (RRRR8RR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs trankcBs eZdZejZeZRS(s!Implement the ``rank`` hypothetical-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is :class:`.Integer`. .. versionadded:: 1.1 (RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR s  t dense_rankcBs eZdZejZeZRS(s'Implement the ``dense_rank`` hypothetical-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is :class:`.Integer`. .. versionadded:: 1.1 (RRRRRRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR s  t percent_rankcBs eZdZejZeZRS(s)Implement the ``percent_rank`` hypothetical-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is :class:`.Numeric`. .. versionadded:: 1.1 (RRRRtNumericRPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR s  t cume_distcBs eZdZejZeZRS(s&Implement the ``cume_dist`` hypothetical-set aggregate function. This function must be used with the :meth:`.FunctionElement.within_group` modifier to supply a sort expression to operate upon. The return type of this function is :class:`.Numeric`. .. versionadded:: 1.1 (RRRRR RPR8R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyR s  tcubecBseZdZeZeZRS(sSImplement the ``CUBE`` grouping operation. This function is used as part of the GROUP BY of a statement, e.g. :meth:`_expression.Select.group_by`:: stmt = select( func.sum(table.c.value), table.c.col_1, table.c.col_2 ).group_by(func.cube(table.c.col_1, table.c.col_2)) .. versionadded:: 1.2 (RRRR8R5R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs trollupcBseZdZeZeZRS(sWImplement the ``ROLLUP`` grouping operation. This function is used as part of the GROUP BY of a statement, e.g. :meth:`_expression.Select.group_by`:: stmt = select( func.sum(table.c.value), table.c.col_1, table.c.col_2 ).group_by(func.rollup(table.c.col_1, table.c.col_2)) .. versionadded:: 1.2 (RRRR8R5R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRs t grouping_setscBseZdZeZeZRS(sImplement the ``GROUPING SETS`` grouping operation. This function is used as part of the GROUP BY of a statement, e.g. :meth:`_expression.Select.group_by`:: stmt = select( func.sum(table.c.value), table.c.col_1, table.c.col_2 ).group_by(func.grouping_sets(table.c.col_1, table.c.col_2)) In order to group by multiple sets, use the :func:`.tuple_` construct:: from sqlalchemy import tuple_ stmt = select( func.sum(table.c.value), table.c.col_1, table.c.col_2, table.c.col_3 ).group_by( func.grouping_sets( tuple_(table.c.col_1, table.c.col_2), tuple_(table.c.value, table.c.col_3), ) ) .. versionadded:: 1.2 (RRRR8R5R(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyRsN(VRtRRRRRRRRtbaseRRR R R telementsR R RRRRRRRRRRRt selectableRRRtvisitorsRRt defaultdicttdictRR(R)RjRHtobjectRRRtmodifierRRtwith_metaclassRRRRRRRRRRRRRRRRRRRRRRRRRRRR R R R RRR(((sK/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/functions.pyt s k'v  d"v  &   +