Basset
view release on metacpan or search on metacpan
lib/Basset/DB/Table/View.pm view on Meta::CPAN
=begin btest select_query
my $o = __PACKAGE__->new();
$test->ok($o, "Got object");
$test->is(scalar(__PACKAGE__->select_query), undef, "could not call object method as class method");
$test->is(__PACKAGE__->errcode, "BO-08", "proper error code");
$test->is(scalar($o->select_query), undef, 'select_query is undefined');
$test->is($o->select_query('abc'), 'abc', 'set select_query to abc');
$test->is($o->select_query(), 'abc', 'read value of select_query - abc');
my $h = {};
$test->ok($h, 'got hashref');
$test->is($o->select_query($h), $h, 'set select_query to hashref');
$test->is($o->select_query(), $h, 'read value of select_query - hashref');
my $a = [];
$test->ok($a, 'got arrayref');
$test->is($o->select_query($a), $a, 'set select_query to arrayref');
$test->is($o->select_query(), $a, 'read value of select_query - arrayref');
=end btest
=back
=cut
sub insert_query {
return shift->error("Views cannot insert", "BDTV-01");
}
=pod
=begin btest insert_query
my $o = __PACKAGE__->new();
$test->ok($o, "got object");
$test->ok(! $o->insert_query, "Cannot call insert_query");
$test->is($o->errcode, "BDTV-01", "proper error code");
=end btest
=cut
sub replace_query {
return shift->error("Views cannot replace", "BDTV-02");
}
=pod
=begin btest replace_query
my $o = __PACKAGE__->new();
$test->ok($o, "got object");
$test->ok(! $o->replace_query, "Cannot call replace_query");
$test->is($o->errcode, "BDTV-02", "proper error code");
=end btest
=cut
sub update_query {
return shift->error("Views cannot update", "BDTV-03");
}
=pod
=begin btest update_query
my $o = __PACKAGE__->new();
$test->ok($o, "got object");
$test->ok(! $o->update_query, "Cannot call update_query");
$test->is($o->errcode, "BDTV-03", "proper error code");
=end btest
=cut
sub delete_query {
return shift->error("Views cannot delete", "BDTV-04");
}
=pod
=begin btest delete_query
my $o = __PACKAGE__->new();
$test->ok($o, "got object");
$test->ok(! $o->delete_query, "Cannot call delete_query");
$test->is($o->errcode, "BDTV-04", "proper error code");
=end btest
=cut
sub multiselect_query {
return shift->error("Views cannot multiselect", "BDTV-05");
}
=pod
=begin btest multiselect_query
my $o = __PACKAGE__->new();
$test->ok($o, "got object");
$test->ok(! $o->multiselect_query, "Cannot call multiselect_query");
$test->is($o->errcode, "BDTV-05", "proper error code");
=end btest
=cut
sub attach_to_query {
my $self = shift;
my $query = shift;
return $self->SUPER::attach_to_query($query);
}
=pod
=begin btest attach_to_query
( run in 0.675 second using v1.01-cache-2.11-cpan-5a3173703d6 )