NAME
DB::Object::ALL - ALL Operator Object
SYNOPSIS
my $op = $dbh->ALL( 1, 2, 3 );
# will produce:
ALL ( 1, 2, 3 )
"'something'" == $dbh->ALL( qw( some other words ) );
# 'something' ALL ( some, other, words );
"something" != $dbh->ALL( qw( some other words ) );
# 'something' NOT ALL ( some, other, words );
my $tbl = $dbh->my_table || die( $dbh->error );
$tbl->as( 't' );
my $sth = $tbl->select( 'DISTINCT field' );
my $sql = $tbl->fo->somefield == $dbh->ALL( $sth );
say $sql;
# t.somefield ALL (SELECT DISTINCT t.field FROM my_table t)
DESCRIPTION
This is the ALL
object class inheriting from DB::Object::Operator
METHODS
new
Takes a list of values that are saved in the newly created object returned.
as_string
Returns a string representation of this operator.
For example:
$dbh->ALL( qw( some other words ) );
# ALL ( some, other, words );
operator
Returns ALL
value
In list context, returns an array of those values passed to "new" and in scalar context, it returns those value as array reference.
OVERLOADING
Objects for this class have their ==
and !=
operators overloaded.
When overloading is called, it returns a new DB::Object::Expression that represents the formatted statement.
SEE ALSO
https://www.postgresql.org/docs/current/arrays.html#ARRAYS-SEARCHING
https://www.postgresql.org/docs/current/functions-comparisons.html#FUNCTIONS-COMPARISONS-IN-SCALAR
(There is no ALL
operator in MySQL or SQLite)
AUTHOR
Jacques Deguest <jack@deguest.jp>
COPYRIGHT & LICENSE
Copyright (c) 2023 DEGUEST Pte. Ltd.
You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.