/[cvs]/nfo/perl/libs/Data/Storage/Result/Tangram.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Storage/Result/Tangram.pm

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

revision 1.1 by joko, Fri Nov 29 04:55:45 2002 UTC revision 1.5 by joko, Wed Apr 9 02:09:47 2003 UTC
# Line 3  Line 3 
3  #  $Id$  #  $Id$
4  #  #
5  #  $Log$  #  $Log$
6    #  Revision 1.5  2003/04/09 02:09:47  joko
7    #  bugfix: check for existance of '->close'-method before calling it on the 'RESULTHANDLE'-instance
8    #
9    #  Revision 1.4  2003/03/27 15:31:15  joko
10    #  fixes to modules regarding new namespace(s) below Data::Mungle::*
11    #
12    #  Revision 1.3  2003/01/31 06:34:49  joko
13    #  + fixes to 'getNextEntry' and 'getStatus'
14    #
15    #  Revision 1.2  2002/12/05 08:01:26  joko
16    #  + sub getStatus utilizing isEmpty to determine if result is set/unset and/or filled/unfilled
17    #
18  #  Revision 1.1  2002/11/29 04:55:45  joko  #  Revision 1.1  2002/11/29 04:55:45  joko
19  #  + initial check-in  #  + initial check-in
20  #  #
# Line 17  use warnings; Line 29  use warnings;
29    
30  use base ("Data::Storage::Result::Abstract");  use base ("Data::Storage::Result::Abstract");
31  use Data::Dumper;  use Data::Dumper;
32    use Data::Mungle::Compare::Struct qw( isEmpty );
33    
34  sub DESTROY {  sub DESTROY {
35    my $self = shift;    my $self = shift;
36    #$logger->debug( __PACKAGE__ . "->" . "DESTROY" );    #$logger->debug( __PACKAGE__ . "->" . "DESTROY" );
37    $self->{RESULTHANDLE} && $self->{RESULTHANDLE}->close();    $self->{RESULTHANDLE} && $self->{RESULTHANDLE}->can('close') && $self->{RESULTHANDLE}->close();
38  }  }
39    
40  sub getNextEntry {  sub getNextEntry {
# Line 39  sub getNextEntry { Line 51  sub getNextEntry {
51      return $self->{members}->[$self->{entry_count}]      return $self->{members}->[$self->{entry_count}]
52        if $self->{resulthandle_type} eq 'Set::Object';        if $self->{resulthandle_type} eq 'Set::Object';
53    
54      # open result!
55    } else {    } else {
     # open result  
     $self->{open} = 1;  
56      $self->{entry_count} = 0;      $self->{entry_count} = 0;
57        $self->{open} = 1;
58    
59      return $self->{RESULTHANDLE}->execute()      return $self->{RESULTHANDLE}->execute()
60        if $self->{resulthandle_type} eq 'Tangram::Cursor';        if $self->{resulthandle_type} eq 'Tangram::Cursor';
61      #print Dumper($self->{RESULTHANDLE}->members()); exit;      #print Dumper($self->{RESULTHANDLE}->members()); exit;
# Line 54  sub getNextEntry { Line 67  sub getNextEntry {
67    }    }
68  }  }
69    
70  sub getStatus { }  sub getStatus {
71      my $self = shift;
72      my $status;
73      if ($self->{resulthandle_type} eq 'Tangram::Cursor') {
74    =pod
75        print Dumper($self->{RESULTHANDLE});
76        $status = {
77          err => $self->{RESULTHANDLE}->err,
78          errstr => $self->{RESULTHANDLE}->errstr,
79          state => $self->{RESULTHANDLE}->state,
80        };
81    =cut
82      }
83      if ($self->{resulthandle_type} eq 'Set::Object') {
84        #print Dumper($self->{RESULTHANDLE}->members());
85        $status = {
86          empty => isEmpty($self->{RESULTHANDLE}),
87        },
88      }
89      return $status;
90    }
91    
92    
93  1;  1;

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed