We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f26d76f commit 87efdc6Copy full SHA for 87efdc6
disintegrate-postgres/src/event_store.rs
@@ -107,7 +107,7 @@ where
107
{
108
let sql = format!(
109
r#"SELECT event.event_id, event.payload, epoch.__epoch_id
110
- FROM (SELECT MAX(event_id) AS __epoch_id FROM event) AS epoch
+ FROM (SELECT COALESCE(MAX(event_id),0) AS __epoch_id FROM event) AS epoch
111
LEFT JOIN event ON event.event_id <= epoch.__epoch_id AND ({criteria})
112
ORDER BY event_id ASC"#,
113
criteria = CriteriaBuilder::new(query).build()
0 commit comments