| 1 | package ObjectDB::Related; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | our $VERSION = '3.26'; | ||
| 7 | |||
| 8 | require Carp; | ||
| 9 | |||
| 10 | sub new { | ||
| 11 | my $class = shift; | ||
| 12 | my (%params) = @_; | ||
| 13 | |||
| 14 | my $self = {}; | ||
| 15 | bless $self, $class; | ||
| 16 | |||
| 17 | $self->{meta} = $params{meta}; | ||
| 18 | |||
| 19 | return $self; | ||
| 20 | } | ||
| 21 | |||
| 22 | sub meta { $_[0]->{meta} } | ||
| 23 | sub type { $_[0]->meta->type } | ||
| 24 | |||
| 25 | sub find_related { | ||
| 26 | Carp::croak('find_related not supported on ' . $_[0]->type); | ||
| 27 | } | ||
| 28 | |||
| 29 | sub create_related { | ||
| 30 | Carp::croak('create_related not supported on ' . $_[0]->type); | ||
| 31 | } | ||
| 32 | |||
| 33 | sub update_related { | ||
| 34 | Carp::croak('update_related not supported on ' . $_[0]->type); | ||
| 35 | } | ||
| 36 | |||
| 37 | sub delete_related { | ||
| 38 | Carp::croak('delete_related not supported on ' . $_[0]->type); | ||
| 39 | } | ||
| 40 | |||
| 41 | sub count_related { | ||
| 42 | Carp::croak('count_related not supported on ' . $_[0]->type); | ||
| 43 | } | ||
| 44 | |||
| 45 | 1; |