From 10f533099cdea5059dcf9a2236236b44ca23a109 Mon Sep 17 00:00:00 2001 From: KrisJordan Date: Mon, 15 Dec 2008 18:42:04 -0500 Subject: [PATCH] Adding comments to recess.database code. --- .../lib/recess/database/Databases.class.php | 1 + .../lib/recess/database/orm/Model.class.php | 303 +++++++++++++++--- .../annotations/BelongsToAnnotation.class.php | 10 + .../annotations/ColumnAnnotation.class.php | 10 + .../annotations/DatabaseAnnotation.class.php | 11 + .../annotations/HasManyAnnotation.class.php | 10 + .../orm/annotations/ModelAnnotation.class.php | 9 + .../ModelPropertyAnnotation.class.php | 9 + .../orm/annotations/TableAnnotation.class.php | 11 + .../BelongsToRelationship.class.php | 12 +- .../HasManyRelationship.class.php | 10 + .../orm/relationships/Relationship.class.php | 10 +- .../pdo/IPdoDataSourceProvider.class.php | 4 + .../pdo/MysqlDataSourceProvider.class.php | 11 + .../recess/database/pdo/PdoDataSet.class.php | 203 +++++++++++- .../database/pdo/PdoDataSource.class.php | 11 + .../pdo/RecessColumnDescriptor.class.php | 7 +- .../pdo/RecessTableDescriptor.class.php | 5 + .../recess/database/pdo/RecessType.class.php | 12 +- ...taSourceCouldNotConnectException.class.php | 6 +- .../ProviderDoesNotExistException.class.php | 6 +- .../database/sql/ISqlConditions.class.php | 11 +- .../database/sql/ISqlSelectOptions.class.php | 11 +- .../recess/database/sql/SqlBuilder.class.php | 1 + 24 files changed, 630 insertions(+), 64 deletions(-) diff --git a/recess/lib/recess/database/Databases.class.php b/recess/lib/recess/database/Databases.class.php index ee28846..3f7c9c6 100644 --- a/recess/lib/recess/database/Databases.class.php +++ b/recess/lib/recess/database/Databases.class.php @@ -3,6 +3,7 @@ * Registry of Database Sources * * @author Kris Jordan + * @copyright 2008 Kris Jordan * @package Recess! Framework * @license http://www.opensource.org/licenses/mit-license.php The MIT License * @link http://www.recessframework.org/ diff --git a/recess/lib/recess/database/orm/Model.class.php b/recess/lib/recess/database/orm/Model.class.php index 03d8ae1..a766557 100644 --- a/recess/lib/recess/database/orm/Model.class.php +++ b/recess/lib/recess/database/orm/Model.class.php @@ -19,29 +19,76 @@ Library::import('recess.database.orm.relationships.HasManyRelationship'); Library::import('recess.database.orm.relationships.BelongsToRelationship'); +/** + * Model is the basic unit of organization in Recess' simple ORM. + * + * @author Kris Jordan + * @copyright 2008 Kris Jordan + * @package Recess! Framework + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @link http://www.recessframework.org/ + */ abstract class Model extends RecessObject implements ISqlConditions { + /** + * Get the datasource for a class. + * + * @param mixed $class + * @return ModelDataSource + */ static function sourceFor($class) { return self::getClassDescriptor($class)->getSource(); } + /** + * Get the name of the datasource for a class + * + * @param mixed $class + * @return string Key name of the ModelDataSource in Databases + */ static function sourceNameFor($class) { return self::getClassDescriptor($class)->getSourceName(); } + /** + * The table which $modelClass is persisted on. + * + * @param mixed $class + * @return string Table Name + */ static function tableFor($class) { return self::getClassDescriptor($class)->getTable(); } + /** + * Return the primary key column name for a class. This is prefixed + * with the class' table name. + * + * @param midex $class + * @return string Primary Key Column Name ie "table.id" + */ static function primaryKeyFor($class) { $descriptor = self::getClassDescriptor($class); return $descriptor->getTable() . '.' . $descriptor->primaryKey; } + /** + * Return the property name for the primary key. + * + * @param mixed $class + * @return string Primary key name ie: 'id' + */ static function primaryKeyName($class) { return self::getClassDescriptor($class)->primaryKey; } + /** + * Get a relationship on a class or instance by the relationship's name. + * + * @param mixed $classOrInstance + * @param string $name of the relationship + * @return Relationship + */ static function getRelationship($classOrInstance, $name) { if(isset(self::getClassDescriptor($classOrInstance)->relationships[$name])) { return self::getClassDescriptor($classOrInstance)->relationships[$name]; @@ -50,18 +97,46 @@ static function getRelationship($classOrInstance, $name) { } } + /** + * Return all relationships for a class or instance + * + * @param mixed $classOrInstance + * @return array of Relationship + */ static function getRelationships($classOrInstance) { return self::getClassDescriptor($classOrInstance)->relationships; } + /** + * Retrieve an array of column names in the table corresponding to + * a model class. + * + * @param mixed $classOrInstance + * @return array of strings of column names + */ static function getColumns($classOrInstance) { return self::getClassDescriptor($classOrInstance)->columns; } + /** + * Retrieve an array of the properties. + * + * @param mixed $classOrInstance + * @return array of type ModelProperty + */ static function getProperties($classOrInstance) { return self::getClassDescriptor($classOrInstance)->properties; } + /** + * Implementation of the RecessObject abstract method. This method + * computes a static ModelDescriptor based on reflected meta data + * and annotations from the model class. + * + * @see RecessObject + * @param string $class + * @return ModelDescriptor + */ static protected function buildClassDescriptor($class) { $descriptor = new ModelDescriptor($class, false); @@ -104,16 +179,23 @@ static protected function buildClassDescriptor($class) { return $descriptor; } + /** + * Attempt to generate a table from this model's descriptor. + * + * @param mixed $class + */ static function createTableFor($class) { $descriptor = self::getClassDescriptor($class); $modelSource = Databases::getSource($descriptor->getSourceName()); $modelSource->exec($modelSource->createTableSql($descriptor)); } - - function all() { - return $this->getModelSet()->useAssignmentsAsConditions(false); - } + /** + * Build a ModelSet from this instance by assigning this Model instance's + * properties and values. + * + * @return ModelSet + */ protected function getModelSet() { $thisClassDescriptor = self::getClassDescriptor($this); $result = $thisClassDescriptor->getSource()->selectModelSet($thisClassDescriptor->getTable()); @@ -126,10 +208,42 @@ protected function getModelSet() { return $result; } + /** + * Return a results ModelSet based on the values of this instance's properties. + * + * @return ModelSet + */ function select() { return $this->getModelSet()->useAssignmentsAsConditions(true); } + + /** + * Alias for select. + * + * @return ModelSet + */ + function find() { return $this->select(); } + /** + * Select all. This is different from find() in that find will use + * assigned values to the model as equality statements. + * + * @return ModelSet + */ + function all() { + return $this->getModelSet()->useAssignmentsAsConditions(false); + } + + /** + * Return a SqlBuilder object which has set the table and optionally + * assigned values to columns based on this instances' properties. This is used in + * insert(), update(), and delete() + * + * @param ModelDescriptor $descriptor + * @param boolean $useAssignment + * @param boolean $excludePrimaryKey + * @return SqlBuilder + */ protected function assignmentSqlForThisObject(ModelDescriptor $descriptor, $useAssignment = true, $excludePrimaryKey = false) { $sqlBuilder = new SqlBuilder(); $sqlBuilder->from($descriptor->getTable()); @@ -146,6 +260,12 @@ protected function assignmentSqlForThisObject(ModelDescriptor $descriptor, $useA return $sqlBuilder; } + /** + * Delete row(s) from the data source which match this instance. + * + * @param boolean $cascade - Also delete models related to this model? + * @return boolean + */ function delete($cascade = true) { $thisClassDescriptor = self::getClassDescriptor($this); @@ -159,7 +279,12 @@ function delete($cascade = true) { return $thisClassDescriptor->getSource()->executeSqlBuilder($sqlBuilder, 'delete'); } - + + /** + * Insert row into the data source based on the values of this instance. + * + * @return boolean + */ function insert() { $thisClassDescriptor = self::getClassDescriptor($this); @@ -173,7 +298,12 @@ function insert() { return $result; } - + + /** + * Update a row in the data source based on the values of this instance. + * + * @return boolean + */ function update() { $thisClassDescriptor = self::getClassDescriptor($this); @@ -184,6 +314,11 @@ function update() { return $thisClassDescriptor->getSource()->executeSqlBuilder($sqlBuilder, 'update'); } + /** + * Insert or update depending on whether or not this instance's primary key is set. + * + * @return boolean + */ function save() { if($this->primaryKeyIsSet()) { return $this->update(); @@ -192,6 +327,9 @@ function save() { } } + /** + * @return boolean + */ function primaryKeyIsSet() { $thisClassDescriptor = self::getClassDescriptor($this); @@ -204,10 +342,21 @@ function primaryKeyIsSet() { } } - function find() { return $this->select(); } - + /** + * Shortcut method which will determine whether a row + * with the current instances properties exists. If so, it will + * preload those values (side effects). + * + * Usage: + * $model->id = 1; + * if($model->exists()) { + * die('a lonesome death'); + * } + * + * @return boolean + */ function exists() { - $result = $this->find()->first(); + $result = $this->select()->first(); if($result != null) { $this->copy($result); return true; @@ -216,44 +365,98 @@ function exists() { } } - function equal($lhs, $rhs){ return $this->select()->equal($lhs,$rhs); } - function notEqual($lhs, $rhs) { return $this->select()->notEqual($lhs,$rhs); } - function between ($column, $lhs, $rhs) { return $this->select()->between($column, $lhs, $rhs); } - function greaterThan($lhs, $rhs) { return $this->select()->greaterThan($lhs,$rhs); } - function greaterThanOrEqualTo($lhs, $rhs) { return $this->select()->greaterThanOrEqualTo($lhs,$rhs); } - function lessThan($lhs, $rhs) { return $this->select()->lessThan($lhs,$rhs); } - function lessThanOrEqualTo($lhs, $rhs) { return $this->select()->lessThanOrEqualTo($lhs,$rhs); } - function like($lhs, $rhs) { return $this->select()->like($lhs,$rhs); } - + /** + * Copy values from a key/value array or another model/object + * to this instance. + * + * @param iterable $keyValuePair + * @return Model + */ function copy($keyValuePair) { foreach($keyValuePair as $key => $value) { $this->$key = $value; } return $this; } -} - -class ModelProperty { - public $name; - public $type; - public $pkCallback; - public $isAutoIncrement = false; - public $isPrimaryKey = false; - public $isForeignKey = false; - public $required = false; - function __set_state($array) { - $prop = new ModelProperty(); - $prop->name = $array['name']; - $prop->type = $array['type']; - $prop->pkCallback = $array['pkCallback']; - $prop->isAutoIncrement = $array['autoincrement']; - $prop->isPrimaryKey = $array['isPrimaryKey']; - $prop->isForeignKey = $array['isForeignKey']; - return $prop; - } + /** + * Add equality criteria between a column and value + * + * @param string $lhs Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function equal($column, $rhs){ return $this->select()->equal($column,$rhs); } + + /** + * Add inequality criteria between a column and value + * + * @param string $lhs Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function notEqual($column, $rhs) { return $this->select()->notEqual($column,$rhs); } + + /** + * Add criteria to state a column's value falls between $small and $big + * + * @param string $column Column + * @param mixed $small Floor Value + * @param mixed $big Ceiling Value + * @return PdoDataSet + */ + function between ($column, $small, $big) { return $this->select()->between($column, $small, $big); } + + /** + * SQL criteria specifying a column's value is greater than $rhs + * + * @param string $column Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function greaterThan($column, $rhs) { return $this->select()->greaterThan($column,$rhs); } + + /** + * SQL criteria specifying a column's value is no less than $rhs + * + * @param string $column Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function greaterThanOrEqualTo($column, $rhs) { return $this->select()->greaterThanOrEqualTo($lhs,$rhs); } + + /** + * SQL criteria specifying a column's value is less than $rhs + * + * @param string $column Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function lessThan($column, $rhs) { return $this->select()->lessThan($lhs,$rhs); } + + /** + * SQL criteria specifying a column's value is no greater than $rhs + * + * @param string $column Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function lessThanOrEqualTo($column, $rhs) { return $this->select()->lessThanOrEqualTo($lhs,$rhs); } + + /** + * SQL LIKE criteria, note this does not automatically include wildcards + * + * @param string $column Column + * @param mixed $rhs Value + * @return PdoDataSet + */ + function like($column, $rhs) { return $this->select()->like($lhs,$rhs); } + } +/** + * Class descriptor + metadata for a model. + */ class ModelDescriptor extends RecessObjectDescriptor { public $primaryKey = 'id'; @@ -327,4 +530,28 @@ function getSourceName() { } } } + +/** + * The data structure for a propery on a model + */ +class ModelProperty { + public $name; + public $type; + public $pkCallback; + public $isAutoIncrement = false; + public $isPrimaryKey = false; + public $isForeignKey = false; + public $required = false; + + function __set_state($array) { + $prop = new ModelProperty(); + $prop->name = $array['name']; + $prop->type = $array['type']; + $prop->pkCallback = $array['pkCallback']; + $prop->isAutoIncrement = $array['autoincrement']; + $prop->isPrimaryKey = $array['isPrimaryKey']; + $prop->isForeignKey = $array['isForeignKey']; + return $prop; + } +} ?> \ No newline at end of file diff --git a/recess/lib/recess/database/orm/annotations/BelongsToAnnotation.class.php b/recess/lib/recess/database/orm/annotations/BelongsToAnnotation.class.php index 572034e..3df2719 100644 --- a/recess/lib/recess/database/orm/annotations/BelongsToAnnotation.class.php +++ b/recess/lib/recess/database/orm/annotations/BelongsToAnnotation.class.php @@ -1,6 +1,16 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/orm/relationships/HasManyRelationship.class.php b/recess/lib/recess/database/orm/relationships/HasManyRelationship.class.php index 1a1be60..8edd3fb 100644 --- a/recess/lib/recess/database/orm/relationships/HasManyRelationship.class.php +++ b/recess/lib/recess/database/orm/relationships/HasManyRelationship.class.php @@ -1,6 +1,16 @@ getStatementForBuilder($builder, $action, $source)->execute(); } diff --git a/recess/lib/recess/database/pdo/PdoDataSet.class.php b/recess/lib/recess/database/pdo/PdoDataSet.class.php index 76bd853..a84f670 100644 --- a/recess/lib/recess/database/pdo/PdoDataSet.class.php +++ b/recess/lib/recess/database/pdo/PdoDataSet.class.php @@ -1,16 +1,73 @@ from('tableName')->equal('someColumn', 'Hi')->limit(10)->offset(50); + * foreach($results as $result) { // This is when the query is run! + * print_r($result); + * } + * + * @author Kris Jordan + * @copyright 2008 Kris Jordan + * @package Recess! Framework + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @link http://www.recessframework.org/ + */ class PdoDataSet implements Iterator, Countable, ArrayAccess, ISqlSelectOptions, ISqlConditions { - protected $hasResults = false; + /** + * The SqlBuilder instance we use to build up the query string. + * + * @var SqlBuilder + */ protected $sqlBuilder; + + /** + * Whether this instance has fetched results or not. + * + * @var boolean + */ + protected $hasResults = false; + + /** + * Array of results that is filled once a query is realized. + * + * @var array of type $this->rowClass + */ protected $results = array(); + /** + * The PdoDataSource which this PdoDataSet is extracted from. + * + * @var PdoDataSource + */ + protected $source; + + /** + * The Class which PDO will fetch rows into. + * + * @var string Classname + */ public $rowClass = 'stdClass'; - protected $source; + /** + * Index counter for our location in the result set. + * + * @var integer + */ + protected $index = 0; + /** + * @param PdoDataSource $source + */ public function __construct(PdoDataSource $source) { $this->sqlBuilder = new SqlBuilder(); $this->source = $source; @@ -28,6 +85,10 @@ protected function reset() { $this->index = 0; } + /** + * Once results are needed this method executes the accumulated query + * on the data source. + */ protected function realize() { if(!$this->hasResults) { unset($this->results); @@ -36,10 +97,20 @@ protected function realize() { } } + /** + * Return the SQL representation of this PdoDataSet + * + * @return string + */ public function toSql() { return $this->sqlBuilder->select(); } + /** + * Return the results as an array. + * + * @return array of type $this->rowClass + */ public function toArray() { $this->realize(); return $this->results; @@ -47,7 +118,10 @@ public function toArray() { public function count() { return iterator_count($this); } - protected $index = 0; + + /* + * The following methods are in accordance with the Iterator interface + */ public function rewind() { if(!$this->hasResults) {$this->realize();} $this->index = 0; @@ -57,7 +131,7 @@ public function current() { if(!$this->hasResults) {$this->realize();} return $this->results[$this->index]; } - + public function key() { if(!$this->hasResults) {$this->realize();} return $this->index; @@ -73,6 +147,9 @@ public function valid() { return isset($this->results[$this->index]); } + /* + * The following methods are in accordance with the ArrayAccess interface + */ function offsetExists($index) { if(!$this->hasResults) {$this->realize();} return isset($this->results[$index]); @@ -103,38 +180,142 @@ function isEmpty() { return !isset($this[0]); } - function first() { // TODO: DO these semantics make sense? Should we tack on a range? + /** + * Return the first item in the PdoDataSet or Null if none exist + * + * @return object or null + */ + function first() { if(!$this->hasResults) { - $this->range(0,1); - } - - if(isset($this[0])) { - return $this[0]; + $results = $this->range(0,1); + if(isset($results[0])) + return $results[0]; } else { - return null; // TODO: This should probably throw something. + if(isset($this[0])) + return $this[0]; } + + return null; } + /** + * @see SqlBuilder::assign + * @return PdoDataSet + */ function assign($column, $value) { $copy = clone $this; $copy->sqlBuilder->assign($column, $value); return $copy; } + + /** + * @see SqlBuilder::useAssignmentsAsConditions + * @return PdoDataSet + */ function useAssignmentsAsConditions($bool) { $copy = clone $this; $copy->sqlBuilder->useAssignmentsAsConditions($bool); return $copy; } + /** + * @see SqlBuilder::from + * @return PdoDataSet + */ function from($table) { $copy = clone $this; $copy->sqlBuilder->from($table); return $copy; } + + /** + * @see SqlBuilder::leftOuterJoin + * @return PdoDataSet + */ function leftOuterJoin($table, $tablePrimaryKey, $fromTableForeignKey) { $copy = clone $this; $copy->sqlBuilder->leftOuterJoin($table, $tablePrimaryKey, $fromTableForeignKey); return $copy; } + + /** + * @see SqlBuilder::innerJoin + * @return PdoDataSet + */ function innerJoin($table, $tablePrimaryKey, $fromTableForeignKey) { $copy = clone $this; $copy->sqlBuilder->innerJoin($table, $tablePrimaryKey, $fromTableForeignKey); return $copy; } + + /** + * @see SqlBuilder::selectAs + * @return PdoDataSet + */ function selectAs($select, $as) { $copy = clone $this; $copy->sqlBuilder->selectAs($select, $as); return $copy; } + + /** + * @see SqlBuilder::distinct + * @return PdoDataSet + */ function distinct() { $copy = clone $this; $copy->sqlBuilder->distinct(); return $copy; } + + /** + * @see SqlBuilder::equal + * @return PdoDataSet + */ function equal($lhs, $rhs){ $copy = clone $this; $copy->sqlBuilder->equal($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::notEqual + * @return PdoDataSet + */ function notEqual($lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->notEqual($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::between + * @return PdoDataSet + */ function between ($column, $lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->between($column, $lhs, $rhs); return $copy; } + + /** + * @see SqlBuilder::greaterThan + * @return PdoDataSet + */ function greaterThan($lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->greaterThan($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::greaterThanOrEqualTo + * @return PdoDataSet + */ function greaterThanOrEqualTo($lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->greaterThanOrEqualTo($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::lessThan + * @return PdoDataSet + */ function lessThan($lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->lessThan($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::lessThanOrEqualTo + * @return PdoDataSet + */ function lessThanOrEqualTo($lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->lessThanOrEqualTo($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::like + * @return PdoDataSet + */ function like($lhs, $rhs) { $copy = clone $this; $copy->sqlBuilder->like($lhs,$rhs); return $copy; } + + /** + * @see SqlBuilder::where + * @return PdoDataSet + */ function where($lhs, $rhs, $operator) { $copy = clone $this; $copy->sqlBuilder->where($lhs,$rhs,$operator); return $copy; } + + /** + * @see SqlBuilder::limit + * @return PdoDataSet + */ function limit($size) { $copy = clone $this; $copy->sqlBuilder->limit($size); return $copy; } + + /** + * @see SqlBuilder::offset + * @return PdoDataSet + */ function offset($offset) { $copy = clone $this; $copy->sqlBuilder->offset($offset); return $copy; } + + /** + * @see SqlBuilder::range + * @return PdoDataSet + */ function range($start, $finish) { $copy = clone $this; $copy->sqlBuilder->range($start,$finish); return $copy; } + + /** + * @see SqlBuilder::orderBy + * @return PdoDataSet + */ function orderBy($clause) { $copy = clone $this; $copy->sqlBuilder->orderBy($clause); return $copy; } } ?> \ No newline at end of file diff --git a/recess/lib/recess/database/pdo/PdoDataSource.class.php b/recess/lib/recess/database/pdo/PdoDataSource.class.php index f195513..894683a 100644 --- a/recess/lib/recess/database/pdo/PdoDataSource.class.php +++ b/recess/lib/recess/database/pdo/PdoDataSource.class.php @@ -11,6 +11,10 @@ * needed operations (i.e.: list tables, list columns in a table, etc). * * @author Kris Jordan + * @copyright 2008 Kris Jordan + * @package Recess! Framework + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @link http://www.recessframework.org/ */ class PdoDataSource extends PDO { const PROVIDER_CLASS_LOCATION = 'recess.database.pdo.'; @@ -104,6 +108,13 @@ function queryForClass(SqlBuilder $builder, $className) { return $this->provider->fetchAll($statement); } + /** + * Execute the query from a SqlBuilder instance. + * + * @param SqlBuilder $builder + * @param string $action + * @return boolean + */ function executeSqlBuilder(SqlBuilder $builder, $action) { return $this->provider->executeSqlBuilder($builder, $action, $this); } diff --git a/recess/lib/recess/database/pdo/RecessColumnDescriptor.class.php b/recess/lib/recess/database/pdo/RecessColumnDescriptor.class.php index cb1fa97..65d4bec 100644 --- a/recess/lib/recess/database/pdo/RecessColumnDescriptor.class.php +++ b/recess/lib/recess/database/pdo/RecessColumnDescriptor.class.php @@ -1,8 +1,12 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/pdo/RecessTableDescriptor.class.php b/recess/lib/recess/database/pdo/RecessTableDescriptor.class.php index aaa0eef..669e248 100644 --- a/recess/lib/recess/database/pdo/RecessTableDescriptor.class.php +++ b/recess/lib/recess/database/pdo/RecessTableDescriptor.class.php @@ -3,7 +3,12 @@ /** * RecessTableDescriptor represents a basic abstraction of an RDBMS table. + * * @author Kris Jordan + * @copyright 2008 Kris Jordan + * @package Recess! Framework + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + * @link http://www.recessframework.org/ */ class RecessTableDescriptor { diff --git a/recess/lib/recess/database/pdo/RecessType.class.php b/recess/lib/recess/database/pdo/RecessType.class.php index eb566b6..4ea4e41 100644 --- a/recess/lib/recess/database/pdo/RecessType.class.php +++ b/recess/lib/recess/database/pdo/RecessType.class.php @@ -1,5 +1,14 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/pdo/exceptions/DataSourceCouldNotConnectException.class.php b/recess/lib/recess/database/pdo/exceptions/DataSourceCouldNotConnectException.class.php index a708645..1437622 100644 --- a/recess/lib/recess/database/pdo/exceptions/DataSourceCouldNotConnectException.class.php +++ b/recess/lib/recess/database/pdo/exceptions/DataSourceCouldNotConnectException.class.php @@ -1,10 +1,12 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/pdo/exceptions/ProviderDoesNotExistException.class.php b/recess/lib/recess/database/pdo/exceptions/ProviderDoesNotExistException.class.php index d63045b..e60917b 100644 --- a/recess/lib/recess/database/pdo/exceptions/ProviderDoesNotExistException.class.php +++ b/recess/lib/recess/database/pdo/exceptions/ProviderDoesNotExistException.class.php @@ -1,12 +1,14 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/sql/ISqlConditions.class.php b/recess/lib/recess/database/sql/ISqlConditions.class.php index 3bdade5..7c6eb6d 100644 --- a/recess/lib/recess/database/sql/ISqlConditions.class.php +++ b/recess/lib/recess/database/sql/ISqlConditions.class.php @@ -1,5 +1,13 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/sql/ISqlSelectOptions.class.php b/recess/lib/recess/database/sql/ISqlSelectOptions.class.php index 6c36d0d..276a8c5 100644 --- a/recess/lib/recess/database/sql/ISqlSelectOptions.class.php +++ b/recess/lib/recess/database/sql/ISqlSelectOptions.class.php @@ -1,5 +1,13 @@ \ No newline at end of file diff --git a/recess/lib/recess/database/sql/SqlBuilder.class.php b/recess/lib/recess/database/sql/SqlBuilder.class.php index aec528c..54c92b3 100644 --- a/recess/lib/recess/database/sql/SqlBuilder.class.php +++ b/recess/lib/recess/database/sql/SqlBuilder.class.php @@ -22,6 +22,7 @@ * $sqlBuilder->getPdoArguments() returns array( ':column' => 'value' ) * * @author Kris Jordan + * @copyright 2008 Kris Jordan * @package Recess! Framework * @license http://www.opensource.org/licenses/mit-license.php The MIT License * @link http://www.recessframework.org/