Yeah - short of parsing the create table / create index (in case its just a unique index) statements I don’t think there’s any built in way in sqlite or Xojo to get that.
I had a quick peek at SQLIte’s docs & I dont see anything
This API method certainly jumps out as one to call to get this information but it also doesn’t tell you http://sqlite.org/c3ref/table_column_metadata.html
However, the API is large & I have not examined 100% of the functions
The way I have done this is to use 2 sqlite Pragma calls. Pop the results of PRAGMA INDEX_LIST (table_name) into a record set, that will give you fields called ‘name’ and ‘unique’. Loop through the unique ones creating another record set using PRAGMA INDEX_INFO ( index_name) - then you will get the column names that make up the unique index.
I don’t know if the pragma index_list command returning nil if no indexes is found is a bug - sounds like one to me, but you can use the sqlite_master table instead:
select tbl_name, name from sqlite_master
where type=‘index’
and table_name = ‘table_name’
then use pragma index_info to find if the index is unique, then use pragma index_list to find the columns! It’s a bit of a faff, but I can’t think of any other way. You could of course look at table creation SQL but that wouldn’t give you indexes added after creation.