*/
public abstract function get_columns($table, $usecache=true);
+ /**
+ * Normalise values based in RDBMS dependencies (booleans, LOBs...)
+ *
+ * @param database_column_info $column column metadata corresponding with the value we are going to normalise
+ * @param mixed $value value we are going to normalise
+ * @return mixed the normalised value
+ */
+ protected abstract function normalise_value($column, $value);
+
/**
* Reset internal column details cache
* @param string $table - empty means all, or one if name of table given
* @param mixed $value value we are going to normalise
* @return mixed the normalised value
*/
- private function normalise_value($column, $value) {
+ protected function normalise_value($column, $value) {
if (is_bool($value)) { /// Always, convert boolean to int
$value = (int)$value;
} // And continue processing because text columns with numeric info need special handling below
* @param mixed $value value we are going to normalise
* @return mixed the normalised value
*/
- private function normalise_value($column, $value) {
+ protected function normalise_value($column, $value) {
if (is_bool($value)) { // Always, convert boolean to int
$value = (int)$value;
* @param mixed $value value we are going to normalise
* @return mixed the normalised value
*/
- private function normalise_value($column, $value) {
+ protected function normalise_value($column, $value) {
if (is_bool($value)) { // Always, convert boolean to int
$value = (int)$value;
* @param mixed $value value we are going to normalise
* @return mixed the normalised value
*/
- private function normalise_value($column, $value) {
+ protected function normalise_value($column, $value) {
if (is_bool($value)) { // Always, convert boolean to int
$value = (int)$value;
public function get_tables($usecache=true){}
public function get_indexes($table){}
public function get_columns($table, $usecache=true){}
+ protected function normalise_value($column, $value){}
public function set_debug($state){}
public function get_debug(){}
public function set_logging($state){}
return $columns;
}
+ /**
+ * Normalise values based in RDBMS dependencies (booleans, LOBs...)
+ *
+ * @param database_column_info $column column metadata corresponding with the value we are going to normalise
+ * @param mixed $value value we are going to normalise
+ * @return mixed the normalised value
+ */
+ protected function normalise_value($column, $value) {
+ return $value;
+ }
+
/**
* Returns the sql statement with clauses to append used to limit a recordset range.
* @param string $sql the SQL statement to limit.