updating dbos, fixes #3705

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6146 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-12-13 22:08:11 +00:00
parent 9d58121205
commit 44eae0705b
4 changed files with 9 additions and 9 deletions

View file

@ -221,9 +221,10 @@ class DboDb2 extends DboSource {
while (db2_fetch_row($result)) {
$fields[strtolower(db2_result($result, 'COLUMN_NAME'))] = array(
'type' => strtolower(db2_result($result, 'TYPE_NAME')),
'type' => $this->column(strtolower(db2_result($result, 'TYPE_NAME'))),
'null' => db2_result($result, 'NULLABLE'),
'default' => db2_result($result, 'COLUMN_DEF'));
'length' => db2_result($result, 'COLUMN_SIZE'))),
}
$this->__cacheDescription($model->tablePrefix . $model->table, $fields);
return $fields;

View file

@ -175,7 +175,7 @@ class DboFirebird extends DboSource {
Where RDB" . "$" . "SYSTEM_FLAG =0";
$result = @ibase_query($this->connection,$sql);
$tables=array();
$tables = array();
while ($row = ibase_fetch_row ($result)) {
$tables[] = strtolower(trim($row[0]));
}
@ -203,10 +203,8 @@ class DboFirebird extends DboSource {
for ($i = 0; $i < $coln; $i++) {
$col_info = ibase_field_info($rs, $i);
$col_info['type'] = $this->column($col_info['type']);
$fields[strtolower($col_info['name'])] = array(
'type' => $col_info['type'],
'type' => $this->column($col_info['type']),
'null' => '',
'length' => $col_info['length']
);

View file

@ -210,11 +210,11 @@ class DboMssql extends DboSource {
$cols = $this->fetchAll("SELECT COLUMN_NAME as Field, DATA_TYPE as Type, COL_LENGTH('" . $this->fullTableName($model, false) . "', COLUMN_NAME) as Length, IS_NULLABLE As [Null], COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $this->fullTableName($model, false) . "'), COLUMN_NAME, 'IsIdentity') as [Key], NUMERIC_SCALE as Size FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $this->fullTableName($model, false) . "'", false);
foreach ($cols as $column) {
$fields[] = array(
'name' => $column[0]['Field'],
$fields[$column[0]['Field']] = array(
'type' => $this->column($column[0]['Type']),
'null' => (strtoupper($column[0]['Null']) == 'YES'),
'default' => $column[0]['Default']
'default' => $column[0]['Default'],
'length' => $this->length($column[0]['Type']),
);
}
$this->__cacheDescription($this->fullTableName($model, false), $fields);

View file

@ -171,7 +171,8 @@ class DboSybase extends DboSource {
}
if (isset($column[0])) {
$fields[$column[0]['Field']] = array('type' => $this->column($column[0]['Type']),
'null' => $column[0]['Null']
'null' => $column[0]['Null'],
'length' => $this->length($column[0]['Type']),
);
}
}