diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-08-06 21:11:27 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2009-08-06 21:11:27 +0000 |
| commit | 8fc5005dfe3eb66a46470ad8a8c7b95fc4d6bdca (patch) | |
| tree | ae9e27d12c9fbf8297bb90469509e1cb6a206242 /lib/sqlalchemy/dialects/postgresql/zxjdbc.py | |
| parent | 7638aa7f242c6ea3d743aa9100e32be2052546a6 (diff) | |
| download | sqlalchemy-8fc5005dfe3eb66a46470ad8a8c7b95fc4d6bdca.tar.gz | |
merge 0.6 series to trunk.
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/zxjdbc.py')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/zxjdbc.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/zxjdbc.py b/lib/sqlalchemy/dialects/postgresql/zxjdbc.py new file mode 100644 index 000000000..b707d2d9e --- /dev/null +++ b/lib/sqlalchemy/dialects/postgresql/zxjdbc.py @@ -0,0 +1,28 @@ +"""Support for the PostgreSQL database via the zxjdbc JDBC connector. + +JDBC Driver +----------- + +The official Postgresql JDBC driver is at http://jdbc.postgresql.org/. + +""" +from sqlalchemy.connectors.zxJDBC import ZxJDBCConnector +from sqlalchemy.dialects.postgresql.base import PGCompiler, PGDialect + +class PostgreSQL_jdbcCompiler(PGCompiler): + + def post_process_text(self, text): + # Don't escape '%' like PGCompiler + return text + + +class PostgreSQL_jdbc(ZxJDBCConnector, PGDialect): + statement_compiler = PostgreSQL_jdbcCompiler + + jdbc_db_name = 'postgresql' + jdbc_driver_name = 'org.postgresql.Driver' + + def _get_server_version_info(self, connection): + return tuple(int(x) for x in connection.connection.dbversion.split('.')) + +dialect = PostgreSQL_jdbc |
