Changeset 804

Show
Ignore:
Timestamp:
03/07/07 21:58:15 (2 years ago)
Author:
mfenniak
Message:

Make Connection derived from Cursor, with an empty portal name

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pg8000/trunk/pg8000.py

    r803 r804  
    194194# parameter is provided and the database does not request password 
    195195# authentication, then the password will not be used. 
    196 class Connection(object): 
     196class Connection(Cursor): 
    197197 
    198198    ## 
     
    213213        except socket.error, e: 
    214214            raise InterfaceError("communication error", e) 
     215        Cursor.__init__(self, self, name='') 
    215216 
    216217    def begin(self): 
  • pg8000/trunk/pg8000-test.py

    r802 r804  
    2323    i = i + 1 
    2424    print i, repr(row1) 
    25     cur2.execute("SELECT * FROM t1 WHERE f1 > $1", row1['f1']) 
    26     for row2 in cur2
     25    db.execute("SELECT * FROM t1 WHERE f1 > $1", row1['f1']) 
     26    for row2 in db
    2727        print "\t", repr(row2) 
    2828print "end query..."