From 5cb8bf3a2d0f7d7b9b0b5907a80aee85a8c6f2d9 Mon Sep 17 00:00:00 2001 From: mikl <> Date: Thu, 31 Jul 2008 13:07:13 +0000 Subject: Fixed #893: Added page parameter to queryForPagedList() --- demos/sqlmap/protected/pages/Manual/DataMapperAPI.page | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'demos') diff --git a/demos/sqlmap/protected/pages/Manual/DataMapperAPI.page b/demos/sqlmap/protected/pages/Manual/DataMapperAPI.page index 8f0b66a4..fb9552a3 100644 --- a/demos/sqlmap/protected/pages/Manual/DataMapperAPI.page +++ b/demos/sqlmap/protected/pages/Manual/DataMapperAPI.page @@ -9,7 +9,7 @@ the DataMapper framework. The DataMapper API methods are shown below.

public function queryForObject($statementName, $parameter=null, $result=null); public function queryForList($statementName, $parameter=null, $result=null, $skip=-1, $max=-1); -public function queryForPagedList($statementName, $parameter=null, $pageSize=10); +public function queryForPagedList($statementName, $parameter=null, $pageSize=10, $page=0); public function queryForMap($statementName, $parameter=null, $keyProperty=null, $valueProperty=null); public function insert($statementName, $parameter=null) @@ -78,7 +78,7 @@ point) and the maximum number to return.

QueryForPagedList

- public function queryForPagedList($statementName, $parameter=null, $pageSize=10); + public function queryForPagedList($statementName, $parameter=null, $pageSize=10, $page);

We live in an age of information overflow. A database query often returns more @@ -107,6 +107,14 @@ want to use a stored procedure or your own query that uses $skip and $max as parameters in queryForList. +

Tip: +The $page parameter was introduced in 3.1.3. Before there was an additional +query to always fetch the data for page 0 on object creation. Since this +might be a problem in performance critical situations with 3.1.2, you might be better +of also using queryForList with $skip and $max instead. +
+ +

QueryForMap

public function queryForMap($statementName, $parameter=null, @@ -159,4 +167,4 @@ catch } - \ No newline at end of file + -- cgit v1.2.3