Skip to content
This repository was archived by the owner on Nov 28, 2017. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,11 @@ protected Set<UniqueDefinition> getUniques(final String tableName) throws SQLExc
{
final Set<UniqueDefinition> uniqueDefinitions = new HashSet<>();

final Collection<String> indexNames = JdbcUtility.select(this.sqliteConnection,
String.format("PRAGMA index_list(%s);", tableName),
null,
resultSet -> resultSet.getString("name")); // TODO this will collect primary keys (automatically unique) and group uniques - I don't think we want that
final Collection<String> indexNames = JdbcUtility.filterSelect(this.sqliteConnection,
String.format("PRAGMA index_list(%s);", tableName),
null,
resultSet -> resultSet.getBoolean("unique"),
resultSet -> resultSet.getString("name"));

for(final String indexName : indexNames)
{
Expand Down