On Sep 10, 2011, at 9:41 AM, Thomas Baumann wrote: > can you please add a column to the result of PRAGMA Table_Info() that > indicates this column is UNIQUE? > > Just like the notnull column. > > I don't want to parse the whole sql string for this property only. > > Or have I missed something?
Unfortunately such unique constraint is not advertised directly by any pragma... a possible workaround is to query index_info instead to retrieve, well, unique indices... and assume that if there is an unique index, there must be an unique constraint... YMMV... Usage example, following the information schema convention [1]: http://dev.alt.textdrive.com/browser/IMDB/Info.ddl#L177 http://dev.alt.textdrive.com/browser/IMDB/Info.ddl#L270 http://dev.alt.textdrive.com/browser/IMDB/Info.ddl#L459 http://dev.alt.textdrive.com/browser/IMDB/Info.lua#L204 [1] http://en.wikipedia.org/wiki/Information_schema _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users