Skip to content

Commit

Permalink
Fixing parsing of oracle dates into v8 Date
Browse files Browse the repository at this point in the history
  • Loading branch information
mariano committed Jun 3, 2011
1 parent 6aee616 commit 08e5690
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/result.cc
Expand Up @@ -214,7 +214,14 @@ char** node_db_oracle::Result::row(unsigned long* rowColumnLengths) throw(node_d

blob.read(rowColumnLengths[c], (unsigned char*) row[c], rowColumnLengths[c]);
} else {
std::string string = this->resultSet->getString(c + 1);
std::string string;
if (this->columns[c]->getType() == Column::DATETIME) {
oracle::occi::Date date = this->resultSet->getDate(c + 1);
string = date.toText("YYYY-MM-DD HH:II:SS");
} else {
string = this->resultSet->getString(c + 1);
}

rowColumnLengths[c] = string.length();

row[c] = new char[rowColumnLengths[c]];
Expand Down

0 comments on commit 08e5690

Please sign in to comment.