Server IP : 85.214.239.14 / Your IP : 18.218.177.226 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/self/root/srv/automx/env/lib/python3.5/site-packages/sqlalchemy/dialects/postgresql/ |
Upload File : |
# postgresql/zxjdbc.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: postgresql+zxjdbc :name: zxJDBC for Jython :dbapi: zxjdbc :connectstring: postgresql+zxjdbc://scott:tiger@localhost/db :driverurl: http://jdbc.postgresql.org/ """ from .base import PGDialect from .base import PGExecutionContext from ...connectors.zxJDBC import ZxJDBCConnector class PGExecutionContext_zxjdbc(PGExecutionContext): def create_cursor(self): cursor = self._dbapi_connection.cursor() cursor.datahandler = self.dialect.DataHandler(cursor.datahandler) return cursor class PGDialect_zxjdbc(ZxJDBCConnector, PGDialect): jdbc_db_name = "postgresql" jdbc_driver_name = "org.postgresql.Driver" execution_ctx_cls = PGExecutionContext_zxjdbc supports_native_decimal = True def __init__(self, *args, **kwargs): super(PGDialect_zxjdbc, self).__init__(*args, **kwargs) from com.ziclix.python.sql.handler import PostgresqlDataHandler self.DataHandler = PostgresqlDataHandler def _get_server_version_info(self, connection): parts = connection.connection.dbversion.split(".") return tuple(int(x) for x in parts) dialect = PGDialect_zxjdbc