Documentation
¶
Overview ¶
Code generated by kvo. DO NOT EDIT.
Package statrow defines synthetic account state for normal-table benchmarks.
Index ¶
- Variables
- func Model() (*kvo.Schema, *kvo.Model)
- func StaticR1(v values.Value, present bool, d int) (out uint64)
- func StaticR2(v values.Value, present bool, d int) (out bool)
- func StaticR4(v values.Value, present bool, d int) (out typ2.Time)
- func StaticR5(v values.Value, present bool, d int) (out []uint64)
- func StaticR6(v values.Value, present bool, d int) (out map[uint64]int64)
- func StaticR7(v values.Value, present bool, d int) (out int64)
- func StaticR8(v values.Value, present bool, d int) (out map[uint64]Profile)
- func StaticR9(v values.Value, present bool, d int) (out []uint64)
- func StaticW0(w *row2.Writer, v State, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW1(w *row2.Writer, v uint64, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW2(w *row2.Writer, v bool, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW3(w *row2.Writer, v Profile, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW4(w *row2.Writer, v typ2.Time, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW5(w *row2.Writer, v []uint64, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW6(w *row2.Writer, v map[uint64]int64, k uint64, s string, layout row2.Layout, ...)
- func StaticW7(w *row2.Writer, v int64, k uint64, s string, layout row2.Layout, keep bool, ...)
- func StaticW8(w *row2.Writer, v map[uint64]Profile, k uint64, s string, layout row2.Layout, ...)
- func StaticW9(w *row2.Writer, v []uint64, k uint64, s string, layout row2.Layout, keep bool, ...)
- type Profile
- type State
Constants ¶
This section is empty.
Variables ¶
View Source
var Static = kvo.Generated{Fingerprint: "2ab6407b65993901266452db8df0ae6caf1099bade487a49ea67d628c52913ec", Fields: map[reflect.Type]*nativebind.GeneratedFields{ reflect.TypeFor[State](): &StaticFields0, reflect.TypeFor[Profile](): &StaticFields3, reflect.TypeFor[typ2.Time](): &StaticFields4, }, Encode: func(dst []byte, row any, layout row2.Layout) []byte { w := row2.AcquireWriter(dst) defer w.Release() StaticW0(w, *row.(*State), 0, "", layout, false, 0) return w.BytesWritten() }, Decode: func(raw []byte, row any) { *row.(*State) = StaticR0(values.Bytes(raw), true, 0) }}
View Source
var StaticFields0 = nativebind.GeneratedFields{Type: reflect.TypeFor[State](), New: func() unsafe.Pointer { return unsafe.Pointer(new(State)) }, Fields: []nativebind.GeneratedField{ {Name: "Key", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(State))(p).Key)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Key = uint64(v.R) }}, {Name: "ID", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(State))(p).ID)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).ID = uint64(v.R) }}, {Name: "Active", Get: func(p unsafe.Pointer) values.Value { return values.Bool(bool((*(State))(p).Active)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Active = bool(v.R != 0) }}, {Name: "Revision", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(State))(p).Revision)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Revision = uint64(v.R) }}, {Name: "Profile", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).Profile)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero Profile (*(State))(p).Profile = zero } else { (*(State))(p).Profile = *(*(Profile))(v.P) } }}, {Name: "Group", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(State))(p).Group)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Group = uint64(v.R) }}, {Name: "Created", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).Created)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero typ2.Time (*(State))(p).Created = zero } else { (*(State))(p).Created = *(*(typ2.Time))(v.P) } }}, {Name: "LastActivity", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).LastActivity)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero typ2.Time (*(State))(p).LastActivity = zero } else { (*(State))(p).LastActivity = *(*(typ2.Time))(v.P) } }}, {Name: "Tags", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).Tags)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero []uint64 (*(State))(p).Tags = zero } else { (*(State))(p).Tags = *(*([]uint64))(v.P) } }}, {Name: "History", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).History)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero map[uint64]int64 (*(State))(p).History = zero } else { (*(State))(p).History = *(*(map[uint64]int64))(v.P) } }}, {Name: "Progress", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).Progress)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero map[uint64]Profile (*(State))(p).Progress = zero } else { (*(State))(p).Progress = *(*(map[uint64]Profile))(v.P) } }}, {Name: "Segments", Get: func(p unsafe.Pointer) values.Value { return values.Value{P: unsafe.Pointer(&(*(State))(p).Segments)} }, Set: func(p unsafe.Pointer, v values.Value) { if v.P == nil { var zero []uint64 (*(State))(p).Segments = zero } else { (*(State))(p).Segments = *(*([]uint64))(v.P) } }}, {Name: "Earned", Get: func(p unsafe.Pointer) values.Value { return values.Int(int64((*(State))(p).Earned)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Earned = int64(v.AsInt()) }}, {Name: "Spent", Get: func(p unsafe.Pointer) values.Value { return values.Int(int64((*(State))(p).Spent)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Spent = int64(v.AsInt()) }}, {Name: "Visits", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(State))(p).Visits)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(State))(p).Visits = uint64(v.R) }}, }}
View Source
var StaticFields3 = nativebind.GeneratedFields{Type: reflect.TypeFor[Profile](), New: func() unsafe.Pointer { return unsafe.Pointer(new(Profile)) }, Fields: []nativebind.GeneratedField{ {Name: "Balance", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(Profile))(p).Balance)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(Profile))(p).Balance = uint64(v.R) }}, {Name: "Rate", Get: func(p unsafe.Pointer) values.Value { return values.Uint(uint64((*(Profile))(p).Rate)) }, Set: func(p unsafe.Pointer, v values.Value) { (*(Profile))(p).Rate = uint64(v.R) }}, }}
View Source
var StaticFields4 = nativebind.GeneratedFields{Type: reflect.TypeFor[typ2.Time](), New: func() unsafe.Pointer { return unsafe.Pointer(new(typ2.Time)) }, Fields: []nativebind.GeneratedField{}}
Functions ¶
Types ¶
type State ¶
type State struct {
Key uint64 `edb:"-" msgpack:"-"`
ID uint64 `edb:"id"`
Active bool `edb:"active"`
Revision uint64 `edb:"revision"`
Profile Profile `edb:"profile"`
Group uint64 `edb:"group"`
Created time.Time `edb:"created"`
LastActivity time.Time `edb:"last_activity"`
Tags []uint64 `edb:"tags,compact"`
History map[uint64]int64 `edb:"history,compact"`
Progress map[uint64]Profile `edb:"progress"`
Segments []uint64 `edb:"segments"`
Earned int64 `edb:"earned"`
Spent int64 `edb:"spent"`
Visits uint64 `edb:"visits"`
}
Click to show internal directories.
Click to hide internal directories.