Sqlite datadict updated
This commit is contained in:
parent
816971e883
commit
ecd2612e7f
@ -116,7 +116,15 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict {
|
|||||||
. "UNION ALL SELECT name FROM sqlite_temp_master "
|
. "UNION ALL SELECT name FROM sqlite_temp_master "
|
||||||
. "WHERE type='table' ORDER BY name";
|
. "WHERE type='table' ORDER BY name";
|
||||||
|
|
||||||
return $this->dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
|
$tables = array();
|
||||||
|
$stmt = $this->dbh->query($sql);
|
||||||
|
|
||||||
|
$data = $stmt->fetchAll(PDO::FETCH_COLUMN);
|
||||||
|
|
||||||
|
foreach($data as $table) {
|
||||||
|
$tables[] = new Doctrine_Schema_Table(array('name' => $table));
|
||||||
|
}
|
||||||
|
return $tables;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* lists table triggers
|
* lists table triggers
|
||||||
|
@ -37,8 +37,18 @@ abstract class Doctrine_Schema_Object implements IteratorAggregate, Countable {
|
|||||||
|
|
||||||
protected $children = array();
|
protected $children = array();
|
||||||
|
|
||||||
protected $definition = array();
|
protected $definition = array('name' => '');
|
||||||
|
|
||||||
|
public function __construct(array $definition) {
|
||||||
|
foreach($this->definition as $key => $val) {
|
||||||
|
if(isset($definition[$key]))
|
||||||
|
$this->definition[$key] = $definition[$key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getName() {
|
||||||
|
return $this->definition['name'];
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
|
Loading…
Reference in New Issue
Block a user