[Dbix-class] Re: Custom SQL
kevin montuori
montuori at gmail.com
Mon Dec 14 16:58:24 GMT 2009
>>>>> "BG" == Bernhard Graf <dbic4 at augensalat.de> writes:
BG> It really frustrates me, when simple things become that difficult.
this incantation works for me:
package MyApp::Schema::MyApp::Result::AuthzPartial;
use strict;
use parent 'DBIx::Class::Core';
__PACKAGE__->table_class('DBIx::Class::ResultSource::View');
__PACKAGE__->table('NONE');
__PACKAGE__->add_columns( qw[ is_authz ] );
__PACKAGE__->result_source_instance->is_virtual(1);
__PACKAGE__->result_source_instance->view_definition
( q[ SELECT has_some_authz(?, ?, ?, ?) AS is_authz ] );
1;
k.
--
kevin montuori
montuori at gmail.com
More information about the DBIx-Class
mailing list