function MetaType($t, $len = -1, $fieldobj = false) { if (is_object($t)) { $fieldobj = $t; $t = $fieldobj->type; $len = $fieldobj->max_length; } $len = -1; // mysql max_length is not accurate switch (strtoupper($t)) { case 'INT': case 'INTEGER': return 'I'; case 'BIT': case 'TINYINT': return 'I1'; case 'SMALLINT': return 'I2'; case 'BIGINT': return 'I8'; case 'REAL': case 'FLOAT': return 'F'; default: return parent::MetaType($t, $len, $fieldobj); } }
public function MetaType($t,$len=-1,$fieldobj=false) { if (is_object($t)) { $fieldobj = $t; $t = $fieldobj->type; $len = $fieldobj->max_length; } switch (strtoupper($t)) { case 'TEXT': return 'X'; case 'FLOAT': case 'DOUBLE': return 'F'; } return parent::MetaType($t,$len,$fieldobj); }
public function _GetSize($ftype, $ty, $fsize, $fprec) { switch ($ftype) { case 'INT': case 'SMALLINT': case 'TINYINT': case 'BIGINT': return $ftype; } if ($ty == 'T') { return $ftype; } return parent::_GetSize($ftype, $ty, $fsize, $fprec); }
function DropTableSQL($tabname) { $sql = ADODB_DataDict::DropTableSQL($tabname); $drop_seq = $this->_DropAutoIncrement($tabname); if ($drop_seq) { $sql[] = $drop_seq; } return $sql; }
function DropColumnSQL($tabname, $flds) { if ($this->debug) { ADOConnection::outp("DropColumnSQL only works with PostgreSQL 7.3+"); } return ADODB_DataDict::DropColumnSQL($tabname, $flds) . "/* only works for PostgreSQL 7.3+ */"; }