diff options
author | rojaro <> | 2009-07-15 07:58:26 +0000 |
---|---|---|
committer | rojaro <> | 2009-07-15 07:58:26 +0000 |
commit | f1c27f46100582a1e52a27b616bf468e849068e7 (patch) | |
tree | 2d9a569495b67c57302c483b37beb81c5a9800b8 | |
parent | 2ecfe49532dbfc53d75a32e68df643b7af13dc1f (diff) |
moved System.Db to System.Testing.Data and updated classes accordingly
-rw-r--r-- | .gitattributes | 60 | ||||
-rw-r--r-- | framework/Testing/Data/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY (renamed from framework/Db/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY) | 0 | ||||
-rw-r--r-- | framework/Testing/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php (renamed from framework/Db/ActiveRecord/Relations/TActiveRecordRelationContext.php) | 4 | ||||
-rw-r--r-- | framework/Testing/Data/ActiveRecord/TActiveFinder.php (renamed from framework/Db/ActiveRecord/TActiveFinder.php) | 26 | ||||
-rw-r--r-- | framework/Testing/Data/ActiveRecord/TActiveRecord.php (renamed from framework/Db/ActiveRecord/TActiveRecord.php) | 68 | ||||
-rw-r--r-- | framework/Testing/Data/ActiveRecord/TActiveRecordBehavior.php (renamed from framework/Db/ActiveRecord/TActiveRecordBehavior.php) | 2 | ||||
-rw-r--r-- | framework/Testing/Data/ActiveRecord/TActiveRecordCriteria.php (renamed from framework/Db/ActiveRecord/TActiveRecordCriteria.php) | 2 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/TDbColumnSchema.php (renamed from framework/Db/Schema/TDbColumnSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/TDbCommandBuilder.php (renamed from framework/Db/Schema/TDbCommandBuilder.php) | 6 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/TDbCriteria.php (renamed from framework/Db/Schema/TDbCriteria.php) | 2 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/TDbExpression.php (renamed from framework/Db/Schema/TDbExpression.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/TDbSchema.php (renamed from framework/Db/Schema/TDbSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/TDbTableSchema.php (renamed from framework/Db/Schema/TDbTableSchema.php) | 2 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mssql/TMssqlColumnSchema.php (renamed from framework/Db/Schema/mssql/TMssqlColumnSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mssql/TMssqlCommandBuilder.php (renamed from framework/Db/Schema/mssql/TMssqlCommandBuilder.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mssql/TMssqlPdoAdapter.php (renamed from framework/Db/Schema/mssql/TMssqlPdoAdapter.php) | 2 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mssql/TMssqlSchema.php (renamed from framework/Db/Schema/mssql/TMssqlSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mssql/TMssqlTableSchema.php (renamed from framework/Db/Schema/mssql/TMssqlTableSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mysql/TMysqlColumnSchema.php (renamed from framework/Db/Schema/mysql/TMysqlColumnSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mysql/TMysqlSchema.php (renamed from framework/Db/Schema/mysql/TMysqlSchema.php) | 8 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/mysql/TMysqlTableSchema.php (renamed from framework/Db/Schema/mysql/TMysqlTableSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/oci/TOciColumnSchema.php (renamed from framework/Db/Schema/oci/TOciColumnSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/oci/TOciCommandBuilder.php (renamed from framework/Db/Schema/oci/TOciCommandBuilder.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/oci/TOciSchema.php (renamed from framework/Db/Schema/oci/TOciSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/oci/TOciTableSchema.php (renamed from framework/Db/Schema/oci/TOciTableSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/pgsql/TPgsqlColumnSchema.php (renamed from framework/Db/Schema/pgsql/TPgsqlColumnSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/pgsql/TPgsqlSchema.php (renamed from framework/Db/Schema/pgsql/TPgsqlSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/pgsql/TPgsqlTableSchema.php (renamed from framework/Db/Schema/pgsql/TPgsqlTableSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/sqlite/TSqliteColumnSchema.php (renamed from framework/Db/Schema/sqlite/TSqliteColumnSchema.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/sqlite/TSqliteCommandBuilder.php (renamed from framework/Db/Schema/sqlite/TSqliteCommandBuilder.php) | 4 | ||||
-rwxr-xr-x | framework/Testing/Data/Schema/sqlite/TSqliteSchema.php (renamed from framework/Db/Schema/sqlite/TSqliteSchema.php) | 10 | ||||
-rwxr-xr-x | framework/Testing/Data/TDataSourceConfig.php (renamed from framework/Db/TDataSourceConfig.php) | 8 | ||||
-rwxr-xr-x | framework/Testing/Data/TDbCommand.php (renamed from framework/Db/TDbCommand.php) | 50 | ||||
-rwxr-xr-x | framework/Testing/Data/TDbConnection.php (renamed from framework/Db/TDbConnection.php) | 30 | ||||
-rwxr-xr-x | framework/Testing/Data/TDbDataReader.php (renamed from framework/Db/TDbDataReader.php) | 2 | ||||
-rwxr-xr-x | framework/Testing/Data/TDbTransaction.php (renamed from framework/Db/TDbTransaction.php) | 8 |
36 files changed, 183 insertions, 179 deletions
diff --git a/.gitattributes b/.gitattributes index 7d788744..7f1970c3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2207,36 +2207,6 @@ framework/Data/TDbCommand.php -text framework/Data/TDbConnection.php -text framework/Data/TDbDataReader.php -text framework/Data/TDbTransaction.php -text -framework/Db/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY -text -framework/Db/ActiveRecord/Relations/TActiveRecordRelationContext.php -text -framework/Db/ActiveRecord/TActiveFinder.php -text -framework/Db/ActiveRecord/TActiveRecord.php -text -framework/Db/ActiveRecord/TActiveRecordBehavior.php -text -framework/Db/ActiveRecord/TActiveRecordCriteria.php -text -framework/Db/Schema/TDbColumnSchema.php -text -framework/Db/Schema/TDbCommandBuilder.php -text -framework/Db/Schema/TDbCriteria.php -text -framework/Db/Schema/TDbExpression.php -text -framework/Db/Schema/TDbSchema.php -text -framework/Db/Schema/TDbTableSchema.php -text -framework/Db/Schema/mssql/TMssqlColumnSchema.php -text -framework/Db/Schema/mssql/TMssqlCommandBuilder.php -text -framework/Db/Schema/mssql/TMssqlPdoAdapter.php -text -framework/Db/Schema/mssql/TMssqlSchema.php -text -framework/Db/Schema/mssql/TMssqlTableSchema.php -text -framework/Db/Schema/mysql/TMysqlColumnSchema.php -text -framework/Db/Schema/mysql/TMysqlSchema.php -text -framework/Db/Schema/mysql/TMysqlTableSchema.php -text -framework/Db/Schema/oci/TOciColumnSchema.php -text -framework/Db/Schema/oci/TOciCommandBuilder.php -text -framework/Db/Schema/oci/TOciSchema.php -text -framework/Db/Schema/oci/TOciTableSchema.php -text -framework/Db/Schema/pgsql/TPgsqlColumnSchema.php -text -framework/Db/Schema/pgsql/TPgsqlSchema.php -text -framework/Db/Schema/pgsql/TPgsqlTableSchema.php -text -framework/Db/Schema/sqlite/TSqliteColumnSchema.php -text -framework/Db/Schema/sqlite/TSqliteCommandBuilder.php -text -framework/Db/Schema/sqlite/TSqliteSchema.php -text framework/Exceptions/TErrorHandler.php -text framework/Exceptions/TException.php -text framework/Exceptions/messages/messages-id.txt -text @@ -2568,6 +2538,36 @@ framework/TComponent.php -text framework/TModule.php -text framework/TService.php -text framework/TShellApplication.php -text +framework/Testing/Data/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY -text +framework/Testing/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php -text +framework/Testing/Data/ActiveRecord/TActiveFinder.php -text +framework/Testing/Data/ActiveRecord/TActiveRecord.php -text +framework/Testing/Data/ActiveRecord/TActiveRecordBehavior.php -text +framework/Testing/Data/ActiveRecord/TActiveRecordCriteria.php -text +framework/Testing/Data/Schema/TDbColumnSchema.php -text +framework/Testing/Data/Schema/TDbCommandBuilder.php -text +framework/Testing/Data/Schema/TDbCriteria.php -text +framework/Testing/Data/Schema/TDbExpression.php -text +framework/Testing/Data/Schema/TDbSchema.php -text +framework/Testing/Data/Schema/TDbTableSchema.php -text +framework/Testing/Data/Schema/mssql/TMssqlColumnSchema.php -text +framework/Testing/Data/Schema/mssql/TMssqlCommandBuilder.php -text +framework/Testing/Data/Schema/mssql/TMssqlPdoAdapter.php -text +framework/Testing/Data/Schema/mssql/TMssqlSchema.php -text +framework/Testing/Data/Schema/mssql/TMssqlTableSchema.php -text +framework/Testing/Data/Schema/mysql/TMysqlColumnSchema.php -text +framework/Testing/Data/Schema/mysql/TMysqlSchema.php -text +framework/Testing/Data/Schema/mysql/TMysqlTableSchema.php -text +framework/Testing/Data/Schema/oci/TOciColumnSchema.php -text +framework/Testing/Data/Schema/oci/TOciCommandBuilder.php -text +framework/Testing/Data/Schema/oci/TOciSchema.php -text +framework/Testing/Data/Schema/oci/TOciTableSchema.php -text +framework/Testing/Data/Schema/pgsql/TPgsqlColumnSchema.php -text +framework/Testing/Data/Schema/pgsql/TPgsqlSchema.php -text +framework/Testing/Data/Schema/pgsql/TPgsqlTableSchema.php -text +framework/Testing/Data/Schema/sqlite/TSqliteColumnSchema.php -text +framework/Testing/Data/Schema/sqlite/TSqliteCommandBuilder.php -text +framework/Testing/Data/Schema/sqlite/TSqliteSchema.php -text framework/Util/TDataFieldAccessor.php -text framework/Util/TDateTimeStamp.php -text framework/Util/TLogRouter.php -text diff --git a/framework/Db/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY b/framework/Testing/Data/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY index 8c7a4073..8c7a4073 100644 --- a/framework/Db/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY +++ b/framework/Testing/Data/ActiveRecord/Relations/DEPRECATED_COMPATIBILITY_REASONS_ONLY diff --git a/framework/Db/ActiveRecord/Relations/TActiveRecordRelationContext.php b/framework/Testing/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php index 696bb5b1..f13043df 100644 --- a/framework/Db/ActiveRecord/Relations/TActiveRecordRelationContext.php +++ b/framework/Testing/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php @@ -7,7 +7,7 @@ * @copyright Copyright © 2005-2008 PradoSoft * @license http://www.pradosoft.com/license/
* @version $Id$
- * @package System.Data.ActiveRecord.Relations
+ * @package System.Testing.Data.ActiveRecord.Relations
*/
/**
@@ -20,7 +20,7 @@ *
* @author Wei Zhuo <weizho[at]gmail[dot]com>
* @version $Id$
- * @package System.Data.ActiveRecord.Relations
+ * @package System.Testing.Data.ActiveRecord.Relations
* @since 3.1
*/
class TActiveRecordRelationContext
diff --git a/framework/Db/ActiveRecord/TActiveFinder.php b/framework/Testing/Data/ActiveRecord/TActiveFinder.php index d55074c0..d1c35bdf 100644 --- a/framework/Db/ActiveRecord/TActiveFinder.php +++ b/framework/Testing/Data/ActiveRecord/TActiveFinder.php @@ -15,7 +15,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveFinder.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TActiveFinder extends TComponent @@ -92,7 +92,7 @@ class TActiveFinder extends TComponent */ public function find($condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.find() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.find() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createCriteria($condition,$params); return $this->query($criteria); } @@ -102,7 +102,7 @@ class TActiveFinder extends TComponent */ public function findAll($condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findAll() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findAll() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createCriteria($condition,$params); return $this->query($criteria,true); } @@ -112,7 +112,7 @@ class TActiveFinder extends TComponent */ public function findByPk($pk,$condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findByPk() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findByPk() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createPkCriteria($this->_joinTree->model->getTableSchema(),$pk,$condition,$params); return $this->query($criteria); } @@ -122,7 +122,7 @@ class TActiveFinder extends TComponent */ public function findAllByPk($pk,$condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findAllByPk() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findAllByPk() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createPkCriteria($this->_joinTree->model->getTableSchema(),$pk,$condition,$params); return $this->query($criteria,true); } @@ -132,7 +132,7 @@ class TActiveFinder extends TComponent */ public function findByAttributes($attributes,$condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findByAttributes() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findByAttributes() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createColumnCriteria($this->_joinTree->model->getTableSchema(),$attributes,$condition,$params); return $this->query($criteria); } @@ -142,7 +142,7 @@ class TActiveFinder extends TComponent */ public function findAllByAttributes($attributes,$condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findAllByAttributes() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findAllByAttributes() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createColumnCriteria($this->_joinTree->model->getTableSchema(),$attributes,$condition,$params); return $this->query($criteria,true); } @@ -152,7 +152,7 @@ class TActiveFinder extends TComponent */ public function findBySql($sql,$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findBySql() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findBySql() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); if(($row=$this->_builder->createSqlCommand($sql,$params)->queryRow())!==false) { $baseRecord=$this->_joinTree->model->populateRecord($row,false); @@ -167,7 +167,7 @@ class TActiveFinder extends TComponent */ public function findAllBySql($sql,$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.findAllBySql() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.findAllBySql() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); if(($rows=$this->_builder->createSqlCommand($sql,$params)->queryAll())!==array()) { $baseRecords=$this->_joinTree->model->populateRecords($rows,false); @@ -185,7 +185,7 @@ class TActiveFinder extends TComponent */ public function count($condition='',$params=array()) { - Prado::trace(get_class($this->_joinTree->model).'.count() eagerly','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this->_joinTree->model).'.count() eagerly','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->_builder->createCriteria($condition,$params); if($this->_criteria!==null) { @@ -290,7 +290,7 @@ class TActiveFinder extends TComponent * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveFinder.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TJoinElement @@ -882,7 +882,7 @@ class TJoinElement * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveFinder.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TJoinQuery @@ -1031,7 +1031,7 @@ class TJoinQuery * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveFinder.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0.4 */ class TStatElement diff --git a/framework/Db/ActiveRecord/TActiveRecord.php b/framework/Testing/Data/ActiveRecord/TActiveRecord.php index c0ffc32e..8d6c5e10 100644 --- a/framework/Db/ActiveRecord/TActiveRecord.php +++ b/framework/Testing/Data/ActiveRecord/TActiveRecord.php @@ -17,15 +17,15 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ Prado::using('System.Base.TModel'); -Prado::using('System.Db.*'); -Prado::using('System.Db.ActiveRecord.*'); +Prado::using('System.Testing.Data.*'); +Prado::using('System.Testing.Data.ActiveRecord.*'); Prado::using('System.Base.TEvent'); -Prado::using('System.Db.ActiveRecord.TActiveRecordCriteria'); +Prado::using('System.Testing.Data.ActiveRecord.TActiveRecordCriteria'); abstract class TActiveRecord extends TModel { @@ -215,7 +215,7 @@ abstract class TActiveRecord extends TModel if(!isset($md->relations[$name])) throw new TDbException(get_class($this).' does not have relation "'.$name.'".'); - Prado::trace('lazy loading '.get_class($this).'.'.$name,'System.Db.ActiveRecord.TActiveRecord'); + Prado::trace('lazy loading '.get_class($this).'.'.$name,'System.Testing.Data.ActiveRecord.TActiveRecord'); $relation=$md->relations[$name]; if($this->getIsNewRecord() && ($relation instanceof THasOneRelation || $relation instanceof THasManyRelation)) return $relation instanceof THasOneRelation ? null : array(); @@ -855,7 +855,7 @@ abstract class TActiveRecord extends TModel throw new TDbException('The active record cannot be inserted to database because it is not new.'); if($this->beforeSave()) { - Prado::trace(get_class($this).'.insert()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.insert()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $table=$this->getMetaData()->tableSchema; $command=$builder->createInsertCommand($table,$this->getAttributes($attributes)); @@ -905,7 +905,7 @@ abstract class TActiveRecord extends TModel throw new TDbException('The active record cannot be updated because it is new.'); if($this->beforeSave()) { - Prado::trace(get_class($this).'.update()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.update()','System.Testing.Data.ActiveRecord.TActiveRecord'); $this->updateByPk($this->getPrimaryKey(),$this->getAttributes($attributes)); $this->afterSave(); return true; @@ -936,7 +936,7 @@ abstract class TActiveRecord extends TModel { if(!$this->getIsNewRecord()) { - Prado::trace(get_class($this).'.saveAttributes()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.saveAttributes()','System.Testing.Data.ActiveRecord.TActiveRecord'); $values=array(); foreach($attributes as $name=>$value) { @@ -960,7 +960,7 @@ abstract class TActiveRecord extends TModel { if(!$this->getIsNewRecord()) { - Prado::trace(get_class($this).'.delete()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.delete()','System.Testing.Data.ActiveRecord.TActiveRecord'); if($this->beforeDelete()) { $result=$this->deleteByPk($this->getPrimaryKey())>0; @@ -980,7 +980,7 @@ abstract class TActiveRecord extends TModel */ public function refresh() { - Prado::trace(get_class($this).'.refresh()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.refresh()','System.Testing.Data.ActiveRecord.TActiveRecord'); if(!$this->getIsNewRecord() && ($record=$this->findByPk($this->getPrimaryKey()))!==null) { $this->_attributes=array(); @@ -1053,7 +1053,7 @@ abstract class TActiveRecord extends TModel */ public function find($condition='',$params=array()) { - Prado::trace(get_class($this).'.find()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.find()','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); $criteria->limit=1; return $this->query($criteria); @@ -1068,7 +1068,7 @@ abstract class TActiveRecord extends TModel */ public function findAll($condition='',$params=array()) { - Prado::trace(get_class($this).'.findAll()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findAll()','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->getCommandBuilder()->createCriteria($condition,$params); return $this->query($criteria,true); } @@ -1083,7 +1083,7 @@ abstract class TActiveRecord extends TModel */ public function findByPk($pk,$condition='',$params=array()) { - Prado::trace(get_class($this).'.findByPk()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findByPk()','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->getCommandBuilder()->createPkCriteria($this->getTableSchema(),$pk,$condition,$params); $criteria->limit=1; return $this->query($criteria); @@ -1099,7 +1099,7 @@ abstract class TActiveRecord extends TModel */ public function findAllByPk($pk,$condition='',$params=array()) { - Prado::trace(get_class($this).'.findAllByPk()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findAllByPk()','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->getCommandBuilder()->createPkCriteria($this->getTableSchema(),$pk,$condition,$params); return $this->query($criteria,true); } @@ -1114,7 +1114,7 @@ abstract class TActiveRecord extends TModel */ public function findByAttributes($attributes,$condition='',$params=array()) { - Prado::trace(get_class($this).'.findByAttributes()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findByAttributes()','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->getCommandBuilder()->createColumnCriteria($this->getTableSchema(),$attributes,$condition,$params); $criteria->limit=1; return $this->query($criteria); @@ -1130,7 +1130,7 @@ abstract class TActiveRecord extends TModel */ public function findAllByAttributes($attributes,$condition='',$params=array()) { - Prado::trace(get_class($this).'.findAllByAttributes()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findAllByAttributes()','System.Testing.Data.ActiveRecord.TActiveRecord'); $criteria=$this->getCommandBuilder()->createColumnCriteria($this->getTableSchema(),$attributes,$condition,$params); return $this->query($criteria,true); } @@ -1143,7 +1143,7 @@ abstract class TActiveRecord extends TModel */ public function findBySql($sql,$params=array()) { - Prado::trace(get_class($this).'.findBySql()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findBySql()','System.Testing.Data.ActiveRecord.TActiveRecord'); $command=$this->getCommandBuilder()->createSqlCommand($sql,$params); return $this->populateRecord($command->queryRow()); } @@ -1156,7 +1156,7 @@ abstract class TActiveRecord extends TModel */ public function findAllBySql($sql,$params=array()) { - Prado::trace(get_class($this).'.findAllBySql()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.findAllBySql()','System.Testing.Data.ActiveRecord.TActiveRecord'); $command=$this->getCommandBuilder()->createSqlCommand($sql,$params); return $this->populateRecords($command->queryAll()); } @@ -1170,7 +1170,7 @@ abstract class TActiveRecord extends TModel */ public function count($condition='',$params=array()) { - Prado::trace(get_class($this).'.count()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.count()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $criteria=$builder->createCriteria($condition,$params); $this->applyScopes($criteria); @@ -1186,7 +1186,7 @@ abstract class TActiveRecord extends TModel */ public function countBySql($sql,$params=array()) { - Prado::trace(get_class($this).'.countBySql()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.countBySql()','System.Testing.Data.ActiveRecord.TActiveRecord'); return $this->getCommandBuilder()->createSqlCommand($sql,$params)->queryScalar(); } @@ -1199,7 +1199,7 @@ abstract class TActiveRecord extends TModel */ public function exists($condition,$params=array()) { - Prado::trace(get_class($this).'.exists()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.exists()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $criteria=$builder->createCriteria($condition,$params); $table=$this->getTableSchema(); @@ -1269,7 +1269,7 @@ abstract class TActiveRecord extends TModel */ public function updateByPk($pk,$attributes,$condition='',$params=array()) { - Prado::trace(get_class($this).'.updateByPk()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.updateByPk()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $table=$this->getTableSchema(); $criteria=$builder->createPkCriteria($table,$pk,$condition,$params); @@ -1289,7 +1289,7 @@ abstract class TActiveRecord extends TModel */ public function updateAll($attributes,$condition='',$params=array()) { - Prado::trace(get_class($this).'.updateAll()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.updateAll()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $criteria=$builder->createCriteria($condition,$params); $this->applyScopes($criteria); @@ -1308,7 +1308,7 @@ abstract class TActiveRecord extends TModel */ public function updateCounters($counters,$condition='',$params=array()) { - Prado::trace(get_class($this).'.updateCounters()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.updateCounters()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $criteria=$builder->createCriteria($condition,$params); $this->applyScopes($criteria); @@ -1326,7 +1326,7 @@ abstract class TActiveRecord extends TModel */ public function deleteByPk($pk,$condition='',$params=array()) { - Prado::trace(get_class($this).'.deleteByPk()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.deleteByPk()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $criteria=$builder->createPkCriteria($this->getTableSchema(),$pk,$condition,$params); $this->applyScopes($criteria); @@ -1343,7 +1343,7 @@ abstract class TActiveRecord extends TModel */ public function deleteAll($condition='',$params=array()) { - Prado::trace(get_class($this).'.deleteAll()','System.Db.ActiveRecord.TActiveRecord'); + Prado::trace(get_class($this).'.deleteAll()','System.Testing.Data.ActiveRecord.TActiveRecord'); $builder=$this->getCommandBuilder(); $criteria=$builder->createCriteria($condition,$params); $this->applyScopes($criteria); @@ -1451,7 +1451,7 @@ abstract class TActiveRecord extends TModel * CBaseActiveRelation is the base class for all active relations. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0.4 */ class TBaseActiveRelation extends TComponent @@ -1577,7 +1577,7 @@ class TBaseActiveRelation extends TComponent * CStatRelation represents a statistical relational query. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0.4 */ class TStatRelation extends TBaseActiveRelation @@ -1612,7 +1612,7 @@ class TStatRelation extends TBaseActiveRelation * CActiveRelation is the base class for representing active relations that bring back related objects. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TActiveRelation extends TBaseActiveRelation @@ -1683,7 +1683,7 @@ class TActiveRelation extends TBaseActiveRelation * CBelongsToRelation represents the parameters specifying a BELONGS_TO relation. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TBelongsToRelation extends TActiveRelation @@ -1695,7 +1695,7 @@ class TBelongsToRelation extends TActiveRelation * CHasOneRelation represents the parameters specifying a HAS_ONE relation. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class THasOneRelation extends TActiveRelation @@ -1707,7 +1707,7 @@ class THasOneRelation extends TActiveRelation * CHasManyRelation represents the parameters specifying a HAS_MANY relation. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class THasManyRelation extends TActiveRelation @@ -1749,7 +1749,7 @@ class THasManyRelation extends TActiveRelation * CManyManyRelation represents the parameters specifying a MANY_MANY relation. * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TManyManyRelation extends THasManyRelation @@ -1762,7 +1762,7 @@ class TManyManyRelation extends THasManyRelation * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecord.php 1127 2009-06-13 20:26:35Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0 */ class TActiveRecordMetaData diff --git a/framework/Db/ActiveRecord/TActiveRecordBehavior.php b/framework/Testing/Data/ActiveRecord/TActiveRecordBehavior.php index 1e4ccbae..cd4d8386 100644 --- a/framework/Db/ActiveRecord/TActiveRecordBehavior.php +++ b/framework/Testing/Data/ActiveRecord/TActiveRecordBehavior.php @@ -15,7 +15,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: CActiveRecordBehavior.php 564 2009-01-21 22:07:10Z qiang.xue $ - * @package System.Db.ActiveRecord + * @package System.Testing.Data.ActiveRecord * @since 1.0.2 */ class TActiveRecordBehavior extends TModelBehavior diff --git a/framework/Db/ActiveRecord/TActiveRecordCriteria.php b/framework/Testing/Data/ActiveRecord/TActiveRecordCriteria.php index 9dded69a..46eddaf9 100644 --- a/framework/Db/ActiveRecord/TActiveRecordCriteria.php +++ b/framework/Testing/Data/ActiveRecord/TActiveRecordCriteria.php @@ -7,7 +7,7 @@ * @author Daniel Mueller <tux@penguinfriends.org> */ -Prado::using('System.Db.Schema.TDbCriteria'); +Prado::using('System.Testing.Data.Schema.TDbCriteria'); class TSqlCriteria extends TDbCriteria { diff --git a/framework/Db/Schema/TDbColumnSchema.php b/framework/Testing/Data/Schema/TDbColumnSchema.php index f2c4faaa..92b7c0bd 100755 --- a/framework/Db/Schema/TDbColumnSchema.php +++ b/framework/Testing/Data/Schema/TDbColumnSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbExpression'); +prado::using('System.Testing.Data.Schema.TDbExpression'); /** * TDbColumnSchema class describes the column meta data of a database table. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TDbColumnSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema + * @package System.Testing.Data.Schema * @since 1.0 */ class TDbColumnSchema extends TComponent diff --git a/framework/Db/Schema/TDbCommandBuilder.php b/framework/Testing/Data/Schema/TDbCommandBuilder.php index 7c25888d..7a196439 100755 --- a/framework/Db/Schema/TDbCommandBuilder.php +++ b/framework/Testing/Data/Schema/TDbCommandBuilder.php @@ -8,15 +8,15 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbSchema'); -prado::using('System.Db.Schema.TDbCriteria'); +prado::using('System.Testing.Data.Schema.TDbSchema'); +prado::using('System.Testing.Data.Schema.TDbCriteria'); /** * TDbCommandBuilder provides basic methods to create query commands for tables. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TDbCommandBuilder.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema + * @package System.Testing.Data.Schema * @since 1.0 */ class TDbCommandBuilder extends TComponent diff --git a/framework/Db/Schema/TDbCriteria.php b/framework/Testing/Data/Schema/TDbCriteria.php index 3dab036a..585765e9 100755 --- a/framework/Db/Schema/TDbCriteria.php +++ b/framework/Testing/Data/Schema/TDbCriteria.php @@ -13,7 +13,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TDbCriteria.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package system.db.schema + * @package System.Testing.Data.schema * @since 1.0 */ class TDbCriteria diff --git a/framework/Db/Schema/TDbExpression.php b/framework/Testing/Data/Schema/TDbExpression.php index 86b9a1ef..a1819000 100755 --- a/framework/Db/Schema/TDbExpression.php +++ b/framework/Testing/Data/Schema/TDbExpression.php @@ -19,7 +19,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TDbExpression.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package system.db.schema + * @package System.Testing.Data.Schema * @since 1.0.2 */ class TDbExpression extends TComponent @@ -46,4 +46,4 @@ class TDbExpression extends TComponent { return $this->expression; } -}
\ No newline at end of file +} diff --git a/framework/Db/Schema/TDbSchema.php b/framework/Testing/Data/Schema/TDbSchema.php index 6837b7e5..2c568e7e 100755 --- a/framework/Db/Schema/TDbSchema.php +++ b/framework/Testing/Data/Schema/TDbSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbCommandBuilder'); +prado::using('System.Testing.Data.Schema.TDbCommandBuilder'); /** * TDbSchema is the base class for retrieving metadata information. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TDbSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema + * @package System.Testing.Data.Schema * @since 1.0 */ abstract class TDbSchema extends TComponent diff --git a/framework/Db/Schema/TDbTableSchema.php b/framework/Testing/Data/Schema/TDbTableSchema.php index eaeda1b4..8472059b 100755 --- a/framework/Db/Schema/TDbTableSchema.php +++ b/framework/Testing/Data/Schema/TDbTableSchema.php @@ -25,7 +25,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TDbTableSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package system.db.schema + * @package System.Testing.Data.Schema * @since 1.0 */ class TDbTableSchema extends TComponent diff --git a/framework/Db/Schema/mssql/TMssqlColumnSchema.php b/framework/Testing/Data/Schema/mssql/TMssqlColumnSchema.php index 0c5c6ac4..0123f183 100755 --- a/framework/Db/Schema/mssql/TMssqlColumnSchema.php +++ b/framework/Testing/Data/Schema/mssql/TMssqlColumnSchema.php @@ -9,7 +9,7 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbColumnSchema'); +prado::using('System.Testing.Data.Schema.TDbColumnSchema'); /** * TMssqlColumnSchema class describes the column meta data of a MSSQL table. @@ -17,7 +17,7 @@ prado::using('System.Db.Schema.TDbColumnSchema'); * @author Qiang Xue <qiang.xue@gmail.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @version $Id: TMssqlColumnSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.mssql + * @package System.Testing.Data.Schema.mssql * @since 1.0.4 */ class TMssqlColumnSchema extends TDbColumnSchema diff --git a/framework/Db/Schema/mssql/TMssqlCommandBuilder.php b/framework/Testing/Data/Schema/mssql/TMssqlCommandBuilder.php index f0b5c7f4..17a6f6ab 100755 --- a/framework/Db/Schema/mssql/TMssqlCommandBuilder.php +++ b/framework/Testing/Data/Schema/mssql/TMssqlCommandBuilder.php @@ -10,7 +10,7 @@ * @license http://www.yiiframework.com/license/ */ -prado::using ('System.Db.schame.TDbCommandBuilder'); +prado::using ('System.Testing.Data.schame.TDbCommandBuilder'); /** * TMssqlCommandBuilder provides basic methods to create query commands for tables for Mssql Servers. @@ -19,7 +19,7 @@ prado::using ('System.Db.schame.TDbCommandBuilder'); * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @version $Id: TMssqlCommandBuilder.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package system.db.schema.mssql + * @package System.Testing.Data.schema.mssql * @since 1.0.4 */ class TMssqlCommandBuilder extends TDbCommandBuilder diff --git a/framework/Db/Schema/mssql/TMssqlPdoAdapter.php b/framework/Testing/Data/Schema/mssql/TMssqlPdoAdapter.php index c9d4597f..6f8777dd 100755 --- a/framework/Db/Schema/mssql/TMssqlPdoAdapter.php +++ b/framework/Testing/Data/Schema/mssql/TMssqlPdoAdapter.php @@ -13,7 +13,7 @@ * It provides some missing functionalities of pdo driver * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @version $Id: TMssqlPdoAdapter.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package system.db.schema.mssql + * @package System.Testing.Data.schema.mssql * @since 1.0.4 */ class TMssqlPdoAdapter extends PDO diff --git a/framework/Db/Schema/mssql/TMssqlSchema.php b/framework/Testing/Data/Schema/mssql/TMssqlSchema.php index 063e8994..1b3d815c 100755 --- a/framework/Db/Schema/mssql/TMssqlSchema.php +++ b/framework/Testing/Data/Schema/mssql/TMssqlSchema.php @@ -9,7 +9,7 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbSchema'); +prado::using('System.Testing.Data.Schema.TDbSchema'); /** * TMssqlSchema is the class for retrieving metadata information from a MS SQL Server database. @@ -17,7 +17,7 @@ prado::using('System.Db.Schema.TDbSchema'); * @author Qiang Xue <qiang.xue@gmail.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @version $Id: TMssqlSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.mssql + * @package System.Testing.Data.Schema.mssql * @since 1.0.4 */ class TMssqlSchema extends TDbSchema diff --git a/framework/Db/Schema/mssql/TMssqlTableSchema.php b/framework/Testing/Data/Schema/mssql/TMssqlTableSchema.php index ed1b7c8a..b6584a32 100755 --- a/framework/Db/Schema/mssql/TMssqlTableSchema.php +++ b/framework/Testing/Data/Schema/mssql/TMssqlTableSchema.php @@ -9,7 +9,7 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.TDbTableSchema'); +prado::using('System.Testing.Data.TDbTableSchema'); /** * TMssqlTableSchema represents the metadata for a MSSQL table. @@ -17,7 +17,7 @@ prado::using('System.Db.TDbTableSchema'); * @author Qiang Xue <qiang.xue@gmail.com> * @author Christophe Boulain <Christophe.Boulain@gmail.com> * @version $Id: TMssqlTableSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package system.Db.schema.mssql + * @package System.Testing.Data.Schema.mssql * @since 1.0.4 */ class TMssqlTableSchema extends TDbTableSchema diff --git a/framework/Db/Schema/mysql/TMysqlColumnSchema.php b/framework/Testing/Data/Schema/mysql/TMysqlColumnSchema.php index d3bb230c..9e82ada5 100755 --- a/framework/Db/Schema/mysql/TMysqlColumnSchema.php +++ b/framework/Testing/Data/Schema/mysql/TMysqlColumnSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbColumnSchema'); +prado::using('System.Testing.Data.Schema.TDbColumnSchema'); /** * TMysqlColumnSchema class describes the column meta data of a MySQL table. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TMysqlColumnSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.mysql + * @package System.Testing.Data.Schema.mysql * @since 1.0 */ class TMysqlColumnSchema extends TDbColumnSchema diff --git a/framework/Db/Schema/mysql/TMysqlSchema.php b/framework/Testing/Data/Schema/mysql/TMysqlSchema.php index 8061e7a8..910bf915 100755 --- a/framework/Db/Schema/mysql/TMysqlSchema.php +++ b/framework/Testing/Data/Schema/mysql/TMysqlSchema.php @@ -8,16 +8,16 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbSchema'); -prado::using('System.Db.Schema.mysql.TMysqlTableSchema'); -prado::using('System.Db.Schema.mysql.TMysqlColumnSchema'); +prado::using('System.Testing.Data.Schema.TDbSchema'); +prado::using('System.Testing.Data.Schema.mysql.TMysqlTableSchema'); +prado::using('System.Testing.Data.Schema.mysql.TMysqlColumnSchema'); /** * TMysqlSchema is the class for retrieving metadata information from a MySQL database (version 4.1.x and 5.x). * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TMysqlSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.mysql + * @package System.Testing.Data.Schema.mysql * @since 1.0 */ class TMysqlSchema extends TDbSchema diff --git a/framework/Db/Schema/mysql/TMysqlTableSchema.php b/framework/Testing/Data/Schema/mysql/TMysqlTableSchema.php index 8bed3314..87f5eefd 100755 --- a/framework/Db/Schema/mysql/TMysqlTableSchema.php +++ b/framework/Testing/Data/Schema/mysql/TMysqlTableSchema.php @@ -7,13 +7,13 @@ * @copyright Copyright © 2008-2009 Yii Software LLC * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbTableSchema'); +prado::using('System.Testing.Data.Schema.TDbTableSchema'); /** * TMysqlTableSchema represents the metadata for a MySQL table. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TMysqlTableSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.mysql + * @package System.Testing.Data.Schema.mysql * @since 1.0 */ class TMysqlTableSchema extends TDbTableSchema diff --git a/framework/Db/Schema/oci/TOciColumnSchema.php b/framework/Testing/Data/Schema/oci/TOciColumnSchema.php index d609d14d..d8c77e16 100755 --- a/framework/Db/Schema/oci/TOciColumnSchema.php +++ b/framework/Testing/Data/Schema/oci/TOciColumnSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbColumnSchema'); +prado::using('System.Testing.Data.Schema.TDbColumnSchema'); /** * TOciColumnSchema class describes the column meta data of a Oracle table. * * @author Ricardo Grana <rickgrana@yahoo.com.br> * @version $Id: TOciColumnSchema.php - * @package System.Db.Schema.oci + * @package System.Testing.Data.Schema.oci * @since 1.0.5 */ class TOciColumnSchema extends TDbColumnSchema diff --git a/framework/Db/Schema/oci/TOciCommandBuilder.php b/framework/Testing/Data/Schema/oci/TOciCommandBuilder.php index 807b7271..ed3e8c3b 100755 --- a/framework/Db/Schema/oci/TOciCommandBuilder.php +++ b/framework/Testing/Data/Schema/oci/TOciCommandBuilder.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbCommandBuilder'); +prado::using('System.Testing.Data.Schema.TDbCommandBuilder'); /** * TOciCommandBuilder provides basic methods to create query commands for tables. * * @author Ricardo Grana <rickgrana@yahoo.com.br> * @version $Id: TOciCommandBuilder.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.oci + * @package System.Testing.Data.Schema.oci * @since 1.0.5 */ class TOciCommandBuilder extends TDbCommandBuilder diff --git a/framework/Db/Schema/oci/TOciSchema.php b/framework/Testing/Data/Schema/oci/TOciSchema.php index 50de0626..1253dac6 100755 --- a/framework/Db/Schema/oci/TOciSchema.php +++ b/framework/Testing/Data/Schema/oci/TOciSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbSchema'); +prado::using('System.Testing.Data.Schema.TDbSchema'); /** * TOciSchema is the class for retrieving metadata information from a PostgreSQL database. * * @author Ricardo Grana <qiang.xue@gmail.com> * @version $Id: TOciSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.oci + * @package System.Testing.Data.Schema.oci * @since 1.0.5 */ class TOciSchema extends TDbSchema diff --git a/framework/Db/Schema/oci/TOciTableSchema.php b/framework/Testing/Data/Schema/oci/TOciTableSchema.php index 9fe73624..4376c528 100755 --- a/framework/Db/Schema/oci/TOciTableSchema.php +++ b/framework/Testing/Data/Schema/oci/TOciTableSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbTableSchame'); +prado::using('System.Testing.Data.Schema.TDbTableSchame'); /** * TOciTableSchema represents the metadata for a Ora table. * * @author Ricardo Grana <rickgrana@yahoo.com.br> * @version $Id: TOciTableSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.oci + * @package System.Testing.Data.Schema.oci * @since 1.0.5 */ class TOciTableSchema extends TDbTableSchema diff --git a/framework/Db/Schema/pgsql/TPgsqlColumnSchema.php b/framework/Testing/Data/Schema/pgsql/TPgsqlColumnSchema.php index 3677cd44..7872dd4a 100755 --- a/framework/Db/Schema/pgsql/TPgsqlColumnSchema.php +++ b/framework/Testing/Data/Schema/pgsql/TPgsqlColumnSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbColumnSchema'); +prado::using('System.Testing.Data.Schema.TDbColumnSchema'); /** * TPgsqlColumnSchema class describes the column meta data of a PostgreSQL table. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TPgsqlColumnSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.pgsql + * @package System.Testing.Data.Schema.pgsql * @since 1.0 */ class TPgsqlColumnSchema extends TDbColumnSchema diff --git a/framework/Db/Schema/pgsql/TPgsqlSchema.php b/framework/Testing/Data/Schema/pgsql/TPgsqlSchema.php index 5f009208..05e0fbfa 100755 --- a/framework/Db/Schema/pgsql/TPgsqlSchema.php +++ b/framework/Testing/Data/Schema/pgsql/TPgsqlSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbSchema'); +prado::using('System.Testing.Data.Schema.TDbSchema'); /** * TPgsqlSchema is the class for retrieving metadata information from a PostgreSQL database. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TPgsqlSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.pgsql + * @package System.Testing.Data.Schema.pgsql * @since 1.0 */ class TPgsqlSchema extends TDbSchema diff --git a/framework/Db/Schema/pgsql/TPgsqlTableSchema.php b/framework/Testing/Data/Schema/pgsql/TPgsqlTableSchema.php index 9c14da28..5e79b6f0 100755 --- a/framework/Db/Schema/pgsql/TPgsqlTableSchema.php +++ b/framework/Testing/Data/Schema/pgsql/TPgsqlTableSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbTableSchema'); +prado::using('System.Testing.Data.Schema.TDbTableSchema'); /** * TPgsqlTable represents the metadata for a PostgreSQL table. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TPgsqlTableSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.pgsql + * @package System.Testing.Data.Schema.pgsql * @since 1.0 */ class TPgsqlTableSchema extends TDbTableSchema diff --git a/framework/Db/Schema/sqlite/TSqliteColumnSchema.php b/framework/Testing/Data/Schema/sqlite/TSqliteColumnSchema.php index ca6858eb..9926e852 100755 --- a/framework/Db/Schema/sqlite/TSqliteColumnSchema.php +++ b/framework/Testing/Data/Schema/sqlite/TSqliteColumnSchema.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbColumnSchema'); +prado::using('System.Testing.Data.Schema.TDbColumnSchema'); /** * TSqliteColumnSchema class describes the column meta data of a SQLite table. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TSqliteColumnSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.sqlite + * @package System.Testing.Data.Schema.sqlite * @since 1.0 */ class TSqliteColumnSchema extends TDbColumnSchema diff --git a/framework/Db/Schema/sqlite/TSqliteCommandBuilder.php b/framework/Testing/Data/Schema/sqlite/TSqliteCommandBuilder.php index 69ffd8a8..fa79b890 100755 --- a/framework/Db/Schema/sqlite/TSqliteCommandBuilder.php +++ b/framework/Testing/Data/Schema/sqlite/TSqliteCommandBuilder.php @@ -8,14 +8,14 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbCommandBuilder'); +prado::using('System.Testing.Data.Schema.TDbCommandBuilder'); /** * TSqliteCommandBuilder provides basic methods to create query commands for SQLite tables. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TSqliteCommandBuilder.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.sqlite + * @package System.Testing.Data.Schema.sqlite * @since 1.0 */ class TSqliteCommandBuilder extends TDbCommandBuilder diff --git a/framework/Db/Schema/sqlite/TSqliteSchema.php b/framework/Testing/Data/Schema/sqlite/TSqliteSchema.php index 0e3d4f9a..dd3e73af 100755 --- a/framework/Db/Schema/sqlite/TSqliteSchema.php +++ b/framework/Testing/Data/Schema/sqlite/TSqliteSchema.php @@ -8,17 +8,17 @@ * @license http://www.yiiframework.com/license/ */ -prado::using('System.Db.Schema.TDbSchema'); -prado::using('System.Db.Schema.TDbTableSchema'); -prado::using('System.Db.Schema.sqlite.TSqliteColumnSchema'); -prado::using('System.Db.Schema.sqlite.TSqliteCommandBuilder'); +prado::using('System.Testing.Data.Schema.TDbSchema'); +prado::using('System.Testing.Data.Schema.TDbTableSchema'); +prado::using('System.Testing.Data.Schema.sqlite.TSqliteColumnSchema'); +prado::using('System.Testing.Data.Schema.sqlite.TSqliteCommandBuilder'); /** * TSqliteSchema is the class for retrieving metadata information from a SQLite (2/3) database. * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id: TSqliteSchema.php 2679 2009-06-15 07:49:42Z Christophe.Boulain $ - * @package System.Db.Schema.sqlite + * @package System.Testing.Data.Schema.sqlite * @since 1.0 */ class TSqliteSchema extends TDbSchema diff --git a/framework/Db/TDataSourceConfig.php b/framework/Testing/Data/TDataSourceConfig.php index 56d87bc0..356e7f17 100755 --- a/framework/Db/TDataSourceConfig.php +++ b/framework/Testing/Data/TDataSourceConfig.php @@ -8,10 +8,10 @@ * @copyright Copyright © 2005-2009 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data + * @package System.Testing.Data */ -Prado::using('System.Db.TDbConnection'); +Prado::using('System.Testing.Data.TDbConnection'); /** * TDataSourceConfig module class provides <module> configuration for database connections. @@ -44,14 +44,14 @@ Prado::using('System.Db.TDbConnection'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data + * @package System.Testing.Data * @since 3.1 */ class TDataSourceConfig extends TModule { private $_connID=''; private $_conn; - private $_connClass='System.Db.TDbConnection'; + private $_connClass='System.Testing.Data.TDbConnection'; /** * Initalize the database connection properties from attributes in <database> tag. diff --git a/framework/Db/TDbCommand.php b/framework/Testing/Data/TDbCommand.php index 6c3a0074..dd3a9fe6 100755 --- a/framework/Db/TDbCommand.php +++ b/framework/Testing/Data/TDbCommand.php @@ -30,7 +30,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id$ - * @package system.db + * @package System.Testing.Data * @since 1.0 */ class TDbCommand extends TComponent @@ -114,7 +114,7 @@ class TDbCommand extends TComponent } catch(Exception $e) { - Prado::log('Error in preparing SQL: '.$this->getText(),TLogger::ERROR,'system.Db.TDbCommand'); + Prado::log('Error in preparing SQL: '.$this->getText(),TLogger::ERROR,'System.Testing.Data.TDbCommand'); throw new TDbException('TDbCommand failed to prepare the SQL statement: {0}', $e->getMessage()); } @@ -185,11 +185,12 @@ class TDbCommand extends TComponent public function execute() { $params=$this->_connection->enableParamLogging && !empty($this->_params) ? '. Bind with parameter ' . implode(', ',$this->_params) : ''; - Prado::trace('Executing SQL: '.$this->getText().$params,'system.Db.TDbCommand'); + Prado::trace('Executing SQL: '.$this->getText().$params,'System.Testing.Data.TDbCommand'); try { - /*if($this->_connection->enableProfiling) - Yii::beginProfile('system.db.TDbCommand.execute('.$this->getText().')','system.db.TDbCommand.execute'); + /* + if($this->_connection->enableProfiling) + Prado::beginProfile('System.Testing.Data.TDbCommand.execute('.$this->getText().')','System.Testing.Data.TDbCommand.execute'); */ if($this->_statement instanceof PDOStatement) { @@ -198,18 +199,19 @@ class TDbCommand extends TComponent } else $n=$this->getConnection()->getPdoInstance()->exec($this->getText()); - - /*if($this->_connection->enableProfiling) - Yii::endProfile('system.db.TDbCommand.execute('.$this->getText().')','system.db.TDbCommand.execute'); + /* + if($this->_connection->enableProfiling) + Prado::endProfile('System.Testing.Data.TDbCommand.execute('.$this->getText().')','System.Testing.Data.TDbCommand.execute'); */ return $n; } catch(Exception $e) { - /*if($this->_connection->enableProfiling) - Yii::endProfile('system.db.TDbCommand.execute('.$this->getText().')','system.db.TDbCommand.execute'); - */ - Prado::log('Error in executing SQL: '.$this->getText().$params,TLogger::ERROR,'system.db.TDbCommand'); + /* + if($this->_connection->enableProfiling) + Prado::endProfile('System.Testing.Data.TDbCommand.execute('.$this->getText().')','System.Testing.Data.TDbCommand.execute'); + */ + Prado::log('Error in executing SQL: '.$this->getText().$params,TLogger::ERROR,'System.Testing.Data.TDbCommand'); throw new TDbException('TDbCommand failed to execute the SQL statement: {0}', $e->getMessage()); } @@ -303,11 +305,12 @@ class TDbCommand extends TComponent private function queryInternal($method,$mode) { $params=$this->_connection->enableParamLogging && !empty($this->_params) ? '. Bind with parameter ' . implode(', ',$this->_params) : ''; - Prado::trace('Querying SQL: '.$this->getText().$params,'system.Db.TDbCommand'); + Prado::trace('Querying SQL: '.$this->getText().$params,'System.Testing.Data.TDbCommand'); try { - /*if($this->_connection->enableProfiling) - Yii::beginProfile('system.db.TDbCommand.query('.$this->getText().')','system.db.TDbCommand.query'); + /* + if($this->_connection->enableProfiling) + Prado::beginProfile('System.Testing.Data.TDbCommand.query('.$this->getText().')','System.Testing.Data.TDbCommand.query'); */ if($this->_statement instanceof PDOStatement) $this->_statement->execute(); @@ -321,18 +324,19 @@ class TDbCommand extends TComponent $result=$this->_statement->{$method}($mode); $this->_statement->closeCursor(); } - - /*if($this->_connection->enableProfiling) - Yii::endProfile('system.db.TDbCommand.query('.$this->getText().')','system.db.TDbCommand.query'); - */ + /* + if($this->_connection->enableProfiling) + Prado::endProfile('System.Testing.Data.TDbCommand.query('.$this->getText().')','System.Testing.Data.TDbCommand.query'); + */ return $result; } catch(Exception $e) { -/* if($this->_connection->enableProfiling) - Yii::endProfile('system.db.TDbCommand.query('.$this->getText().')','system.db.TDbCommand.query'); - */ - Prado::log('Error in querying SQL: '.$this->getText().$params,TLogger::ERROR,'system.Db.TDbCommand'); + /* + if($this->_connection->enableProfiling) + prado::endProfile('System.Testing.Data.TDbCommand.query('.$this->getText().')','System.Testing.Data.TDbCommand.query'); + */ + Prado::log('Error in querying SQL: '.$this->getText().$params,TLogger::ERROR,'System.Testing.Data..TDbCommand'); throw new TDbException('TDbCommand failed to execute the SQL statement: {0}', $e->getMessage()); } diff --git a/framework/Db/TDbConnection.php b/framework/Testing/Data/TDbConnection.php index d377b552..92708907 100755 --- a/framework/Db/TDbConnection.php +++ b/framework/Testing/Data/TDbConnection.php @@ -9,8 +9,8 @@ * @license http://www.yiiframework.com/license/ */ -prado::using ('System.Db.TDbCommand'); -prado::using ('System.Db.TDbTransaction'); +prado::using ('System.Testing.Data.TDbCommand'); +prado::using ('System.Testing.Data.TDbTransaction'); /** * TDbConnection represents a connection to a database. @@ -73,7 +73,7 @@ prado::using ('System.Db.TDbTransaction'); * @author Qiang Xue <qiang.xue@gmail.com> * @author Christophe.Boulain <Christophe.Boulain@gmail.com> * @version $Id$ - * @package System.Db + * @package System.Testing.Data * @since 3.2 */ class TDbConnection extends TComponent @@ -228,7 +228,7 @@ class TDbConnection extends TComponent throw new TDbException('TDbConnection.connectionString cannot be empty.'); try { - Prado::trace('Opening DB connection','system.Db.TDbConnection'); + Prado::trace('Opening DB connection','System.Testing.Data.TDbConnection'); $this->_pdo=$this->createPdoInstance(); $this->initConnection($this->_pdo); $this->_active=true; @@ -246,7 +246,7 @@ class TDbConnection extends TComponent */ protected function close() { - Prado::trace('Closing DB connection','system.Db.TDbConnection'); + Prado::trace('Closing DB connection','System.Testing.Data.TDbConnection'); $this->_pdo=null; $this->_active=false; $this->_schema=null; @@ -267,7 +267,7 @@ class TDbConnection extends TComponent $driver=strtolower(substr($this->connectionString,0,$pos)); if($driver==='mssql' || $driver==='dblib') { - prado::using('System.Db.Schema.mssql.TMssqlPdoAdapter'); + prado::using('System.Testing.Data.Schema.mssql.TMssqlPdoAdapter'); $pdoClass='TMssqlPdoAdapter'; } } @@ -371,22 +371,22 @@ class TDbConnection extends TComponent switch(strtolower($driver)) { case 'pgsql': // PostgreSQL - prado::using('System.Db.Schema.pgsql.TPgsqlSchema'); + prado::using('System.Testing.Data.Schema.pgsql.TPgsqlSchema'); return $this->_schema=new TPgsqlSchema($this); case 'mysqli': // MySQL case 'mysql': - prado::using('System.Db.Schema.mysql.TMysqlSchema'); + prado::using('System.Testing.Data.Schema.mysql.TMysqlSchema'); return $this->_schema=new TMysqlSchema($this); case 'sqlite': // sqlite 3 case 'sqlite2': // sqlite 2 - prado::using('System.Db.Schema.sqlite.TSqliteSchema'); + prado::using('System.Testing.Data.Schema.sqlite.TSqliteSchema'); return $this->_schema=new TSqliteSchema($this); case 'mssql': // Mssql driver on windows hosts case 'dblib': // dblib drivers on linux (and maybe others os) hosts - prado::using('System.Db.Schema.mssql.TMssqlSchema'); + prado::using('System.Testing.Data.Schema.mssql.TMssqlSchema'); return $this->_schema=new TMssqlSchema($this); case 'oci': // Oracle driver - prado::using('System.Db.Schema.oci.TOciSchema'); + prado::using('System.Testing.Data.Schema.oci.TOciSchema'); return $this->_schema=new TOciSchema($this); case 'ibm': default: @@ -674,10 +674,10 @@ class TDbConnection extends TComponent public function getStats() { /*$logger=Yii::getLogger(); - $timings=$logger->getProfilingResults(null,'system.Db.TDbCommand.query'); + $timings=$logger->getProfilingResults(null,'System.Testing.Data.TDbCommand.query'); $count=count($timings); $time=array_sum($timings); - $timings=$logger->getProfilingResults(null,'system.Db.TDbCommand.execute'); + $timings=$logger->getProfilingResults(null,'System.Testing.Data.TDbCommand.execute'); $count+=count($timings); $time+=array_sum($timings); return array($count,$time);*/ @@ -715,7 +715,7 @@ class TDbConnection extends TComponent * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id$ - * @package System.Db + * @package System.Testing.Data * @since 3.0 */ class TDbColumnCaseMode extends TEnumerable @@ -739,7 +739,7 @@ class TDbColumnCaseMode extends TEnumerable * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id$ - * @package System.Db + * @package System.Testing.Data * @since 3.0 */ class TDbNullConversionMode extends TEnumerable diff --git a/framework/Db/TDbDataReader.php b/framework/Testing/Data/TDbDataReader.php index 87fee5ed..6014ff04 100755 --- a/framework/Db/TDbDataReader.php +++ b/framework/Testing/Data/TDbDataReader.php @@ -27,7 +27,7 @@ * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id$ - * @package system.db + * @package System.Testing.Data * @since 1.0 */ class TDbDataReader extends TComponent implements Iterator diff --git a/framework/Db/TDbTransaction.php b/framework/Testing/Data/TDbTransaction.php index 357dd645..41a2c1f9 100755 --- a/framework/Db/TDbTransaction.php +++ b/framework/Testing/Data/TDbTransaction.php @@ -8,7 +8,7 @@ * @license http://www.yiiframework.com/license/ */ -Prado::using('System.Db.TDbDataReader'); +Prado::using('System.Testing.Data.TDbDataReader'); /** @@ -34,7 +34,7 @@ Prado::using('System.Db.TDbDataReader'); * * @author Qiang Xue <qiang.xue@gmail.com> * @version $Id$ - * @package system.db + * @package System.Testing.Data * @since 1.0 */ class TDbTransaction extends TComponent @@ -61,7 +61,7 @@ class TDbTransaction extends TComponent { if($this->_active && $this->_connection->getActive()) { - Prado::trace('Committing transaction','system.Db.TDbTransaction'); + Prado::trace('Committing transaction','System.Testing.Data.TDbTransaction'); $this->_connection->getPdoInstance()->commit(); $this->_active=false; } @@ -77,7 +77,7 @@ class TDbTransaction extends TComponent { if($this->_active && $this->_connection->getActive()) { - Prado::trace('Rolling back transaction','system.Fb.TDbTransaction'); + Prado::trace('Rolling back transaction','System.Testing.Data.TDbTransaction'); $this->_connection->getPdoInstance()->rollBack(); $this->_active=false; } |