MCPcopy Create free account
hub / github.com/auxten/postgresql-parser / SetSorted

Method SetSorted

pkg/sql/sem/tree/datum.go:3133–3140  ·  view source on GitHub ↗

SetSorted sets the sorted flag on the DTuple. This should be used when a DTuple is known to be sorted based on the datums added to it.

()

Source from the content-addressed store, hash-verified

3131// SetSorted sets the sorted flag on the DTuple. This should be used when a
3132// DTuple is known to be sorted based on the datums added to it.
3133func (d *DTuple) SetSorted() *DTuple {
3134 if d.ContainsNull() {
3135 // A DTuple that contains a NULL (see ContainsNull) cannot be marked as sorted.
3136 return d
3137 }
3138 d.sorted = true
3139 return d
3140}
3141
3142// AssertSorted asserts that the DTuple is sorted.
3143func (d *DTuple) AssertSorted() {

Callers 1

sortMethod · 0.95

Calls 1

ContainsNullMethod · 0.95

Tested by

no test coverage detected