1 package # hide from PAUSE
2 DBIx::Class::ResultSourceProxy;
7 use base qw/DBIx::Class/;
9 sub iterator_class { shift->result_source_instance->resultset_class(@_) }
10 sub resultset_class { shift->result_source_instance->resultset_class(@_) }
11 sub source_name { shift->result_source_instance->source_name(@_) }
13 sub resultset_attributes {
14 shift->result_source_instance->resultset_attributes(@_);
18 my ($class, @cols) = @_;
19 my $source = $class->result_source_instance;
20 $source->add_columns(@cols);
21 foreach my $c (grep { !ref } @cols) {
22 $class->register_column($c => $source->column_info($c));
26 *add_column = \&add_columns;
29 my ($self, $column) = @_;
30 return $self->result_source_instance->has_column($column);
34 my ($self, $column) = @_;
35 return $self->result_source_instance->column_info($column);
40 return shift->result_source_instance->columns(@_);
44 return shift->result_source_instance->remove_columns(@_);
47 *remove_column = \&remove_columns;
50 shift->result_source_instance->set_primary_key(@_);
54 shift->result_source_instance->primary_columns(@_);
57 sub add_unique_constraint {
58 shift->result_source_instance->add_unique_constraint(@_);
61 sub unique_constraints {
62 shift->result_source_instance->unique_constraints(@_);
65 sub unique_constraint_names {
66 shift->result_source_instance->unique_constraint_names(@_);
69 sub unique_constraint_columns {
70 shift->result_source_instance->unique_constraint_columns(@_);
73 sub add_relationship {
74 my ($class, $rel, @rest) = @_;
75 my $source = $class->result_source_instance;
76 $source->add_relationship($rel => @rest);
77 $class->register_relationship($rel => $source->relationship_info($rel));
81 shift->result_source_instance->relationships(@_);
84 sub relationship_info {
85 shift->result_source_instance->relationship_info(@_);