hi folks!

new engine doesn't support complex paginatio  with page number or total
number of records, because this needs a second sql query to count record
(we know that is faster that making a unique big query to count all records
and extract the record of current page).

Jakub's (pagination( give me another idea to make complex pagination. Other
markup, independent of sql loop:

(pagination("SELECT count() FROM * ", "Showing [num_records_in_page] of
[num_records"])pagination)

((pagination( sql_totalize("SELECT * FROM .."), "Showing
[num_records_in_page] of [num_records"])pagination)

syntax: a SQL that must give a integer and a micro-template.

In widget:
(pagination(...)pagination)  // note pagination is outside sql loops.
...
(sql(...here the data)sql)

that can be strange but allows:
- user chooses when he want a complex pagination and where it goes: before
block or after.
- user can provide a optimized SQL statements, or lets Aiko to totalize the
sql statements.

thanks jakub

Roger
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to     : aikiframework-devel@lists.launchpad.net
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help   : https://help.launchpad.net/ListHelp

Reply via email to