diff options
author | wei <> | 2007-05-08 08:06:13 +0000 |
---|---|---|
committer | wei <> | 2007-05-08 08:06:13 +0000 |
commit | e9486a539c3a43afcc129f647917780ffc1ed6cd (patch) | |
tree | 4e41bdf72611d424b6caa90489da3c34500164e9 /framework/Data/SqlMap/Statements/TCachingStatement.php | |
parent | 3392e51b4edf84682b66ce9e32d00c1adb3205bb (diff) |
Fixed #458
Diffstat (limited to 'framework/Data/SqlMap/Statements/TCachingStatement.php')
-rw-r--r-- | framework/Data/SqlMap/Statements/TCachingStatement.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/framework/Data/SqlMap/Statements/TCachingStatement.php b/framework/Data/SqlMap/Statements/TCachingStatement.php index 051a8ec3..4d39993d 100644 --- a/framework/Data/SqlMap/Statements/TCachingStatement.php +++ b/framework/Data/SqlMap/Statements/TCachingStatement.php @@ -42,15 +42,15 @@ class TCachingStatement implements IMappedStatement return $this->_mappedStatement->getManager();
}
- public function executeQueryForMap($connection, $parameter,$keyProperty, $valueProperty=null, $delegate=null)
+ public function executeQueryForMap($connection, $parameter,$keyProperty, $valueProperty=null, $skip=-1, $max=-1,$delegate=null)
{
- $sql = $this->createCommand($connection, $parameter);
- $key = $this->getCacheKey(array(clone($sql), $keyProperty, $valueProperty));
+ $sql = $this->createCommand($connection, $parameter, $skip, $max);
+ $key = $this->getCacheKey(array(clone($sql), $keyProperty, $valueProperty,$skip, $max));
$map = $this->getStatement()->getCache()->get($key);
if(is_null($map))
{
$map = $this->_mappedStatement->runQueryForMap(
- $connection, $parameter, $sql, $keyProperty, $valueProperty, $delegate);
+ $connection, $parameter, $sql, $keyProperty, $valueProperty, $delegate);
$this->getStatement()->getCache()->set($key, $map);
}
return $map;
@@ -68,13 +68,13 @@ class TCachingStatement implements IMappedStatement public function executeQueryForList($connection, $parameter, $result=null, $skip=-1, $max=-1, $delegate=null)
{
- $sql = $this->createCommand($connection, $parameter);
+ $sql = $this->createCommand($connection, $parameter, $skip, $max);
$key = $this->getCacheKey(array(clone($sql), $parameter, $skip, $max));
$list = $this->getStatement()->getCache()->get($key);
if(is_null($list))
{
$list = $this->_mappedStatement->runQueryForList(
- $connection, $parameter, $sql, $result, $skip, $max, $delegate);
+ $connection, $parameter, $sql, $result, $delegate);
$this->getStatement()->getCache()->set($key, $list);
}
return $list;
@@ -99,10 +99,10 @@ class TCachingStatement implements IMappedStatement return $cacheKey->getHash();
}
- protected function createCommand($connection, $parameter)
+ protected function createCommand($connection, $parameter, $skip=null, $max=null)
{
return $this->_mappedStatement->getCommand()->create($this->getManager(),
- $connection, $this->getStatement(), $parameter);
+ $connection, $this->getStatement(), $parameter, $skip, $max);
}
}
|