Skip to content

Commit

Permalink
Merge pull request #19 from rformassspectrometry/jomain
Browse files Browse the repository at this point in the history
fix: ensure primary keys are in correct order
  • Loading branch information
jorainer authored Mar 7, 2024
2 parents 7ac7d6d + 92d35f1 commit 0c1a9c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: MsBackendSql
Title: SQL-based Mass Spectrometry Data Backend
Version: 1.3.3
Version: 1.3.4
Authors@R:
c(person(given = "Johannes", family = "Rainer",
email = "[email protected]",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# MsBackendSql 1.3

## Changes in 1.3.4

- Ensure primary keys from the database are in the correct order for
`backendInitialize()`.

## Changes in 1.3.3

- Import method generics from `ProtGenerics`.
Expand Down
3 changes: 2 additions & 1 deletion R/MsBackendSql.R
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ setMethod("backendInitialize", "MsBackendSql",
if (length(msg)) stop(msg)
object@dbcon <- dbcon
object@spectraIds <- dbGetQuery(
dbcon, "select spectrum_id_ from msms_spectrum")[, 1L]
dbcon, paste0("select spectrum_id_ from msms_spectrum ",
"order by spectrum_id_"))[, 1L]
object@.tables <- list(
msms_spectrum = colnames(
dbGetQuery(dbcon, "select * from msms_spectrum limit 0")))
Expand Down

0 comments on commit 0c1a9c8

Please sign in to comment.