From ddc0de38f64e5834ce04f0407a8416172b596655 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 16 Dec 2006 03:56:03 +0000 Subject: removed adodb and framework/DataAccess --- .../SQLMap/Statements/TPreparedCommand.php | 60 ---------------------- 1 file changed, 60 deletions(-) delete mode 100644 framework/DataAccess/SQLMap/Statements/TPreparedCommand.php (limited to 'framework/DataAccess/SQLMap/Statements/TPreparedCommand.php') diff --git a/framework/DataAccess/SQLMap/Statements/TPreparedCommand.php b/framework/DataAccess/SQLMap/Statements/TPreparedCommand.php deleted file mode 100644 index 3557fc1f..00000000 --- a/framework/DataAccess/SQLMap/Statements/TPreparedCommand.php +++ /dev/null @@ -1,60 +0,0 @@ -getSQL()->getPreparedStatement($parameterObject); - $parameters = $this->applyParameterMap($connection, - $prepared, $statement, $parameterObject); - return array('sql'=>$prepared->getPreparedSql(), - 'parameters'=>$parameters); - } - - protected function applyParameterMap($connection, - $prepared, $statement, $parameterObject) - { - $properties = $prepared->getParameterNames(); - $parameters = $prepared->getParameterValues(); - $values = array(); - for($i = 0, $k=$properties->getCount(); $i<$k; $i++) - { - $property = $statement->parameterMap()->getProperty($i); - $values[] = $statement->parameterMap()->getParameter( - $property, $parameterObject, $statement); - } - return count($values) > 0 ? $values : false; - } - -/* protected function applyParameterClass($connection, $statement, $parameter) - { - $type=$statement->getParameterClass(); - if(strlen($type) < 1) return; - $prepared = $statement->getSql()->getPreparedStatement(); - $names = $prepared->getParameterNames(); - $values = $prepared->getParameterValues(); - switch (strtolower($type)) - { - case 'integer': - case 'int': - $values[$names[0]] = $connection->quote(intval($parameter)); - break; - case 'array': - foreach($names as $name) - { - $key = substr(substr($name,0,-1),1); - if(isset($parameter[$key])) - $values->add($name,$connection->quote($parameter[$key])); - else - throw new TDataMapperException('unable_to_find_parameter', $key); - } - break; - default: - var_dump("todo for other parameter classes"); - } - } -*/ -} - -?> \ No newline at end of file -- cgit v1.2.3