Changeset: 0d45b110c839 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0d45b110c839
Modified Files:
        clients/perl/Mapi.pm
Branch: Aug2011
Log Message:

make headers available for consumption

store headers in hdrs like rows, such that they can be processed by a
consumer lateron


diffs (27 lines):

diff --git a/clients/perl/Mapi.pm b/clients/perl/Mapi.pm
--- a/clients/perl/Mapi.pm
+++ b/clients/perl/Mapi.pm
@@ -285,6 +285,7 @@
   $self->{skip} = 0; # next+skip is current result row
   $self->{next} = 0; # all done
   $self->{offset} = 0;
+  $self->{hdrs} = [];
 
   if (@chars[0] eq '&') {
          if (@chars[1] eq '1' || @chars[1] eq 6) {
@@ -304,10 +305,11 @@
         $self->{offset} = $offset;
       }
                  # for now skip table header information
-                 my $i = 1;
-                 while ($self->{lines}[$i] =~ '%') {
-                         $i++;
-                 }
+      my $i = 1;
+      while ($self->{lines}[$i] =~ '%') {
+        $self->{hdrs}[$i - 1] = $self->{lines}[$i];
+        $i++;
+      }
       $self->{skip} = $i;
                  $self->{next} = $i;
                  $self->{row} = $self->{lines}[$self->{next}++];
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to