MCPcopy
hub / github.com/ent/ent / PartitionBy

Method PartitionBy

dialect/sql/builder.go:2805–2810  ·  view source on GitHub ↗

PartitionBy indicates to divide the query rows into groups by the given columns. Note that, standard SQL spec allows partition only by columns, and in order to use the "expression" version, use the PartitionByExpr.

(columns ...string)

Source from the content-addressed store, hash-verified

2803// Note that, standard SQL spec allows partition only by columns, and in order to
2804// use the "expression" version, use the PartitionByExpr.
2805func (w *WindowBuilder) PartitionBy(columns ...string) *WindowBuilder {
2806 w.partition = func(b *Builder) {
2807 b.IdentComma(columns...)
2808 }
2809 return w
2810}
2811
2812// PartitionExpr indicates to divide the query rows into groups by the given expression.
2813func (w *WindowBuilder) PartitionExpr(x Querier) *WindowBuilder {

Callers 4

limitRowsFunction · 0.80
TestWindowFunctionFunction · 0.80
ModifierMethod · 0.80

Calls 1

IdentCommaMethod · 0.80

Tested by 3

limitRowsFunction · 0.64
TestWindowFunctionFunction · 0.64