Cool, but we should make sure simple pagination works too. Pagination is
off by default, right?

Jon Phillips
bj. +86-187-1003-9974
sf. +1-415-830-3884
http://fabricatorz.com

On Mar 10, 2012 5:59 PM, "Roger Martín" <rg1...@gmail.com> wrote:

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
_______________________________________________
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