Hacked By AnonymousFox
�
�܋fk� � � � d Z ddlmZ ddlmZ ddlmZ G d� de� � Z G d� de� � Z G d � d
e� � Z G d� de� � Z
G d
� de� � ZdS )z1Define core interfaces used by the engine system.� )�util)�Compiled)�TypeCompilerc �� � e Zd ZdZdZd� Zed� � � Zd� Zd� Z d8d�Z
ej d d
� � d8d�� � Z
d8d�Zd8d
�Zd8d�Zd8d�Zd8d�Zd8d�Zd8d�Zd8d�Z d8d�Zd8d�Zd8d�Zd� Zd� Zd8d�Zd8d�Zd� Zd� Zd� Zd� Z d� Z!d � Z"d!� Z#d"� Z$d#� Z%d$� Z&d%� Z'd&� Z( d9d(�Z) d9d)�Z*d*� Z+d8d+�Z,d8d,�Z- d8d-�Z.d.� Z/d/� Z0d0� Z1d1� Z2d2� Z3d3� Z4d4� Z5ed5� � � Z6ed6� � � Z7ed7� � � Z8dS ):�Dialecta� Define the behavior of a specific database and DB-API combination.
Any aspect of metadata definition, SQL query generation,
execution, result-set handling, or anything else which varies
between databases is defined under the general category of the
Dialect. The Dialect acts as a factory for other
database-specific object implementations including
ExecutionContext, Compiled, DefaultGenerator, and TypeEngine.
.. note:: Third party dialects should not subclass :class:`.Dialect`
directly. Instead, subclass :class:`.default.DefaultDialect` or
descendant class.
All dialects include the following attributes. There are many other
attributes that may be supported as well:
``name``
identifying name for the dialect from a DBAPI-neutral point of view
(i.e. 'sqlite')
``driver``
identifying name for the dialect's DBAPI
``positional``
True if the paramstyle for this Dialect is positional.
``paramstyle``
the paramstyle to be used (some DB-APIs support multiple
paramstyles).
``encoding``
type of encoding to use for unicode, usually defaults to
'utf-8'.
``statement_compiler``
a :class:`.Compiled` class used to compile SQL statements
``ddl_compiler``
a :class:`.Compiled` class used to compile DDL statements
``server_version_info``
a tuple containing a version number for the DB backend in use.
This value is only available for supporting dialects, and is
typically populated during the initial connection to the database.
``default_schema_name``
the name of the default schema. This value is only available for
supporting dialects, and is typically populated during the
initial connection to the database.
``execution_ctx_cls``
a :class:`.ExecutionContext` class used to handle statement execution
``execute_sequence_format``
either the 'tuple' or 'list' type, depending on what cursor.execute()
accepts for the second argument (they vary).
``preparer``
a :class:`~sqlalchemy.sql.compiler.IdentifierPreparer` class used to
quote identifiers.
``supports_alter``
``True`` if the database supports ``ALTER TABLE`` - used only for
generating foreign key constraints in certain circumstances
``max_identifier_length``
The maximum length of identifier names.
``supports_sane_rowcount``
Indicate whether the dialect properly implements rowcount for
``UPDATE`` and ``DELETE`` statements.
``supports_sane_multi_rowcount``
Indicate whether the dialect properly implements rowcount for
``UPDATE`` and ``DELETE`` statements when executed via
executemany.
``preexecute_autoincrement_sequences``
True if 'implicit' primary key functions must be executed separately
in order to get their value. This is currently oriented towards
PostgreSQL.
``implicit_returning``
use RETURNING or equivalent during INSERT execution in order to load
newly generated primary keys and other column defaults in one execution,
which are then available via inserted_primary_key.
If an insert statement has returning() specified explicitly,
the "implicit" functionality is not used and inserted_primary_key
will not be available.
``colspecs``
A dictionary of TypeEngine classes from sqlalchemy.types mapped
to subclasses that are specific to the dialect class. This
dictionary is class-level only and is not accessed from the
dialect instance itself.
``supports_default_values``
Indicates if the construct ``INSERT INTO tablename DEFAULT
VALUES`` is supported
``supports_sequences``
Indicates if the dialect supports CREATE SEQUENCE or similar.
``sequences_optional``
If True, indicates if the "optional" flag on the Sequence() construct
should signal to not generate a CREATE SEQUENCE. Applies only to
dialects that support sequences. Currently used only to allow PostgreSQL
SERIAL to be used on a column that specifies Sequence() for usage on
other backends.
``supports_native_enum``
Indicates if the dialect supports a native ENUM construct.
This will prevent types.Enum from generating a CHECK
constraint when that type is used.
``supports_native_boolean``
Indicates if the dialect supports a native boolean construct.
This will prevent types.Boolean from generating a CHECK
constraint when that type is used.
``dbapi_exception_translation_map``
A dictionary of names that will contain as values the names of
pep-249 exceptions ("IntegrityError", "OperationalError", etc)
keyed to alternate class names, to support the case where a
DBAPI has exception classes that aren't named as they are
referred to (e.g. IntegrityError = MyException). In the vast
majority of cases this dictionary is empty.
.. versionadded:: 1.0.5
Fc � � t � � �)a� Build DB-API compatible connection arguments.
Given a :class:`.URL` object, returns a tuple
consisting of a ``(*args, **kwargs)`` suitable to send directly
to the dbapi's connect function. The arguments are sent to the
:meth:`.Dialect.connect` method which then runs the DBAPI-level
``connect()`` function.
The method typically makes use of the
:meth:`.URL.translate_connect_args`
method in order to generate a dictionary of options.
The default implementation is::
def create_connect_args(self, url):
opts = url.translate_connect_args()
opts.update(url.query)
return [[], opts]
:param url: a :class:`.URL` object
:return: a tuple of ``(*args, **kwargs)`` which will be passed to the
:meth:`.Dialect.connect` method.
.. seealso::
:meth:`.URL.translate_connect_args`
��NotImplementedError)�self�urls �S/opt/cloudlinux/venv/lib64/python3.11/site-packages/sqlalchemy/engine/interfaces.py�create_connect_argszDialect.create_connect_args� � � �>