[DBD-SQLite] DBD::SQLite table introspection
Andrew Rodland
andrew at cleverdomain.org
Wed May 19 10:46:20 GMT 2010
On Wednesday, May 19, 2010 04:48:55 am you wrote:
> 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
Well I *did* know that, but it managed to slip my mind for days at a time.
Sorry for being dumb.
(Although SQLite *still* doesn't expose exactly the right information, because
it's possible for pragma table_info to show type='INTEGER' and pk=1 for a
column and yet for that column not to be the INTEGER PRIMARY KEY by SQLite
standards, as demonstrated on the page you linked above. Unlikely, but
possible. I'm still pretty sure that the "parse the SQL from sqlite_master"
technique is worse though :)
Andrew
More information about the DBD-SQLite
mailing list