mirror of
https://github.com/dg/dibi.git
synced 2025-08-15 10:34:06 +02:00
- added DibiPostgreDriver::getIndexes()
- implemented DibiTables types autodetection - all examples uses Nette::Debug
This commit is contained in:
@@ -52,7 +52,7 @@ abstract class DibiTable extends DibiObject
|
||||
/** @var array */
|
||||
protected $blankRow = array();
|
||||
|
||||
/** @var array of pairs [type, format] */
|
||||
/** @var mixed; TRUE means autodetect, or array of pairs [type, format] */
|
||||
protected $types = array();
|
||||
|
||||
|
||||
@@ -325,7 +325,12 @@ abstract class DibiTable extends DibiObject
|
||||
*/
|
||||
protected function complete($res)
|
||||
{
|
||||
$res->setTypes($this->types);
|
||||
if (is_array($this->types)) {
|
||||
$res->setTypes($this->types);
|
||||
|
||||
} elseif ($this->types === TRUE) {
|
||||
$res->detectTypes();
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user