Aion-Query
view release on metacpan or search on metacpan
i18n/Aion/Query.ru-en.po view on Meta::CPAN
msgid "## query_scalar ($query, %params)"
msgstr "## query_scalar ($query, %params)"
msgid "ÐозвÑаÑÐ°ÐµÑ Ð¿ÐµÑвое знаÑение. ÐапÑÐ¾Ñ Ð´Ð¾Ð»Ð¶ÐµÐ½ возвÑаÑаÑÑ Ð¾Ð´Ð½Ñ ÑÑÑокÑ, инаÑе â вÑбÑаÑÑÐ²Ð°ÐµÑ Ð¸ÑклÑÑение."
msgstr "Returns the first value. The query must return one row, otherwise it throws an exception."
msgid "## make_query_for_order ($order, $next)"
msgstr "## make_query_for_order ($order, $next)"
msgid "Ð¡Ð¾Ð·Ð´Ð°ÐµÑ ÑÑловие запÑоÑа ÑÑÑаниÑÑ Ð½Ðµ по ÑмеÑениÑ, а по **пагинаÑии кÑÑÑоÑа**."
msgstr "Creates a page request condition not by offset, but by **cursor pagination**."
msgid "ÐÐ»Ñ ÑÑого он полÑÑÐ°ÐµÑ `$order` SQL-запÑоÑа и `$next` â ÑÑÑÐ»ÐºÑ Ð½Ð° ÑледÑÑÑÑÑ ÑÑÑаниÑÑ."
msgstr "To do this, it receives `$order` of the SQL query and `$next` - a link to the next page."
msgid "СмоÑÑиÑе Ñакже:"
msgstr "See also:"
msgid ""
"1. Article [Paging pages on social networks\n"
"](https://habr.com/ru/articles/674714/).\n"
lib/Aion/Query.pm view on Meta::CPAN
eval {query_row_ref "SELECT name FROM author"}; $@ # ~> A few lines!
=head2 query_scalar ($query, %params)
Returns the first value. The query must return one row, otherwise it throws an exception.
query_scalar "SELECT name FROM author WHERE id=2" # => Pushkin A.
=head2 make_query_for_order ($order, $next)
Creates a page request condition not by offset, but by B<cursor pagination>.
To do this, it receives C<$order> of the SQL query and C<$next> - a link to the next page.
my ($select, $where, $order_sel) = make_query_for_order "name DESC, id ASC", undef;
$select # => name || ',' || id
$where # -> 1
$order_sel # -> undef
my @rows = query "SELECT $select as next FROM author WHERE $where LIMIT 2";
( run in 0.275 second using v1.01-cache-2.11-cpan-4d50c553e7e )