diff options
| author | Federico Di Gregorio <fog@initd.org> | 2005-02-27 15:25:24 +0000 |
|---|---|---|
| committer | Federico Di Gregorio <fog@initd.org> | 2005-02-27 15:25:24 +0000 |
| commit | 55744b00cd48bb00c7ab777fd3b9ae53d8bb1b03 (patch) | |
| tree | d9a0862ad0ae37e868815b436fddb9ffa65802ca /examples/myfirstrecipe.py | |
| parent | 4b94e544732c18d327e6496422d661885b019cb8 (diff) | |
| download | psycopg2-55744b00cd48bb00c7ab777fd3b9ae53d8bb1b03.tar.gz | |
Much better examples.
Diffstat (limited to 'examples/myfirstrecipe.py')
| -rw-r--r-- | examples/myfirstrecipe.py | 6 |
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) |
