Skip to content

Commit

Permalink
[xrem-3]: Fixes missing IFNULL
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjmcghee committed Apr 23, 2024
1 parent f63fa13 commit 7ec1c66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src-tauri/src/core/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ impl DatabaseManager {
// Method to get the maximum frame ID
pub fn get_max_frame(&self) -> Result<i64> {
self.conn
.query_row("SELECT MAX(id) FROM frames", [], |row| row.get(0))
.query_row("SELECT IFNULL(MAX(id), 0) FROM frames", [], |row| {
row.get(0)
})
}

// Method to get the last accessible frame ID
Expand Down

0 comments on commit 7ec1c66

Please sign in to comment.