/[A3C]/lib/A3C/SQL.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/A3C/SQL.pm

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

revision 158 by dpavlin, Sat May 31 16:30:09 2008 UTC revision 159 by dpavlin, Sun Jun 15 14:40:50 2008 UTC
# Line 79  sub count { Line 79  sub count {
79          return $self->sth->rows;          return $self->sth->rows;
80  }  }
81    
82    =head1 HELPERS
83    
84    This helpers are accessor to L<DBI>
85    
86    =head2 _column_names
87    
88      my @columns = $sql->_column_names;
89    
90    =cut
91    
92    sub _column_names {
93            my $self = shift;
94            return @{ $self->sth->{NAME} };
95    }
96    
97  package A3C::SQL::row;  package A3C::SQL::row;
98    
99  use Encode qw/decode/;  use Encode qw/decode/;
100  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
101    use base qw/Jifty::Object/;
102    
103  our $AUTOLOAD;  our $AUTOLOAD;
104    
# Line 99  sub AUTOLOAD { Line 115  sub AUTOLOAD {
115          my $type = ref($self) or die "$self is not an object";          my $type = ref($self) or die "$self is not an object";
116          my $name = $AUTOLOAD;          my $name = $AUTOLOAD;
117          $name =~ s/.*://;          $name =~ s/.*://;
118  #       warn "SQL: $name doesn't exist" unless defined($self->{$name});          Jifty->log->error("SQL: $name doesn't exist") unless defined($self->{$name});
119          return decode('UTF-8', $self->{$name});          return decode('UTF-8', $self->{$name});
120  }  }
121    

Legend:
Removed from v.158  
changed lines
  Added in v.159

  ViewVC Help
Powered by ViewVC 1.1.26