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
* @var integer $identifierType the type of identifier this table uses
*/
private $identifierType;
/**
* @var string $query cached simple query
*/
private $query;
/**
* @var Doctrine_Connection $conn Doctrine_Connection object that created this table
*/
......@@ -70,17 +66,16 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
* @var array $columns an array of 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'
* the column length, eg. 11
* the column options/constraints/validators. eg array('notnull' => true)
* -- type the column type, eg. 'integer'
* -- length the column length, eg. 11
*
* so the full columns array might look something like the following:
* array(
* 'name' => array('string', 20, array('notnull' => true, 'default' => 'someone')),
* 'age' => array('integer', 11, array('notnull' => true))
* )
* additional keys:
* -- notnull whether or not the column is marked as notnull
* -- values enum values
* -- notblank notblank validator + notnull constraint
* ... many more
*/
protected $columns = array();
/**
......@@ -1133,27 +1128,6 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable
{
$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
* 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