ActiveRecord-Simple

 view release on metacpan or  search on metacpan

lib/ActiveRecord/Simple/Find.pm  view on Meta::CPAN

use ActiveRecord::Simple::Utils qw/load_module/;


our $MAXIMUM_LIMIT = 100_000_000_000;


sub new {
    my ($self_class, $class, @param) = @_;

    #my $self = $class->new();
    my $self = bless { class => $class } => $self_class;

    my $table_name = ($self->{class}->can('_get_table_name'))  ? $self->{class}->_get_table_name  : undef;
    my $pkey       = ($self->{class}->can('_get_primary_key')) ? $self->{class}->_get_primary_key : undef;

    croak 'can not get table_name for class ' . $self->{class} unless $table_name;
    #croak 'can not get primary_key for class ' . $self->{class} unless $pkey;

    $self->{prep_select_fields} //= [];
    $self->{prep_select_from}   //= [];
    $self->{prep_select_where}  //= [];

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.032 second using v1.00-cache-1.14-grep-28634ff-cpan-4d46879620f )