Starting on adapting postgresql schema class to look stuff up in the new drupalish format...

Fetching basic column data and unique indexes. Still needs detail work, multi-value indexes, foreign keys, and distinguishing the primary key.
Since we don't get comments and such, for cleaner comparisons we should probably do a filtering on supported features.
This commit is contained in:
Brion Vibber
2010-10-08 16:36:32 -07:00
parent efa8ff82f4
commit 2d0807bc1c
3 changed files with 138 additions and 57 deletions

View File

@@ -243,29 +243,6 @@ class MysqlSchema extends Schema
return $this->fetchQueryData($sql);
}
/**
* Pull info from the query into a fun-fun array of dooooom
*
* @param string $sql
* @return array of arrays
*/
protected function fetchQueryData($sql)
{
$res = $this->conn->query($sql);
if (PEAR::isError($res)) {
throw new Exception($res->getMessage());
}
$out = array();
$row = array();
while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) {
$out[] = $row;
}
$res->free();
return $out;
}
/**
* Creates a table with the given names and columns.
*