NAME

DBIx::Squirrel::Util - helpers shared by DBIx::Squirrel's modules

DESCRIPTION

Functions DBIx::Squirrel's modules share, exported on request. They're for DBIx::Squirrel itself, not for use elsewhere, and may change without notice.

FUNCTIONS

canonical
$string = canonical(\%options);

Returns options as a string, the same for the same options, for the DBI's caches to key on.

install_sub
install_sub($full_name, $code);

Installs a subroutine by its full name, naming an anonymous one so.

is_name
$bool = is_name($name);

Returns true if a name can be a subroutine's.

iterator_going
$iterator = iterator_going($sth);

Returns the iterator going through a statement handle's results, if one has results left to hand out, or nothing.

shift_attrs
$attrs = shift_attrs(\@args);

Takes the attributes off the front of a list of arguments, if they're there: a hash reference, or undef.

split_attrs
($dbi_attrs, $ekorn_attrs) = split_attrs(\%attrs);

Splits attributes into the DBI's and DBIx::Squirrel's own, those starting ekorn_.

split_stages
@stages = split_stages(\@args);

Takes the code references off the end of a list of arguments, and returns them.

unwrap_values
@values = unwrap_values($driver, $taken, @values);

Returns the bind values given, or those in an array reference given alone, unless DBD::Pg would bind it as a PostgreSQL array.

DIAGNOSTICS

Expected a reference to a HASH or ARRAY

The first argument after a statement was a reference, but not to a hash or an array, as "do" in DBIx::Squirrel::db describes.

SEE ALSO

DBIx::Squirrel

AUTHOR

Iain Campbell <cpanic@cpan.org>

LICENSE

Copyright (c) 2024-2026 by Iain Campbell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.