DbQuery: add dummy isTimestamp function

Not the best solution, but helps for now.

fixes #6675
This commit is contained in:
Thomas Gelf 2014-07-18 16:30:14 +02:00
parent f9513cc14b
commit 209894d857
1 changed files with 18 additions and 0 deletions

View File

@ -192,6 +192,24 @@ class DbQuery extends SimpleQuery
return $this->escapeForSql(date('Y-m-d H:i:s', $value));
}
/**
* Return true if an field contains an explicit timestamp
*
* TODO: This is not here to do automagic timestamp stuff. One may
* override this function for custom voodoo, IdoQuery right now
* does. IMO we need to split whereToSql functionality, however
* I'd prefer to wait with this unless we understood how other
* backends will work. We probably should also rename this
* function to isTimestampColumn().
*
* @param string $field Field Field name to checked
* @return bool Whether this field expects timestamps
*/
public function isTimestamp($field)
{
return $this;
}
public function whereToSql($col, $sign, $expression)
{
if ($this->isTimestamp($col)) {