Permalink
Browse files

Make the expected paramaterized delimeter explicitly known.

  • Loading branch information...
1 parent 6a7994f commit 161771e2bbc7fd60a29916e86d5ee7f491e9676b Alex Kritikos committed Feb 24, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 cursors.py
View
@@ -67,6 +67,8 @@ def __len__(self):
class PostgresqlConnection(psycopg2.extensions.connection):
+ param = '%s'
+
def __call__(self, q, *params):
if q.upper().startswith('SELECT'):
# Server-side cursors are cool. Unless we know better, use them for everything.
@@ -85,6 +87,8 @@ def cursor(self, name=None, cursor_factory=PostgresqlCursor, **kwargs):
class SQLiteConnection(sqlite3.Connection):
+ param = '?'
+
def __init__(self, *args, **kwargs):
super(SQLiteConnection, self).__init__(*args, **kwargs)
self.use_undocumented_c_method = False

0 comments on commit 161771e

Please sign in to comment.