class SQLiteUtils {

    @NonNull
    public static String createTableDefinition(TableInfo tableInfo) {
        ArrayList<String> definitions = new ArrayList<>();
        for (Field field : tableInfo.getColumnFields()) {
            String definition = createColumnDefinition(tableInfo, field);
            if (!TextUtils.isEmpty(definition)) {
                definitions.add(definition);
            }
        }

        definitions.addAll(createUniqueDefinition(tableInfo));

        return String.format("CREATE TABLE IF NOT EXISTS `%s` (%s);", tableInfo.getTableName(), TextUtils.join(", ", definitions));
    }

}