mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-02-07 12:50:32 +03:00
Little improvements to DictRow.
This commit is contained in:
parent
48d8bd39a1
commit
10dc03462b
|
@ -23,6 +23,8 @@
|
|||
|
||||
2005-03-29 Federico Di Gregorio <fog@debian.org>
|
||||
|
||||
* Applied patch to fix tuple count.
|
||||
|
||||
* psycopg/pqpath.c (pq_is_busy): Staring from bug report from
|
||||
Jason Erickson fixed segfaults due to calling Python function
|
||||
without holding the GIL.
|
||||
|
|
|
@ -70,6 +70,12 @@ class DictRow(list):
|
|||
x = self._cursor.index[x]
|
||||
return list.__getitem__(self, x)
|
||||
|
||||
def items(self):
|
||||
res = []
|
||||
for n, v in self._cursor.index.items():
|
||||
res.append((n, list.__getitem__(self, v)))
|
||||
return res
|
||||
|
||||
|
||||
|
||||
class SQL_IN(object):
|
||||
|
|
Loading…
Reference in New Issue
Block a user