Skip to content

Commit

Permalink
Enhancement/teradata lastrowid (#363)
Browse files Browse the repository at this point in the history
* Initial change to remove ESCAPE from teradata syntax

* Revert "Initial change to remove ESCAPE from teradata syntax"

This reverts commit 81489e9.

* Fix lastrowid error for Teradata adapter

* further update to teradata adapter
  • Loading branch information
willimoa authored and mdipierro committed May 18, 2016
1 parent 152288c commit cdba0f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pydal/adapters/teradata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ def close(self):
# leading to SQL_ACTIVE_STATEMENTS limit errors
self.cursor.close()
super(Teradata, self).close()

def lastrowid(self, table):
# Teradata cannot retrieve the lastrowid for an IDENTITY Column
# and they are not sequential anyway.
# Similar to the NullCursor class, return 1
return 1

0 comments on commit cdba0f5

Please sign in to comment.