use parent 'DBIx::Class::Schema';
use Carp::Clan qw/^DBIx::Class/;
-use MooseX::Types::Moose qw/Int HashRef ArrayRef Str Any Bool/;
-use DBIx::Class::Admin::Types qw/DBICConnectInfo/;
+use MooseX::Types::Moose qw/Int Str Any Bool/;
+use DBIx::Class::Admin::Types qw/DBICConnectInfo DBICHashRef/;
use MooseX::Types::JSON qw(JSON);
use MooseX::Types::Path::Class qw(Dir File);
use Try::Tiny;
has 'where' => (
is => 'rw',
- isa => HashRef,
+ isa => DBICHashRef,
coerce => 1,
);
has 'set' => (
is => 'rw',
- isa => HashRef,
+ isa => DBICHashRef,
coerce => 1,
);
has 'attrs' => (
is => 'rw',
- isa => HashRef,
+ isa => DBICHashRef,
coerce => 1,
);
has config => (
is => 'ro',
- isa => HashRef,
+ isa => DBICHashRef,
lazy_build => 1,
);
use MooseX::Types -declare => [qw(
DBICConnectInfo
+ DBICArrayRef
+ DBICHashRef
)];
use MooseX::Types::Moose qw/Int HashRef ArrayRef Str Any Bool/;
use MooseX::Types::JSON qw(JSON);
-coerce ArrayRef,
+subtype DBICArrayRef,
+ as ArrayRef;
+
+subtype DBICHashRef,
+ as HashRef;
+
+coerce DBICArrayRef,
from JSON,
via { _json_to_data ($_) };
-coerce HashRef,
+coerce DBICHashRef,
from JSON,
via { _json_to_data($_) };