Skip to content

Commit

Permalink
DBManager: support timestamp values for Oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
Médéric Ribreux committed Oct 23, 2015
1 parent d8303a7 commit 0aa0b4c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/db_manager/db_plugins/oracle/data_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ def _sanitizeTableField(self, field):
if field.dataType.upper() == u"DATE":
return u"CAST({} AS VARCHAR2(8))".format(
self.db.quoteId(field.name))
if u"TIMESTAMP" in field.dataType.upper():
return u"TO_CHAR({}, 'YYYY-MM-DD HH:MI:SS.FF')".format(
self.db.quoteId(field.name))
if field.dataType.upper() == u"NUMBER":
if not field.charMaxLen:
return u"CAST({} AS VARCHAR2(135))".format(
Expand Down

0 comments on commit 0aa0b4c

Please sign in to comment.