| | |
| | | // | Author: Lukas Smith <smith@pooteeweet.org> | |
| | | // +----------------------------------------------------------------------+ |
| | | // |
| | | // $Id: mysqli.php 292715 2009-12-28 14:06:34Z quipo $ |
| | | // $Id: mysqli.php 295587 2010-02-28 17:16:38Z quipo $ |
| | | // |
| | | |
| | | require_once 'MDB2/Driver/Datatype/Common.php'; |
| | |
| | | */ |
| | | function getTypeDeclaration($field) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function _getIntegerDeclaration($name, $field) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | |
| | | $notnull = empty($field['notnull']) ? '' : ' NOT NULL'; |
| | | $unsigned = empty($field['unsigned']) ? '' : ' UNSIGNED'; |
| | | if (empty($default) && empty($notnull)) { |
| | | $default = ' DEFAULT NULL'; |
| | | } |
| | | $name = $db->quoteIdentifier($name, true); |
| | | return $name.' '.$this->getTypeDeclaration($field).$unsigned.$default.$notnull.$autoinc; |
| | | } |
| | |
| | | */ |
| | | function _getDecimalDeclaration($name, $field) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function matchPattern($pattern, $operator = null, $field = null) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | $length = null; |
| | | break; |
| | | default: |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |
| | |
| | | */ |
| | | function mapPrepareDatatype($type) |
| | | { |
| | | $db =& $this->getDBInstance(); |
| | | $db = $this->getDBInstance(); |
| | | if (PEAR::isError($db)) { |
| | | return $db; |
| | | } |