TT#25453 create BareSchema for small schemas

with a flexible, on-demand option to define the Result classes
which are needed

Change-Id: Iec526a08c5dbdedb992acd0bcbf3c7676b9d1d3d
changes/38/17138/1
Gerhard Jungwirth 8 years ago
parent 3db8979423
commit 910bec1ffe

@ -1,4 +1,4 @@
package NGCP::FaxSchema; package NGCP::BareSchema;
use warnings; use warnings;
use strict; use strict;
@ -12,23 +12,26 @@ our $VERSION = '2.007';
# warning: NGCP::Schema::ResultSet is not loaded. Therefore the features Helper::ResultSet::IgnoreWantarray # warning: NGCP::Schema::ResultSet is not loaded. Therefore the features Helper::ResultSet::IgnoreWantarray
# and Helper::ResultSet::SetOperations are not available here. # and Helper::ResultSet::SetOperations are not available here.
__PACKAGE__->load_classes( sub import {
{ 'NGCP::Schema::Result' => [qw/ my ($self, %config) = @_;
provisioning_voip_subscribers my $classes = $config{classes} // [];
voip_dbaliases
voip_domains __PACKAGE__->load_classes( { 'NGCP::Schema::Result' => $classes } );
voip_fax_data
voip_fax_destinations # provisioning_voip_subscribers
voip_fax_journal # voip_dbaliases
voip_fax_preferences # voip_domains
voip_mail_to_fax_acl # voip_fax_data
voip_mail_to_fax_preferences # voip_fax_destinations
voip_mail_to_fax_secret_renew_notify # voip_fax_journal
voip_subscriber_timezone # voip_fax_preferences
voip_subscribers # voip_mail_to_fax_acl
/] }, # voip_mail_to_fax_preferences
#default_resultset_class => 'ResultSet', # voip_mail_to_fax_secret_renew_notify
); # voip_subscriber_timezone
# voip_subscribers
return;
}
# use DBIx::Class::Storage::DBI; # use DBIx::Class::Storage::DBI;
# DBIx::Class::Storage::DBI->datetime_parser_type('NGCP::Schema::Storage::DateTime::Format::MySQL'); # DBIx::Class::Storage::DBI->datetime_parser_type('NGCP::Schema::Storage::DateTime::Format::MySQL');
Loading…
Cancel
Save