public static boolean isUnique(Column column) {
        final Table table = column.getParentOrThrow();
        
        return
            table.indexes()
                .filter(i -> i.indexColumns().count() == 1)
                .filter(Index::isUnique)
                .filter(Index::isEnabled)
                .flatMap(Index::indexColumns)
                .map(IndexColumn::findColumn)
                .filter(Optional::isPresent)
                .map(Optional::get)
                .anyMatch(col -> isSame(column, col))
            || (
                table.primaryKeyColumns().count() == 1 &&
                table.primaryKeyColumns()
                    .map(PrimaryKeyColumn::findColumn)
                    .filter(Optional::isPresent)
                    .map(Optional::get)
                    .anyMatch(col -> isSame(column, col))
            );
    }
Returns {@code true} if the specified {@link Column} represents a column
that can only hold unique values in the database.

@param column               the column
@return                     {@code true} if unique, else {@code false}
@throws SpeedmentConfigException  if an index or PK could not be traversed
runtime-parent/runtime-config/src/main/java/com/speedment/runtime/config/util/DocumentDbUtil.java