Skip to content

Commit 8ebebbd

Browse files
authored
Merge pull request #13 from staticshock/last_executed
Look up _last_executed on the underlying cursor
2 parents 8cb7ec7 + 82ac808 commit 8ebebbd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

readonly/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class ReadOnlyCursorWrapper(object):
5757
# Data Manipulation
5858
'INSERT INTO', 'UPDATE', 'REPLACE', 'DELETE FROM',
5959
)
60-
_last_executed = ''
6160

6261
def __init__(self, cursor, db):
6362
self.cursor = cursor
@@ -93,6 +92,9 @@ def _write_to_readonly_db(self):
9392
not self.readonly_dbs
9493
or self.db.settings_dict['NAME'] in self.readonly_dbs)
9594

95+
@property
96+
def _last_executed(self):
97+
return getattr(self.cursor, '_last_executed', '')
9698

9799
class CursorWrapper(util.CursorWrapper):
98100
def __init__(self, cursor, db):

0 commit comments

Comments
 (0)