Aion-Query

 view release on metacpan or  search on metacpan

i18n/Aion/Query.ru-en.po  view on Meta::CPAN

msgid "## query_row_ref ($query, %params)"
msgstr "## query_row_ref ($query, %params)"

msgid "Как `query_row`, но всегда возвращает скаляр."
msgstr "Like `query_row`, but always returns a scalar."

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."

lib/Aion/Query.pm  view on Meta::CPAN


Like C<query_row>, but always returns a scalar.

	my @x = query_row_ref "SELECT name FROM author WHERE id=2";
	\@x # --> [{name => "Pushkin A."}]
	
	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;



( run in 0.605 second using v1.01-cache-2.11-cpan-496ff517765 )