From e47a72d3ce88aa30dd04da8ea78309c5ba2f2d37 Mon Sep 17 00:00:00 2001 From: zYne Date: Mon, 9 Jul 2007 23:01:59 +0000 Subject: [PATCH] --- lib/Doctrine/Table.php | 42 ++++++++---------------------------------- 1 file changed, 8 insertions(+), 34 deletions(-) diff --git a/lib/Doctrine/Table.php b/lib/Doctrine/Table.php index 1cb7616d1..2d66ec6e5 100644 --- a/lib/Doctrine/Table.php +++ b/lib/Doctrine/Table.php @@ -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