/[papo]/papo/neb/PAPO/Condition.pm
ViewVC logotype

Diff of /papo/neb/PAPO/Condition.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by jlenton, Fri Apr 25 18:38:25 2003 UTC revision 1.3 by jlenton, Fri May 16 20:33:27 2003 UTC
# Line 59  sub simple Line 59  sub simple
59  EOF  EOF
60  }  }
61    
62    =head2 current
63    
64    Selects only current (null end_t) rows. Takes one parameter: the
65    table.
66    
67    =cut
68    
69    sub current
70    {
71        my $self = shift;
72        my $table = shift;
73    
74        $table = $table->name
75            if ref $table;
76    
77        return $self->raw (sprintf <<EOF, $table, $table);
78            <!-- Only current %s's, please -->
79            <null>
80              <cfield name=\"_%s_data._end_t\"/>
81            </null>
82    EOF
83    
84    }
85    
86    
87  =head2 raw  =head2 raw
88    
# Line 74  sub raw Line 98  sub raw
98    
99      my @args = map ref $_ ? $_->name : $_, @_;      my @args = map ref $_ ? $_->name : $_, @_;
100    
101      $self->{CONDITION} .= sprintf $raw, @args;      my $cond .= sprintf $raw, @args;
102    
103        $self->{CONDITION} .= $cond;
104    
105      return $self->{CONDITION};      return $cond;
106  }  }
107    
108    
# Line 97  sub transactional_join Line 123  sub transactional_join
123    
124      return $self->simple( $table, '_table',      return $self->simple( $table, '_table',
125                            $table => 'id',                            $table => 'id',
126                            "_${table}_data" => '_table' );                            "_${table}_data" => '_table' )
127            . $self->current($table)
128  }  }
129    
130    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26