1.support dynamic registration model
2.support aggregete func
This commit is contained in:
@@ -79,6 +79,7 @@ type querySet struct {
|
||||
orm *ormBase
|
||||
ctx context.Context
|
||||
forContext bool
|
||||
aggregate string
|
||||
}
|
||||
|
||||
var _ QuerySeter = new(querySet)
|
||||
@@ -323,3 +324,9 @@ func newQuerySet(orm *ormBase, mi *modelInfo) QuerySeter {
|
||||
o.orm = orm
|
||||
return o
|
||||
}
|
||||
|
||||
// aggregate func
|
||||
func (o querySet) Aggregate(s string) QuerySeter {
|
||||
o.aggregate = s
|
||||
return &o
|
||||
}
|
||||
Reference in New Issue
Block a user