summaryrefslogtreecommitdiff
path: root/framework/DataAccess/SQLMap/Statements/TPreparedCommand.php
diff options
context:
space:
mode:
authorwei <>2006-12-16 03:56:03 +0000
committerwei <>2006-12-16 03:56:03 +0000
commitddc0de38f64e5834ce04f0407a8416172b596655 (patch)
treea94c75b6e7a4f443f748124b84e30d02826bb23a /framework/DataAccess/SQLMap/Statements/TPreparedCommand.php
parentc8689010d28a0fe2a734131a2964d7df394cdf6c (diff)
removed adodb and framework/DataAccess
Diffstat (limited to 'framework/DataAccess/SQLMap/Statements/TPreparedCommand.php')
-rw-r--r--framework/DataAccess/SQLMap/Statements/TPreparedCommand.php60
1 files changed, 0 insertions, 60 deletions
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 @@
-<?php
-
-class TPreparedCommand
-{
-
- public function create($connection, $statement, $parameterObject)
- {
- $prepared = $statement->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