Skip to content

Support aggregations and selecting only some fields #15

@jirfag

Description

@jirfag

Now we write:

	db := ctx.GetGorm().
		Select("max("+PointDBSchema.TripPointID.String()+") as max_id, "+
			"count("+PointDBSchema.PlaceID.String()+") as rating").
		Where(PointDBSchema.LocationID.String()+" = ?", locationID).
		Group(PointDBSchema.PlaceID.String()).
		Order("rating DESC").
		Limit(limit)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions