Skip to content

Commit a4dde43

Browse files
author
James William Pye
committed
Add fileno method to cursor objects.
1 parent 16bc86e commit a4dde43

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

postgresql/driver/dbapi20.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
##
2-
# copyright 2009, James William Pye
3-
# http://python.projects.postgresql.org
2+
# .driver.dbapi20 - DB-API 2.0 Implementation
43
##
54
"""
65
DB-API 2.0 conforming interface using postgresql.driver.
@@ -140,7 +139,7 @@ def __init__(self, C):
140139
self.__portals = []
141140

142141
# Describe the "real" cursor as a "portal".
143-
# This should keep ambiguous terminology out of adaptor.
142+
# This should keep ambiguous terminology out of the adaptation.
144143
def _portal():
145144
def fget(self):
146145
if self.__portals is None:
@@ -210,6 +209,9 @@ def nextset(self):
210209
del self._portal
211210
return len(self.__portals) or None
212211

212+
def fileno(self):
213+
return self.database.fileno()
214+
213215
def _convert_query(self, string):
214216
parts = list(pg_str.split(string))
215217
style = None

0 commit comments

Comments
 (0)