1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-06 14:16:39 +02:00

drivers meta function refactoring

This commit is contained in:
David Grudl
2010-08-27 01:59:54 +02:00
parent 39add9b8a3
commit b1156e54d8
13 changed files with 224 additions and 228 deletions

View File

@@ -376,18 +376,18 @@ class DibiSqliteDriver extends DibiObject implements IDibiDriver, IDibiResultDri
public function getResultColumns()
{
$count = sqlite_num_fields($this->resultSet);
$res = array();
$columns = array();
for ($i = 0; $i < $count; $i++) {
$name = str_replace(array('[', ']'), '', sqlite_field_name($this->resultSet, $i));
$pair = explode('.', $name);
$res[] = array(
$columns[] = array(
'name' => isset($pair[1]) ? $pair[1] : $pair[0],
'table' => isset($pair[1]) ? $pair[0] : NULL,
'fullname' => $name,
'nativetype' => NULL,
);
}
return $res;
return $columns;
}