summaryrefslogtreecommitdiff
path: root/examples/myfirstrecipe.py
diff options
context:
space:
mode:
authorFederico Di Gregorio <fog@initd.org>2005-02-27 15:25:24 +0000
committerFederico Di Gregorio <fog@initd.org>2005-02-27 15:25:24 +0000
commit55744b00cd48bb00c7ab777fd3b9ae53d8bb1b03 (patch)
treed9a0862ad0ae37e868815b436fddb9ffa65802ca /examples/myfirstrecipe.py
parent4b94e544732c18d327e6496422d661885b019cb8 (diff)
downloadpsycopg2-55744b00cd48bb00c7ab777fd3b9ae53d8bb1b03.tar.gz
Much better examples.
Diffstat (limited to 'examples/myfirstrecipe.py')
-rw-r--r--examples/myfirstrecipe.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/myfirstrecipe.py b/examples/myfirstrecipe.py
index 0aa1776..a75a192 100644
--- a/examples/myfirstrecipe.py
+++ b/examples/myfirstrecipe.py
@@ -88,7 +88,10 @@ class SQL_IN(object):
def __init__(self, seq):
self._seq = seq
-
+
+ def prepare(self, conn):
+ pass
+
def getquoted(self):
# this is the important line: note how every object in the
# list is adapted and then how getquoted() is called on it
@@ -98,6 +101,7 @@ class SQL_IN(object):
return '(' + ', '.join(qobjs) + ')'
__str__ = getquoted
+
# add our new adapter class to psycopg list of adapters
register_adapter(tuple, SQL_IN)