Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Last row id of insert property added in mysql connection.

  • Loading branch information...
commit 0484699dce1eece99d73e51821c9dbe894a00864 1 parent b972b50
@kasun authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 beesql/backends/mysql.py
View
5 beesql/backends/mysql.py
@@ -248,6 +248,11 @@ def drop(self, db, if_exists=False):
except pymysql.err.DatabaseError, de:
raise BeeSQLDatabaseError(str(de))
+ @property
+ def lastrowid(self):
+ ''' Return row ID of last insert. '''
+ return self.cursor.lastrowid
+
def close(self):
''' Close connection to Databaes. '''
self.db_connection.close()
Please sign in to comment.
Something went wrong with that request. Please try again.