On Wed, May 19, 2010 at 7:46 AM, Andrew Rodland <and...@cleverdomain.org> wrote: > Recently I've been working on the DBIx::Class::Schema::Loader support for > SQLite -- specifically, removing all of the "parse SQL from sqlite_master" > hacks from it. Things have been going quite well, but the heuristic I have for > determining whether a column is an autoinc PK is fragile. > > I see that SQLite provides a definitive answer to the question of whether a > column is autoinc via the sqlite3_table_column_metadata API function, and > DBD::SQLite already makes use of this function to provide the NULLABLE sth > attribute. Does adding a private statement handle attribute that > returns the autoinc information from the same API function sound like a > reasonable solution to my problem?
It's likely that you already know that - but just in case. In SQLite all INTEGER PRIMARY KEY columns are autoincrement in the DBIC meaning (ie. that you don't specify a value for this column when inserting), AUTOINCREMENT in the column type means only that the values in this column are never reused: http://www.sqlite.org/autoinc.html Cheers, Zbigniew Lukasiak http://brudnopis.blogspot.com/ http://perlalchemy.blogspot.com/ _______________________________________________ DBD-SQLite mailing list DBD-SQLite@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbd-sqlite