forked from GNUsocial/gnu-social
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:
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user