You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// There is no index on `visible_at`, but this is okay for test only usage.
110
+
futureEvents, err:=tx.QueryContext(
111
+
ctx,
112
+
"SELECT event_id, sequence_id, instance_id, event_type, timestamp, schedule_event_id, attributes, visible_at FROM `pending_events` WHERE visible_at IS NOT NULL",
113
+
)
114
+
iferr!=nil {
115
+
returnnil, fmt.Errorf("getting history: %w", err)
116
+
}
117
+
118
+
f:=make([]history.Event, 0)
119
+
120
+
forfutureEvents.Next() {
121
+
varinstanceIDstring
122
+
varattributes []byte
123
+
124
+
fe:= history.Event{}
125
+
126
+
iferr:=futureEvents.Scan(
127
+
&fe.ID,
128
+
&fe.SequenceID,
129
+
&instanceID,
130
+
&fe.Type,
131
+
&fe.Timestamp,
132
+
&fe.ScheduleEventID,
133
+
&attributes,
134
+
&fe.VisibleAt,
135
+
); err!=nil {
136
+
returnnil, fmt.Errorf("scanning event: %w", err)
137
+
}
138
+
139
+
a, err:=history.DeserializeAttributes(fe.Type, attributes)
0 commit comments