explained a cryptic error message
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / ResultSourceProxy.pm
CommitLineData
75d07914 1package # hide from PAUSE
c0e7b4e5 2 DBIx::Class::ResultSourceProxy;
b98e75f6 3
4use strict;
5use warnings;
6
7use base qw/DBIx::Class/;
8
5ac6a044 9sub iterator_class { shift->result_source_instance->resultset_class(@_) }
b98e75f6 10sub resultset_class { shift->result_source_instance->resultset_class(@_) }
831ad24f 11sub result_class { shift->result_source_instance->result_class(@_) }
bab77431 12sub source_name { shift->result_source_instance->source_name(@_) }
b98e75f6 13
5ac6a044 14sub resultset_attributes {
15 shift->result_source_instance->resultset_attributes(@_);
16}
17
b98e75f6 18sub add_columns {
19 my ($class, @cols) = @_;
1f23a877 20 my $source = $class->result_source_instance;
21 $source->add_columns(@cols);
22 foreach my $c (grep { !ref } @cols) {
23 $class->register_column($c => $source->column_info($c));
24 }
b98e75f6 25}
26
002a359a 27*add_column = \&add_columns;
28
75d07914 29sub has_column {
bfeb73b2 30 shift->result_source_instance->has_column(@_);
b98e75f6 31}
32
75d07914 33sub column_info {
bfeb73b2 34 shift->result_source_instance->column_info(@_);
b98e75f6 35}
36
30813c90 37sub column_info_from_storage {
38 shift->result_source_instance->column_info_from_storage(@_);
39}
40
75d07914 41sub columns {
bfeb73b2 42 shift->result_source_instance->columns(@_);
75d07914 43}
002a359a 44
45sub remove_columns {
bfeb73b2 46 shift->result_source_instance->remove_columns(@_);
002a359a 47}
48
49*remove_column = \&remove_columns;
50
bc0c9800 51sub set_primary_key {
52 shift->result_source_instance->set_primary_key(@_);
53}
54
55sub primary_columns {
56 shift->result_source_instance->primary_columns(@_);
57}
b98e75f6 58
bc0c9800 59sub add_unique_constraint {
60 shift->result_source_instance->add_unique_constraint(@_);
61}
62
63sub unique_constraints {
64 shift->result_source_instance->unique_constraints(@_);
65}
87f0da6a 66
1bc0b925 67sub unique_constraint_names {
68 shift->result_source_instance->unique_constraint_names(@_);
69}
70
71sub unique_constraint_columns {
72 shift->result_source_instance->unique_constraint_columns(@_);
73}
74
8c49f629 75sub add_relationship {
71e65b39 76 my ($class, $rel, @rest) = @_;
77 my $source = $class->result_source_instance;
78 $source->add_relationship($rel => @rest);
79 $class->register_relationship($rel => $source->relationship_info($rel));
8c49f629 80}
81
82sub relationships {
83 shift->result_source_instance->relationships(@_);
84}
85
86sub relationship_info {
87 shift->result_source_instance->relationship_info(@_);
88}
89
b98e75f6 901;