rformassspectrometry / Spectra

Low level infrastructure to handle MS spectra
https://rformassspectrometry.github.io/Spectra/
34 stars 24 forks source link

Add a new Spectra constructor for DBIConnection #152

Closed jorainer closed 3 years ago

jorainer commented 3 years ago

Maybe a Spectra constructor for object = "DBIConnection" might be helpful?

setMethod("Spectra", "DBIConnection", function...) {
  be <- backendInitialize(backend, object, ...)
  ...
}

i.e. that takes a database connection as input and calls the backendInitialize method on the provided backend passing that argument as parameter to it.

Would this also work for your backend @plantton?

jorainer commented 3 years ago

Actually, thinking it over I don't like the idea anymore - this would add DBI as a required R package, while the Spectra package itself does not contain any SQL-related functionality. So, no I don't want that constructor to be present in Spectra.