Remove old dist tarball which snuck in during a14ab50e
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Schema / Graph / Edge.pm
1 package # hide from pause
2   SQL::Translator::Schema::Graph::Edge;
3
4 use strict;
5 use warnings;
6
7 use Class::MakeMethods::Template::Hash (
8   new => ['new'],
9   scalar => [ qw( type ) ],
10   array => [ qw( traversals ) ],
11   object => [
12           'thisfield'    => {class => 'SQL::Translator::Schema::Field'}, #FIXME
13           'thatfield'    => {class => 'SQL::Translator::Schema::Field'}, #FIXME
14           'thisnode'     => {class => 'SQL::Translator::Schema::Graph::Node'},
15           'thatnode'     => {class => 'SQL::Translator::Schema::Graph::Node'},
16
17          ],
18 );
19
20 sub flip {
21   my $self = shift;
22
23 #warn "self thisfield: ".$self->thisfield->name;
24 #warn "self thatfield: ".$self->thatfield->name;
25
26   return SQL::Translator::Schema::Graph::Edge->new( thisfield => $self->thatfield,
27                                        thatfield => $self->thisfield,
28                                        thisnode  => $self->thatnode,
29                                        thatnode  => $self->thisnode,
30                                        type => $self->type eq 'import' ? 'export' : 'import'
31                                       );
32 }
33
34 1;