Mercurial > repos > prog > lcmsmatching
diff Ms4TabSqlDb.R @ 1:45e985cd8e9e draft
planemo upload for repository https://github.com/workflow4metabolomics/lcmsmatching.git commit d4048accde6bdfd5b3e14f5394902d38991854f8-dirty
| author | prog |
|---|---|
| date | Tue, 31 Jan 2017 05:27:24 -0500 |
| parents | 3afe41d3e9e7 |
| children |
line wrap: on
line diff
--- a/Ms4TabSqlDb.R Mon Jul 11 09:12:03 2016 -0400 +++ b/Ms4TabSqlDb.R Tue Jan 31 05:27:24 2017 -0500 @@ -266,7 +266,7 @@ ################# # Returns a numeric vector of all masses stored inside the database. - Ms4TabSqlDb$methods( getMzValues = function(mode = NULL) { + Ms4TabSqlDb$methods( getMzValues = function(mode = NULL, max.results = NA_integer_) { # Build request select <- paste0("select distinct pk.mass as ", MSDB.TAG.MZTHEO) @@ -274,6 +274,9 @@ where <- "" if ( ! is.null(mode)) where <- paste0(" where ", if (mode == MSDB.TAG.POS) '' else 'not ', 'pk.ion_pos') + limit <- "" + if ( ! is.na(NA_integer_)) + limit <- paste(" limit", max.results) # Assemble request request <- paste0(select, from, where, ';')
