MCPcopy Create free account
hub / github.com/dolthub/doltgresql / NewPopulatedTimestamp

Function NewPopulatedTimestamp

postgres/parser/hlc/timestamp.pb.go:132–145  ·  view source on GitHub ↗
(r randyTimestamp, easy bool)

Source from the content-addressed store, hash-verified

130 return offset + 1
131}
132func NewPopulatedTimestamp(r randyTimestamp, easy bool) *Timestamp {
133 this := &Timestamp{}
134 this.WallTime = int64(r.Int63())
135 if r.Intn(2) == 0 {
136 this.WallTime *= -1
137 }
138 this.Logical = int32(r.Int31())
139 if r.Intn(2) == 0 {
140 this.Logical *= -1
141 }
142 if !easy && r.Intn(10) != 0 {
143 }
144 return this
145}
146
147type randyTimestamp interface {
148 Float32() float32

Callers

nothing calls this directly

Calls 3

Int63Method · 0.65
IntnMethod · 0.65
Int31Method · 0.65

Tested by

no test coverage detected