Nemanja Corlija wrote:
If you turn the headers on (.header ON) you'll see that the last
column of table_info() output is "pk".
This column indicates weather or not the table column in question is
part of primary key.
Though that last column of table_info() pragma is missing from
documentation at
http://www.sqlite.org/pragma.html#schema
very nice, thanks:
elif engine == 'sqlite':
cr.execute("pragma table_info(%s)"
% tablename)
pkeys = [fielddef[1] for fielddef in cr.fetchall() if
fielddef[5] ==1]
pass
I was a bit wondering: does the declaration 'primary key' actually
produce an indexing? or does that happen only if I explicitly ask for a
(unique) index?
Mario