%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/227033/root/opt/alt/python27/lib64/python2.7/site-packages/psycopg2/
Upload File :
Create Path :
Current File : //proc/227033/root/opt/alt/python27/lib64/python2.7/site-packages/psycopg2/__init__.pyo

�
Tc
@s�dZddlmZmZmZmZmZddlmZmZm	Z	m
Z
ddlmZmZm
Z
ddlmZmZmZmZmZddlmZmZmZddlmZmZddlmZmZmZmZdd	lmZdd
lmZddlj Z!e!j"e#e!j$�e!j"e%d�e!j'�yddl(m)Z)Wne*k
rjn'Xddlm)Z+e!j"e)e+�[)[+ddl,Z,e,j-d
�e,j-d�d�Z.[,dddddddde/d�	Z0dS(s�A Python driver for PostgreSQL

psycopg is a PostgreSQL_ database adapter for the Python_ programming
language. This is version 2, a complete rewrite of the original code to
provide new-style classes for connection and cursor objects and other sweet
candies. Like the original, psycopg 2 was written with the aim of being very
small and fast, and stable as a rock.

Homepage: http://initd.org/projects/psycopg2

.. _PostgreSQL: http://www.postgresql.org/
.. _Python: http://www.python.org/

:Groups:
  * `Connections creation`: connect
  * `Value objects constructors`: Binary, Date, DateFromTicks, Time,
    TimeFromTicks, Timestamp, TimestampFromTicks
i����(tBINARYtNUMBERtSTRINGtDATETIMEtROWID(tBinarytDatetTimet	Timestamp(t
DateFromTickst
TimeFromTickstTimestampFromTicks(tErrortWarningt	DataErrort
DatabaseErrortProgrammingError(tIntegrityErrortInterfaceErrort
InternalError(tNotSupportedErrortOperationalError(t_connecttapileveltthreadsafetyt
paramstyle(t__version__(ttzN(tDecimals([\\'])s\scCs@|s
dS|jd|�}|j|�r<d|d}n|S(s9
    Apply the escaping rule required by PQconnectdb
    s''s\\\1t'(tsubtsearch(tst	re_escapetre_space((sD/opt/alt/python27/lib64/python2.7/site-packages/psycopg2/__init__.pyt
_param_escapeUsc		Ks�g}
|d
k	r(|
jd|f�n|d
k	rJ|
jd|f�n|d
k	rl|
jd|f�n|d
k	r�|
jd|f�n|d
k	r�|
jd|f�n|
jg|	j�D]$\}}|d
k	r�||f^q��|d
k	r|
rtd|
dd��n|d
kr}|
s<td��q}d	jg|
D](\}}d
|tt|��f^qI�}nt|d|d|�}
|d
k	r�||
_	n|
S(s�
    Create a new database connection.

    The connection parameters can be specified either as a string:

        conn = psycopg2.connect("dbname=test user=postgres password=secret")

    or using a set of keyword arguments:

        conn = psycopg2.connect(database="test", user="postgres", password="secret")

    The basic connection parameters are:

    - *dbname*: the database name (only in dsn string)
    - *database*: the database name (only as keyword argument)
    - *user*: user name used to authenticate
    - *password*: password used to authenticate
    - *host*: database host address (defaults to UNIX socket if not provided)
    - *port*: connection port number (defaults to 5432 if not provided)

    Using the *connection_factory* parameter a different class or connections
    factory can be specified. It should be a callable object taking a dsn
    argument.

    Using the *cursor_factory* parameter, a new default cursor factory will be
    used by cursor().

    Using *async*=True an asynchronous connection will be created.

    Any other keyword parameter will be passed to the underlying client
    library: the list of supported parameters depends on the library version.

    tdbnametusertpasswordthosttports='%s' is an invalid keyword argument when the dsn is specifiedismissing dsn and no parameterst s%s=%stconnection_factorytasyncN(
tNonetappendtextendt	iteritemst	TypeErrortjoinR#tstrRtcursor_factory(tdsntdatabaseR%R&R'R(R*R3R+tkwargstitemstktvtconn((sD/opt/alt/python27/lib64/python2.7/site-packages/psycopg2/__init__.pytconnectfs2$>	8(1t__doc__tpsycopg2._psycopgRRRRRRRRRR	R
RRR
RRRRRRRRRRRRRtpsycopg2Rtpsycopg2.extensionst
extensionst_exttregister_adapterttupletSQL_INttypeR,tNoneAdaptertdecimalRtImportErrortAdaptertretcompileR#tFalseR;(((sD/opt/alt/python27/lib64/python2.7/site-packages/psycopg2/__init__.pyt<module>s4 ("("


Zerion Mini Shell 1.0