diff options
author | Michael Trier <mtrier@gmail.com> | 2010-02-23 00:27:37 +0000 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2010-02-23 00:27:37 +0000 |
commit | 2a1eca4bbc74347a213fb22b628eae1b1762004d (patch) | |
tree | 3846f934badd5539f0da497a48552e68008132f8 | |
parent | d050991944fdeb27e7674987622081494ebb6087 (diff) | |
download | sqlalchemy-2a1eca4bbc74347a213fb22b628eae1b1762004d.tar.gz |
Changed the py-postgresql dialect to indicate that it is using the pyformat parameter style.
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/pypostgresql.py | 11 | ||||
-rw-r--r-- | test/dialect/test_postgresql.py | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/pypostgresql.py b/lib/sqlalchemy/dialects/postgresql/pypostgresql.py index d5ee05f9f..87582a6cd 100644 --- a/lib/sqlalchemy/dialects/postgresql/pypostgresql.py +++ b/lib/sqlalchemy/dialects/postgresql/pypostgresql.py @@ -31,18 +31,15 @@ class PostgreSQL_pypostgresql(PGDialect): driver = 'pypostgresql' supports_unicode_statements = True - supports_unicode_binds = True description_encoding = None - - default_paramstyle = 'format' - + default_paramstyle = 'pyformat' + # requires trunk version to support sane rowcounts # TODO: use dbapi version information to set this flag appropariately supports_sane_rowcount = True - supports_sane_multi_rowcount = False - + execution_ctx_cls = PostgreSQL_pypostgresqlExecutionContext colspecs = util.update_copy( PGDialect.colspecs, @@ -51,7 +48,7 @@ class PostgreSQL_pypostgresql(PGDialect): sqltypes.Float: sqltypes.Float, # prevents PGNumeric from being used } ) - + @classmethod def dbapi(cls): from postgresql.driver import dbapi20 diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 2d05939fe..9361f4dbc 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -1651,6 +1651,7 @@ class MatchTest(TestBase, AssertsCompiledSQL): self.assert_compile(matchtable.c.title.match('somstr'), "matchtable.title @@ to_tsquery(%(title_1)s)") @testing.fails_on('postgresql+psycopg2', 'uses pyformat') + @testing.fails_on('postgresql+pypostgresql', 'uses pyformat') @testing.fails_on('postgresql+zxjdbc', 'uses qmark') def test_expression_positional(self): self.assert_compile(matchtable.c.title.match('somstr'), "matchtable.title @@ to_tsquery(%s)") |