diff options
Diffstat (limited to 'framework/Data/SqlMap/Statements')
12 files changed, 47 insertions, 47 deletions
diff --git a/framework/Data/SqlMap/Statements/IMappedStatement.php b/framework/Data/SqlMap/Statements/IMappedStatement.php index 15f61fad..175b6f39 100644 --- a/framework/Data/SqlMap/Statements/IMappedStatement.php +++ b/framework/Data/SqlMap/Statements/IMappedStatement.php @@ -3,7 +3,7 @@ * IMappedStatement interface file. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id$ + * @version $Id: IMappedStatement.php 3187 2012-07-12 11:21:01Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -11,7 +11,7 @@ * Interface for all mapping statements. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: IMappedStatement.php 3187 2012-07-12 11:21:01Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TCachingStatement.php b/framework/Data/SqlMap/Statements/TCachingStatement.php index 1e734f45..b01280de 100644 --- a/framework/Data/SqlMap/Statements/TCachingStatement.php +++ b/framework/Data/SqlMap/Statements/TCachingStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TCachingStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TCacheingStatement class. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TCachingStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php b/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php index 0e7dbd37..4b023dc7 100644 --- a/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TDeleteMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TDeleteMappedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TDeleteMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TInsertMappedStatement.php b/framework/Data/SqlMap/Statements/TInsertMappedStatement.php index cdfb735b..02bd4a68 100644 --- a/framework/Data/SqlMap/Statements/TInsertMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TInsertMappedStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TInsertMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TInsertMappedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TInsertMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TMappedStatement.php b/framework/Data/SqlMap/Statements/TMappedStatement.php index 779608c9..40caf4f7 100644 --- a/framework/Data/SqlMap/Statements/TMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TMappedStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -17,7 +17,7 @@ * This class is usualy instantiated during SQLMap configuration by TSqlDomBuilder. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.0 */ @@ -939,7 +939,7 @@ class TMappedStatement extends TComponent implements IMappedStatement * TPostSelectBinding class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ @@ -975,7 +975,7 @@ class TPostSelectBinding * build using the {@link collect} method. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ @@ -1163,7 +1163,7 @@ class TSqlMapObjectCollectionTree extends TComponent * TResultSetListItemParameter class * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ @@ -1200,7 +1200,7 @@ class TResultSetListItemParameter extends TComponent * TResultSetMapItemParameter class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TPreparedCommand.php b/framework/Data/SqlMap/Statements/TPreparedCommand.php index e86e096c..59a58b5d 100644 --- a/framework/Data/SqlMap/Statements/TPreparedCommand.php +++ b/framework/Data/SqlMap/Statements/TPreparedCommand.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TPreparedCommand.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -17,7 +17,7 @@ Prado::using('System.Data.Common.TDbCommandBuilder'); * TPreparedCommand class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TPreparedCommand.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ @@ -47,10 +47,9 @@ class TPreparedCommand protected function applyParameterMap($manager,$command,$prepared, $statement, $parameterObject) { - $properties = $prepared->getParameterNames(false); - //$parameters = $prepared->getParameterValues(); + $properties = $prepared->getParameterNames(); + $parameters = $prepared->getParameterValues(); $registry=$manager->getTypeHandlers(); - if ($properties) for($i = 0, $k=$properties->getCount(); $i<$k; $i++) { $property = $statement->parameterMap()->getProperty($i); diff --git a/framework/Data/SqlMap/Statements/TPreparedStatement.php b/framework/Data/SqlMap/Statements/TPreparedStatement.php index b4a7c272..f46994ab 100644 --- a/framework/Data/SqlMap/Statements/TPreparedStatement.php +++ b/framework/Data/SqlMap/Statements/TPreparedStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TPreparedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TpreparedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TPreparedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ @@ -24,32 +24,33 @@ class TPreparedStatement extends TComponent private $_parameterNames; private $_parameterValues; + public function __construct() + { + $this->_parameterNames=new TList; + $this->_parameterValues=new TMap; + } + public function getPreparedSql(){ return $this->_sqlString; } public function setPreparedSql($value){ $this->_sqlString = $value; } - public function getParameterNames($needed = true) - { - if (!$this->_parameterNames and $needed) - $this->_parameterNames = new TList; - return $this->_parameterNames; - } - + public function getParameterNames(){ return $this->_parameterNames; } public function setParameterNames($value){ $this->_parameterNames = $value; } - public function getParameterValues($needed = true) - { - if (!$this->_parameterValues and $needed) - $this->_parameterValues=new TMap; - return $this->_parameterValues; - } - + public function getParameterValues(){ return $this->_parameterValues; } public function setParameterValues($value){ $this->_parameterValues = $value; } + + public function __wakeup() + { + parent::__wakeup(); + if (!$this->_parameterNames) $this->_parameterNames = new TList; + if (!$this->_parameterValues) $this->_parameterValues = new TMap; + } public function __sleep() { $exprops = array(); $cn = __CLASS__; - if (!$this->_parameterNames or !$this->_parameterNames->getCount()) $exprops[] = "\0$cn\0_parameterNames"; - if (!$this->_parameterValues or !$this->_parameterValues->getCount()) $exprops[] = "\0$cn\0_parameterValues"; + if (!$this->_parameterNames->getCount()) $exprops[] = "\0$cn\0_parameterNames"; + if (!$this->_parameterValues->getCount()) $exprops[] = "\0$cn\0_parameterValues"; return array_diff(parent::__sleep(),$exprops); } } diff --git a/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php b/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php index 7e386e67..5fdd16b5 100644 --- a/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php +++ b/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TPreparedStatementFactory.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TPreparedStatementFactory class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TPreparedStatementFactory.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TSelectMappedStatement.php b/framework/Data/SqlMap/Statements/TSelectMappedStatement.php index 8fa87224..b0926c41 100644 --- a/framework/Data/SqlMap/Statements/TSelectMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TSelectMappedStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TSelectMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TSelectMappedStatment class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TSelectMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php b/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php index c1446f84..3fce2e3a 100644 --- a/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php +++ b/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TSimpleDynamicSql.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TSimpleDynamicSql class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TSimpleDynamicSql.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TStaticSql.php b/framework/Data/SqlMap/Statements/TStaticSql.php index e097438c..1da6330e 100644 --- a/framework/Data/SqlMap/Statements/TStaticSql.php +++ b/framework/Data/SqlMap/Statements/TStaticSql.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TStaticSql.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TStaticSql class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TStaticSql.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ diff --git a/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php b/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php index 4e560bb9..d3c3acc4 100644 --- a/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php @@ -6,7 +6,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2013 PradoSoft * @license http://www.pradosoft.com/license/ - * @version $Id$ + * @version $Id: TUpdateMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements */ @@ -14,7 +14,7 @@ * TUpdateMappedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ + * @version $Id: TUpdateMappedStatement.php 3245 2013-01-07 20:23:32Z ctrlaltca $ * @package System.Data.SqlMap.Statements * @since 3.1 */ |