Gorm: Does gorm supports distinct functionality?

Created on 18 Jun 2015  路  1Comment  路  Source: go-gorm/gorm

Does gorm supports distinct functionality?
Such as db.Where("id = ?", id).Distinct("name").Find(&users);

I didn't find function like "Distinct"...
I only can use db.Raw("SELECT DISTRINCT *** FROM) instead...

Most helpful comment

Use Select("DISTRINCT(xxx)")?

>All comments

Use Select("DISTRINCT(xxx)")?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kumarsiva07 picture kumarsiva07  路  3Comments

rfyiamcool picture rfyiamcool  路  3Comments

sredxny picture sredxny  路  3Comments

koalacxr picture koalacxr  路  3Comments

easonlin404 picture easonlin404  路  3Comments