Skip to content

Commit

Permalink
Merge branch 'master' into f-#113-temporary
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Oct 6, 2016
2 parents 0a65c51 + a3b8ca5 commit 9eba6d2
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 6 deletions.
6 changes: 6 additions & 0 deletions R/table.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ NULL
#' with \code{\link[DBI]{dbDataType}}).
#' @param temporary a logical specifying whether the new table should be
#' temporary. Its default is \code{FALSE}.
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @details In a primary key column qualified with
#' \href{https://www.sqlite.org/autoinc.html}{\code{AUTOINCREMENT}}, missing
#' values will be assigned the next largest positive integer,
Expand Down Expand Up @@ -283,6 +284,7 @@ string_to_utf8 <- function(value) {
#' @param select.cols A SQL statement (in the form of a character vector of
#' length 1) giving the columns to select. E.g. "*" selects all columns,
#' "x,y,z" selects three columns named as listed.
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @inheritParams DBI::sqlRownamesToColumn
#' @export
#' @examples
Expand Down Expand Up @@ -321,6 +323,7 @@ setMethod("dbReadTable", c("SQLiteConnection", "character"),
#'
#' @param conn An existing \code{\linkS4class{SQLiteConnection}}
#' @param name character vector of length 1 giving name of table to remove
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @export
setMethod("dbRemoveTable", c("SQLiteConnection", "character"),
function(conn, name, ...) {
Expand All @@ -334,6 +337,7 @@ setMethod("dbRemoveTable", c("SQLiteConnection", "character"),
#'
#' @param conn An existing \code{\linkS4class{SQLiteConnection}}
#' @param name String, name of table. Match is case insensitive.
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @export
setMethod(
"dbExistsTable", c("SQLiteConnection", "character"),
Expand All @@ -349,6 +353,7 @@ setMethod(
#' List available SQLite tables.
#'
#' @param conn An existing \code{\linkS4class{SQLiteConnection}}
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @export
setMethod("dbListTables", "SQLiteConnection", function(conn, ...) {
rs <- sqliteListTables(conn)
Expand Down Expand Up @@ -383,6 +388,7 @@ sqliteListTablesQuery <- function(conn, name = NULL) {
#'
#' @param conn An existing \code{\linkS4class{SQLiteConnection}}
#' @param name a length 1 character vector giving the name of a table.
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @export
#' @examples
#' con <- dbConnect(SQLite())
Expand Down
7 changes: 4 additions & 3 deletions R/transactions.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ NULL
#' \code{\link[DBI]{dbConnect}}
#' @param name Supply a name to use a named savepoint. This allows you to
#' nest multiple transaction
#' @param ... Needed for compatibility with generic. Otherwise ignored.
#' @return A boolean, indicating success or failure.
#' @examples
#' library(DBI)
Expand Down Expand Up @@ -47,7 +48,7 @@ NULL

#' @export
#' @rdname sqlite-transaction
setMethod("dbBegin", "SQLiteConnection", function(conn, ..., name = NULL) {
setMethod("dbBegin", "SQLiteConnection", function(conn, name = NULL, ...) {
if (is.null(name)) {
dbExecute(conn, "BEGIN")
} else {
Expand All @@ -59,7 +60,7 @@ setMethod("dbBegin", "SQLiteConnection", function(conn, ..., name = NULL) {

#' @export
#' @rdname sqlite-transaction
setMethod("dbCommit", "SQLiteConnection", function(conn, ..., name = NULL) {
setMethod("dbCommit", "SQLiteConnection", function(conn, name = NULL, ...) {
if (is.null(name)) {
dbExecute(conn, "COMMIT")
} else {
Expand All @@ -71,7 +72,7 @@ setMethod("dbCommit", "SQLiteConnection", function(conn, ..., name = NULL) {

#' @export
#' @rdname sqlite-transaction
setMethod("dbRollback", "SQLiteConnection", function(conn, ..., name = NULL) {
setMethod("dbRollback", "SQLiteConnection", function(conn, name = NULL, ...) {
if (is.null(name)) {
dbExecute(conn, "ROLLBACK")
} else {
Expand Down
2 changes: 2 additions & 0 deletions man/dbExistsTable-SQLiteConnection-character-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/dbListFields-SQLiteConnection-character-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/dbListTables-SQLiteConnection-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/dbReadTable-SQLiteConnection-character-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/dbRemoveTable-SQLiteConnection-character-method.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/dbWriteTable.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/sqlite-transaction.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9eba6d2

Please sign in to comment.