mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
add method castToText()
it takes a fieldname and returns it with a cast to 'text'
This commit is contained in:
parent
e020ebaf39
commit
3da6d66ee1
|
@ -539,6 +539,20 @@ class SeedDMS_Core_DatabaseAccess {
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return sql statement for returning the current timestamp
|
||||||
|
*
|
||||||
|
* @return string sql code
|
||||||
|
*/
|
||||||
|
function castToText($field) { /* {{{ */
|
||||||
|
switch($this->_driver) {
|
||||||
|
case 'pgsql':
|
||||||
|
return $field."::TEXT";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $field;
|
||||||
|
} /* }}} */
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user