U a@szdZddlmZddlmZddlmZddlmZddlmZGdd d ej Z Gd d d eZ Gd d d eZ e Z dS)a .. dialect:: postgresql+pypostgresql :name: py-postgresql :dbapi: pypostgresql :connectstring: postgresql+pypostgresql://user:password@host:port/dbname[?key=value&key=value...] :url: https://python.projects.pgfoundry.org/ .. note:: The pypostgresql dialect is **not tested as part of SQLAlchemy's continuous integration** and may have unresolved issues. The recommended PostgreSQL driver is psycopg2. .. deprecated:: 1.4 The py-postgresql DBAPI is deprecated and will be removed in a future version. This DBAPI is superseded by the external version available at external-dialect_. Please use the external version or one of the supported DBAPIs to connect to PostgreSQL. .. TODO update link .. _external-dialect: https://github.com/PyGreSQL ) PGDialect)PGExecutionContext) processors)types)utilc@seZdZddZddZdS) PGNumericcCstjSN)rZto_str)selfdialectr lC:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-nyjtotrf\sqlalchemy\dialects\postgresql\pypostgresql.pybind_processor&szPGNumeric.bind_processorcCs|jr dStjSdSr )Z asdecimalrZto_float)r r Zcoltyper r r result_processor)szPGNumeric.result_processorN)__name__ __module__ __qualname__rrr r r r r%src@s eZdZdS)PGExecutionContext_pypostgresqlN)rrrr r r r r0src @seZdZdZdZdZdZdZdZdZ dZ e Z e ejejeejejiZeddZdd d d d d dddg Ze jddZddZddZdS)PGDialect_pypostgresqlZ pypostgresqlTNZpyformatFcCsddlm}tjddd|S)N)dbapi20zThe py-postgresql DBAPI is deprecated and will be removed in a future version. This DBAPI is superseded by the externalversion available at https://github.com/PyGreSQL. Please use one of the supported DBAPIs to connect to PostgreSQL.z1.4)version)Zpostgresql.driverrrZwarn_deprecated)clsrr r r dbapiLs  zPGDialect_pypostgresql.dbapiErrorZInterfaceErrorZ DatabaseErrorZ DataErrorZOperationalErrorZIntegrityErrorZ InternalErrorZProgrammingErrorZNotSupportedErrorcs&jdkriStfddjDS)Nc3s |]}tj|j|fVqdSr )getattrrr).0namer r r lszIPGDialect_pypostgresql.dbapi_exception_translation_map..)rdict_DBAPI_ERROR_NAMESrr rr dbapi_exception_translation_mapgs   z6PGDialect_pypostgresql.dbapi_exception_translation_mapcCsB|jdd}d|kr&t|d|d<nd|d<||jg|fS)Nuser)usernameporti8)Ztranslate_connect_argsintupdatequery)r urloptsr r r create_connect_argsqs   z*PGDialect_pypostgresql.create_connect_argscCs dt|kS)Nzconnection is closed)str)r e connectioncursorr r r is_disconnectzsz$PGDialect_pypostgresql.is_disconnect)rrrZdriverZsupports_statement_cacheZsupports_unicode_statementsZsupports_unicode_bindsZdescription_encodingZdefault_paramstyleZsupports_sane_rowcountZsupports_sane_multi_rowcountrZexecution_ctx_clsrZ update_copyrZcolspecssqltypesNumericrZFloat classmethodrr!Zmemoized_propertyr"r+r0r r r r r4sB     rN)__doc__baserrrrr1rr2rrrr r r r r s      J