[postmodern-devel] Help with query replacement
Marijn Haverbeke
marijnh at gmail.com
Sat Mar 31 10:19:38 UTC 2007
Hi,
> By paging, I meant paging in the web pages - if I have 100
> results to a query, I would like to show that to the user in chunks of
> 20 rows over 5 pages
Ah, I see what you mean now. And I suppose it would be possible to
write some kind of macro for that. Or make the query a real run-time
list, and use compile-query to execute it. I don't have a lisp or very
much time right now, so I won't help you write the functions, but you
can bug the people in #lisp on irc about it or something if you can't
figure it out.
> Also, the element :count was not added to postmodern - I have checked
> the source too. So, I have to use :raw for now - please correct me if
> I'm wrong.
Did you try (sql (:count '*))? It works. By magic.
Actually, S-SQL has a fallback rule for operators it does not know.
They are rendered as simple function calls -- function(arg1, arg2,
...) -- so things like :count and any stored procedures you might
define work without the need for defining the operators.
Regards,
Marijn
More information about the postmodern-devel
mailing list