use MooseX::Declare;
-BEGIN {
- use Moose::Util::TypeConstraints;
-
- class_type 'DBIx::Class::Schema';
-
- no Moose::Util::TypeConstraints;
-}
role SQL::Translator::Parser::DDL::DBIx::Class {
use MooseX::Types::Moose qw();
use MooseX::MultiMethods;
use SQL::Translator::Constants qw(:sqlt_types :sqlt_constants);
+ use SQL::Translator::Types qw(DBICSchema);
use aliased 'SQL::Translator::Object::Column';
use aliased 'SQL::Translator::Object::Constraint';
use aliased 'SQL::Translator::Object::ForeignKey';
use aliased 'SQL::Translator::Object::Table';
use aliased 'SQL::Translator::Object::View';
- multi method parse(DBIx::Class::Schema $data) { $data }
+ multi method parse(Schema $data) { $data }
multi method parse(Str $data) {
}
+
+ multi method parse(DBICSchema $data) { $data }
}
class SQL::Translator::Types {
use MooseX::Types::Moose qw(ArrayRef CodeRef HashRef Int Maybe Str Undef);
use MooseX::Types -declare, [qw(Column Constraint ForeignKey Index PrimaryKey Procedure Schema Sequence Table Trigger View
- Bit DBIHandle MatchType Parser Producer Translator)];
+ Bit DBIHandle MatchType Parser Producer Translator DBICSchema)];
+
+ class_type DBICSchema, { class => 'DBIx::Class::Schema' };;
class_type Column, { class => 'SQL::Translator::Object::Column' };
class_type Constraint, { class => 'SQL::Translator::Object::Constraint' };