Changeset 1499

Show
Ignore:
Timestamp:
10/19/04 17:02:26
Author:
miyagawa
Message:

0.05

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Class-DBI-SQLite/trunk/Changes

    r715 r1499  
    11Revision history for Perl extension Class::DBI::SQLite 
     2 
     30.05  Tue Oct 19 16:44:39 JST 2004 
     4        - Fixed error in PRAGMA table_info(?) with newer DBD::SQLite 
     5          http://rt.cpan.org/NoAuth/Bug.html?id=7794 
     6          Thanks to Seth Gordon and Marcus Ramberg 
     7 
     80.04  Mon Mar 15 20:56:38 JST 2004 
     9        - Added t/02_table.t in MANIFEST 
     10          (Thanks to Tony Bowden) 
     11        - Added SQL::Dialects::AnyData to PREREQ_PM 
     12         
     130.03  Thu Feb  5 03:38:20 JST 2004 
     14        * Fixed bug that SQL::Parser barfs with TIMESTAMP column 
     15          (Thanks to Aaron Straup Cope) 
     16        - Fixed test failure that columns() no longer preserves its order. 
    217 
    3180.02  Fri Aug  9 15:59:44 JST 2002 
  • Class-DBI-SQLite/trunk/MANIFEST

    r560 r1499  
    11Changes 
     2lib/Class/DBI/SQLite.pm 
     3Makefile.PL 
    24MANIFEST 
    3 Makefile.PL 
    4 lib/Class/DBI/SQLite.pm 
     5META.yml                        Module meta-data (added by MakeMaker) 
    56t/00_compile.t 
    67t/01_sqlite.t 
     8t/02_table.t 
    79t/lib/Film.pm 
  • Class-DBI-SQLite/trunk/Makefile.PL

    r715 r1499  
    99        'DBD::SQLite' => 0.07, 
    1010        'SQL::Parser' => 1.004, 
     11        'SQL::Dialects::AnyData' => 0, 
    1112    }, 
    1213); 
  • Class-DBI-SQLite/trunk/lib/Class/DBI/SQLite.pm

    r715 r1499  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = 0.02
     5$VERSION = 0.05
    66 
    77require Class::DBI; 
     
    1818 
    1919    # find all columns. 
    20     my $sth = $class->db_Main->prepare(<<'SQL'); 
    21 PRAGMA table_info(?) 
    22 SQL 
    23     $sth->execute($table); 
     20    warn $table; 
     21    my $sth = $class->db_Main->prepare("PRAGMA table_info('$table')"); 
     22    $sth->execute(); 
    2423    my @columns; 
    2524    while (my $row = $sth->fetchrow_hashref) { 
    26         push @columns,$row->{name}; 
     25        push @columns, $row->{name}; 
    2726    } 
    2827    $sth->finish; 
     
    3736 
    3837    my $parser = SQL::Parser->new('AnyData', { RaiseError => 1}); 
     38    $parser->feature("valid_data_types","TIMESTAMP",1); 
    3939    $parser->parse($sql); 
    4040    my $structure = $parser->structure; 
  • Class-DBI-SQLite/trunk/t/02_table.t

    r715 r1499  
    2626is(Foo->table, 'foo'); 
    2727is(Foo->columns, 3); 
    28 my @columns = Foo->columns('All'); 
    29 ok(eq_array(\@columns, [qw(id foo bar)])); 
     28my @columns = sort Foo->columns('All'); 
     29is_deeply(\@columns, [sort qw(id foo bar)]); 
    3030 
    3131for my $i(1 .. 10) { 
  • Class-DBI-SQLite/trunk/t/lib/Film.pm

    r715 r1499  
    88    my $dir = tempdir( CLEANUP => 1 ); 
    99    my($fh, $filename) = tempfile( DIR => $dir ); 
    10     __PACKAGE__->set_db('Main', "dbi:SQLite:dbname=$filename", '', ''); 
     10    __PACKAGE__->set_db('Main', "dbi:SQLite:dbname=$filename", '', '', { AutoCommit => 0 }); 
    1111} 
    1212