HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyc
�
���ec@svddlmZddlmZddlmZddlmZddlmZdej	fd	��YZ
d
�ZdS(i����(t
attrgetteri(tbase(turli(tutil(tddltMockConnectioncBs�eZd�Zed��Zeed��Zed��Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
dd
�Zd�ZRS(
cCs||_||_dS(N(t_dialecttexecute(tselftdialectR((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyt__init__s	cCs|S(N((ts((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyt<lambda>tRcCs
|jjS(N(Rtname(R((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyRR
cCs|jS(N(tschema(Rtobj((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pytschema_for_objectscKs|S(N((Rtkwargs((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pytconnectscKs|S(N((Rtkw((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pytexecution_optionsscKs|jj||d||�S(Ntengine(Rtcompiler(Rt	statementt
parametersR((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyR"s	cKs-t|d<tj|j||�j|�dS(Nt
checkfirst(tFalseRtSchemaGeneratorR	ttraverse_single(RtentityR((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pytcreate's
cKs-t|d<tj|j||�j|�dS(NR(RRt
SchemaDropperR	R(RRR((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pytdrop.s
cKs*t|d<||j||�j|�dS(NR(RR	R(Rtvisitorcallabletelementt
connectionR((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyt_run_ddl_visitor3s
cOs
t��dS(N(tNotImplementedError(Rtobject_tmultiparamstparams((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyR9sN(t__name__t
__module__R
tpropertyRRR	RRRRRRR!tNoneR%R(((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyRs							cKsvtj|�}|j�}i}x9tj|�D](}||kr1|j|�||<q1q1W||�}t||�S(s Create a "mock" engine used for echoing DDL.

    This is a utility function used for debugging or storing the output of DDL
    sequences as generated by :meth:`_schema.MetaData.create_all`
    and related methods.

    The function accepts a URL which is used only to determine the kind of
    dialect to be used, as well as an "executor" callable function which
    will receive a SQL expression object and parameters, which can then be
    echoed or otherwise printed.   The executor's return value is not handled,
    nor does the engine allow regular string statements to be invoked, and
    is therefore only useful for DDL that is sent to the database without
    receiving any results.

    E.g.::

        from sqlalchemy import create_mock_engine

        def dump(sql, *multiparams, **params):
            print(sql.compile(dialect=engine.dialect))

        engine = create_mock_engine('postgresql://', dump)
        metadata.create_all(engine, checkfirst=False)

    :param url: A string URL which typically needs to contain only the
     database backend name.

    :param executor: a callable which receives the arguments ``sql``,
     ``*multiparams`` and ``**params``.  The ``sql`` parameter is typically
     an instance of :class:`.DDLElement`, which can then be compiled into a
     string using :meth:`.DDLElement.compile`.

    .. versionadded:: 1.4 - the :func:`.create_mock_engine` function replaces
       the previous "mock" engine strategy used with
       :func:`_sa.create_engine`.

    .. seealso::

        :ref:`faq_ddl_as_string`

    (t_urltmake_urltget_dialectRtget_cls_kwargstpopR(RtexecutorRtutdialect_clstdialect_argstkR	((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pytcreate_mock_engine=s,N(toperatorRR
RRR.RtsqlRtConnectableRR8(((sG/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/engine/mock.pyt<module>s-