관리-도구
편집 파일: mxodbc.cpython-37.pyc
B ��4] � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z d d l mZ d dl mZ G dd � d e�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd� de �ZG dd� dee�ZeZdS )a> .. dialect:: mssql+mxodbc :name: mxODBC :dbapi: mxodbc :connectstring: mssql+mxodbc://<username>:<password>@<dsnname> :url: http://www.egenix.com/ Execution Modes --------------- mxODBC features two styles of statement execution, using the ``cursor.execute()`` and ``cursor.executedirect()`` methods (the second being an extension to the DBAPI specification). The former makes use of a particular API call specific to the SQL Server Native Client ODBC driver known SQLDescribeParam, while the latter does not. mxODBC apparently only makes repeated use of a single prepared statement when SQLDescribeParam is used. The advantage to prepared statement reuse is one of performance. The disadvantage is that SQLDescribeParam has a limited set of scenarios in which bind parameters are understood, including that they cannot be placed within the argument lists of function calls, anywhere outside the FROM, or even within subqueries within the FROM clause - making the usage of bind parameters within SELECT statements impossible for all but the most simplistic statements. For this reason, the mxODBC dialect uses the "native" mode by default only for INSERT, UPDATE, and DELETE statements, and uses the escaped string mode for all other statements. This behavior can be controlled via :meth:`~sqlalchemy.sql.expression.Executable.execution_options` using the ``native_odbc_execute`` flag with a value of ``True`` or ``False``, where a value of ``True`` will unconditionally use native bind parameters and a value of ``False`` will unconditionally use string-escaped parameters. � )�_MSDate)�_MSDateTime)�_MSTime)� MSDialect)� VARBINARY)�_MSNumeric_pyodbc)�MSExecutionContext_pyodbc� )�types)�MxODBCConnectorc @ s e Zd ZdZdS )�_MSNumeric_mxodbcz(Include pyodbc's numeric processor. N)�__name__� __module__�__qualname__�__doc__� r r �S/opt/alt/python37/lib64/python3.7/site-packages/sqlalchemy/dialects/mssql/mxodbc.pyr 9 s r c @ s e Zd Zdd� ZdS )�_MSDate_mxodbcc C s dd� }|S )Nc S s$ | d k rd| j | j| jf S d S d S )Nz%s-%s-%s)�year�month�day)�valuer r r �process@ s z._MSDate_mxodbc.bind_processor.<locals>.processr )�self�dialectr r r r �bind_processor? s z_MSDate_mxodbc.bind_processorN)r r r r r r r r r >