X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FSQLite.pm;h=eb8cc2f9c3270dbd570ea8573da7cb8f3e19ee1e;hb=0ca61324edfaddb69ac51ddf6282f516fcc826db;hp=3998fe8ce2db1268a7598abdc50d6fa2beca19ab;hpb=78b7ccaaaff070d6053dda2843007369d7501662;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm index 3998fe8..eb8cc2f 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLite.pm @@ -7,7 +7,7 @@ use Carp::Clan qw/^DBIx::Class/; use Text::Balanced qw( extract_bracketed ); use Class::C3; -our $VERSION = '0.04999_01'; +our $VERSION = '0.04999_12'; =head1 NAME @@ -146,13 +146,19 @@ sub _sqlite_parse_table { return { rels => \@rels, uniqs => \@uniqs, auto_inc => \%auto_inc }; } -sub _column_is_auto_increment { +sub _extra_column_info { my ($self, $table, $col_name, $sth, $col_num) = @_; - + ($table, $col_name) = @{$table}{qw/TABLE_NAME COLUMN_NAME/} if ref $table; + my %extra_info; + $self->{_sqlite_parse_data}->{$table} ||= $self->_sqlite_parse_table($table); - return $self->{_sqlite_parse_data}->{$table}->{auto_inc}->{$col_name}; + if ($self->{_sqlite_parse_data}->{$table}->{auto_inc}->{$col_name}) { + $extra_info{is_auto_increment} = 1; + } + + return \%extra_info; } sub _table_fk_info { @@ -194,6 +200,15 @@ sub _tables_list { L, L, L +=head1 AUTHOR + +See L and L. + +=head1 LICENSE + +This library is free software; you can redistribute it and/or modify it under +the same terms as Perl itself. + =cut 1;