Commit e47a72d3 authored by zYne's avatar zYne

--no commit message

--no commit message
parent c67cd122
...@@ -50,10 +50,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable ...@@ -50,10 +50,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
* @var integer $identifierType the type of identifier this table uses * @var integer $identifierType the type of identifier this table uses
*/ */
private $identifierType; private $identifierType;
/**
* @var string $query cached simple query
*/
private $query;
/** /**
* @var Doctrine_Connection $conn Doctrine_Connection object that created this table * @var Doctrine_Connection $conn Doctrine_Connection object that created this table
*/ */
...@@ -70,17 +66,16 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable ...@@ -70,17 +66,16 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
* @var array $columns an array of column definitions, * @var array $columns an array of column definitions,
* keys as column names and values as column definitions * keys as column names and values as column definitions
* *
* the value array has three values: * the definition array has atleast the following values:
* *
* the column type, eg. 'integer' * -- type the column type, eg. 'integer'
* the column length, eg. 11 * -- length the column length, eg. 11
* the column options/constraints/validators. eg array('notnull' => true)
* *
* so the full columns array might look something like the following: * additional keys:
* array( * -- notnull whether or not the column is marked as notnull
* 'name' => array('string', 20, array('notnull' => true, 'default' => 'someone')), * -- values enum values
* 'age' => array('integer', 11, array('notnull' => true)) * -- notblank notblank validator + notnull constraint
* ) * ... many more
*/ */
protected $columns = array(); protected $columns = array();
/** /**
...@@ -1133,27 +1128,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable ...@@ -1133,27 +1128,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
{ {
$this->data = $data; $this->data = $data;
} }
/**
* returns the maximum primary key value
*
* @return integer
*/
final public function getMaxIdentifier()
{
$sql = "SELECT MAX(".$this->getIdentifier().") FROM ".$this->getTableName();
$stmt = $this->conn->getDBH()->query($sql);
$data = $stmt->fetch(PDO::FETCH_NUM);
return isset($data[0])? $data[0] : 1;
}
/**
* returns simple cached query
*
* @return string
*/
public function getQuery()
{
return $this->query;
}
/** /**
* returns internal data, used by Doctrine_Record instances * returns internal data, used by Doctrine_Record instances
* when retrieving data from database * when retrieving data from database
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment