Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved long strings handling and tests rewrite
- Loading branch information
Showing
22 changed files
with
1,308 additions
and
2,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
Package: RODBCext | ||
Version: 0.2.7 | ||
Authors@R: c(person("Mateusz", "Zoltak", role = c("aut", "cre"), | ||
email = "zozlak@zozlak.org"), | ||
person("Brian", "Ripley", role = "aut"), | ||
person("Michael", "Lapsley", role = "aut"), | ||
person("Will", "Beasley", role = "ctb", | ||
email = "wibeasley@hotmail.com")) | ||
Title: Parameterized Queries Extension for RODBC | ||
Description: An extension for RODBC package adding support for parameterized | ||
queries. | ||
SystemRequirements: An ODBC3 driver manager and drivers. | ||
Depends: | ||
R (>= 3.0.0), | ||
RODBC (>= 1.3.0) | ||
Suggests: | ||
knitr, | ||
rmarkdown | ||
LazyLoad: yes | ||
Biarch: yes | ||
License: GPL-2 | GPL-3 | ||
Author: Mateusz Zoltak [aut, cre], | ||
Brian Ripley [aut], | ||
Michael Lapsley [aut], | ||
Will Beasley [ctb] | ||
Maintainer: Mateusz Zoltak <zozlak@zozlak.org> | ||
NeedsCompilation: yes | ||
VignetteBuilder: knitr | ||
RoxygenNote: 5.0.1 | ||
Package: RODBCext | ||
Version: 0.3.0 | ||
Authors@R: c( | ||
person("Mateusz", "Zoltak", role = c("aut", "cre"), email = "zozlak@zozlak.org"), | ||
person("Brian", "Ripley", role = "aut"), | ||
person("Michael", "Lapsley", role = "aut"), | ||
person("Will", "Beasley", role = "ctb", email = "wibeasley@hotmail.com"), | ||
person("Juergen", "Altfeld", role = "ctb") | ||
) | ||
Title: Parameterized Queries Extension for RODBC | ||
Description: An extension for RODBC package adding support for parameterized | ||
queries. | ||
SystemRequirements: An ODBC3 driver manager and drivers. | ||
Depends: | ||
R (>= 3.0.0), | ||
RODBC (>= 1.3.0) | ||
Suggests: | ||
knitr, | ||
rmarkdown, | ||
testthat | ||
LazyLoad: yes | ||
Biarch: yes | ||
License: GPL-2 | GPL-3 | ||
Author: Mateusz Zoltak [aut, cre], | ||
Brian Ripley [aut], | ||
Michael Lapsley [aut], | ||
Will Beasley [ctb] | ||
Maintainer: Mateusz Zoltak <zozlak@zozlak.org> | ||
NeedsCompilation: yes | ||
VignetteBuilder: knitr | ||
RoxygenNote: 6.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright (C) 2017 Juergen Altfeld, Mateusz Zoltak | ||
# | ||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation; either version 2 or 3 of the License | ||
# (at your option). | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# A copy of the GNU General Public License is available at | ||
# http://www.r-project.org/Licenses/ | ||
|
||
#' @title Gets the current query timeout of a prepared query | ||
#' @description A query has to be already prepared using SQLPrepare() | ||
#' | ||
#' Throws an error if an error occured | ||
#' @param channel an RODBC channel containing an open connection | ||
#' @return The current query timeout value in seconds. 0 means "no timeout" | ||
#' @seealso \code{\link{odbcSetQueryTimeout}}, \code{\link{odbcConnect}}, | ||
#' \code{\link{odbcDriverConnect}} | ||
#' @examples | ||
#' \dontrun{ | ||
#' conn = odbcConnect('MyDataSource') | ||
#' | ||
#' sqlPrepare(conn, "SELECT * FROM myTable WHERE column = ?") | ||
#' odbcGetQueryTimeout(conn) # shows the current query timeout of the prepared statement | ||
#' sqlExecute(conn, 'myValue') | ||
#' sqlFetchMore(conn) | ||
#' } | ||
#' @export | ||
odbcGetQueryTimeout = function(channel) | ||
{ | ||
stopifnot(odbcValidChannel(channel)) | ||
|
||
stat = .Call("RODBCGetQueryTimeout", attr(channel, "handle_ptr")) | ||
|
||
if (stat == -1L) { | ||
stop(paste0(RODBC::odbcGetErrMsg(channel), collapse = '\n')) | ||
} else { | ||
return(stat) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: No | ||
SaveWorkspace: No | ||
AlwaysSaveHistory: No | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: knitr | ||
LaTeX: pdfLaTeX | ||
|
||
BuildType: Package | ||
PackageInstallArgs: --no-multiarch --with-keep.source | ||
PackageCheckArgs: --as-cran --no-multiarch | ||
PackageRoxygenize: rd,collate,namespace | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: No | ||
SaveWorkspace: No | ||
AlwaysSaveHistory: No | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: knitr | ||
LaTeX: pdfLaTeX | ||
|
||
BuildType: Package | ||
PackageUseDevtools: Yes | ||
PackageInstallArgs: --no-multiarch --with-keep.source | ||
PackageCheckArgs: --as-cran --no-multiarch | ||
PackageRoxygenize: rd,collate,namespace,vignette |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.