feat(eventstore): order by creation_date and sequence (#5568)

* feat(eventstore): order by `creation_date` and `sequence`

* fix(logstore): use correct event type

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Silvan
2023-04-05 11:34:24 +02:00
committed by GitHub
parent cf9d74f4d7
commit 4c1169b562
6 changed files with 21 additions and 20 deletions

View File

@@ -255,10 +255,10 @@ func (db *CRDB) db() *sql.DB {
func (db *CRDB) orderByEventSequence(desc bool) string {
if desc {
return " ORDER BY event_sequence DESC"
return " ORDER BY creation_date DESC, event_sequence DESC"
}
return " ORDER BY event_sequence"
return " ORDER BY creation_date, event_sequence"
}
func (db *CRDB) eventQuery() string {