diff --git a/dev/CODE_OF_CONDUCT.html b/dev/CODE_OF_CONDUCT.html index 006d318d..1509f9df 100644 --- a/dev/CODE_OF_CONDUCT.html +++ b/dev/CODE_OF_CONDUCT.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013
#' @export
-setMethod("dbHasCompleted", "KazamResult", function(res, ...) {
-
-})
With these four methods in place, you can now use the default
dbGetQuery()
to send a query to the database, retrieve
results if available and then clean up. Spend some time now making sure
@@ -366,7 +364,7 @@
Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/articles/index.html b/dev/articles/index.html index 988d49ba..498b8638 100644 --- a/dev/articles/index.html +++ b/dev/articles/index.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/authors.html b/dev/authors.html index 74d7c3d2..6d524108 100644 --- a/dev/authors.html +++ b/dev/authors.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013R Special Interest Group on Databases (R-SIG-DB), Wickham H, Müller K (2024). DBI: R Database Interface. -R package version 1.2.3.9012, https://github.com/r-dbi/DBI, https://dbi.r-dbi.org. +R package version 1.2.3.9013, https://github.com/r-dbi/DBI, https://dbi.r-dbi.org.
@Manual{, title = {DBI: R Database Interface}, author = {{R Special Interest Group on Databases (R-SIG-DB)} and Hadley Wickham and Kirill Müller}, year = {2024}, - note = {R package version 1.2.3.9012, https://github.com/r-dbi/DBI}, + note = {R package version 1.2.3.9013, https://github.com/r-dbi/DBI}, url = {https://dbi.r-dbi.org}, }@@ -80,7 +80,7 @@
NEWS.md
+ Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/DBIConnection-class.html b/dev/reference/DBIConnection-class.html index ff174cd0..17669815 100644 --- a/dev/reference/DBIConnection-class.html +++ b/dev/reference/DBIConnection-class.html @@ -11,7 +11,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/DBIConnector-class.html b/dev/reference/DBIConnector-class.html index 03d79c1a..42fa02d6 100644 --- a/dev/reference/DBIConnector-class.html +++ b/dev/reference/DBIConnector-class.html @@ -17,7 +17,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/DBIDriver-class.html b/dev/reference/DBIDriver-class.html index 6e7fa701..5fad5d04 100644 --- a/dev/reference/DBIDriver-class.html +++ b/dev/reference/DBIDriver-class.html @@ -15,7 +15,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/DBIResult-class.html b/dev/reference/DBIResult-class.html index fe5975c8..de778f83 100644 --- a/dev/reference/DBIResult-class.html +++ b/dev/reference/DBIResult-class.html @@ -15,7 +15,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/Rplot001.png b/dev/reference/Rplot001.png deleted file mode 100644 index 17a35806..00000000 Binary files a/dev/reference/Rplot001.png and /dev/null differ diff --git a/dev/reference/SQL.html b/dev/reference/SQL.html index fa087369..d1c88113 100644 --- a/dev/reference/SQL.html +++ b/dev/reference/SQL.html @@ -23,7 +23,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbAppendTable.html b/dev/reference/dbAppendTable.html index d99a5e70..32a342c2 100644 --- a/dev/reference/dbAppendTable.html +++ b/dev/reference/dbAppendTable.html @@ -47,7 +47,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbAppendTableArrow.html b/dev/reference/dbAppendTableArrow.html index 5403851e..1d4ae339 100644 --- a/dev/reference/dbAppendTableArrow.html +++ b/dev/reference/dbAppendTableArrow.html @@ -27,7 +27,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbBind.html b/dev/reference/dbBind.html index 556a9279..4153f5c9 100644 --- a/dev/reference/dbBind.html +++ b/dev/reference/dbBind.html @@ -59,7 +59,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbCallProc.html b/dev/reference/dbCallProc.html index 2ab9404e..e00a7e55 100644 --- a/dev/reference/dbCallProc.html +++ b/dev/reference/dbCallProc.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbClearResult.html b/dev/reference/dbClearResult.html index 72de7ca9..5f3a3e0e 100644 --- a/dev/reference/dbClearResult.html +++ b/dev/reference/dbClearResult.html @@ -57,7 +57,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbColumnInfo.html b/dev/reference/dbColumnInfo.html index 11bc6ff4..8d9cb74b 100644 --- a/dev/reference/dbColumnInfo.html +++ b/dev/reference/dbColumnInfo.html @@ -57,7 +57,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbConnect.html b/dev/reference/dbConnect.html index b4c509a2..aadc70eb 100644 --- a/dev/reference/dbConnect.html +++ b/dev/reference/dbConnect.html @@ -77,7 +77,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbCreateTable.html b/dev/reference/dbCreateTable.html index 34ff43c1..1440b8f1 100644 --- a/dev/reference/dbCreateTable.html +++ b/dev/reference/dbCreateTable.html @@ -29,7 +29,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbCreateTableArrow.html b/dev/reference/dbCreateTableArrow.html index eedc9771..903fcefd 100644 --- a/dev/reference/dbCreateTableArrow.html +++ b/dev/reference/dbCreateTableArrow.html @@ -31,7 +31,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbDataType.html b/dev/reference/dbDataType.html index 11abedce..1434057c 100644 --- a/dev/reference/dbDataType.html +++ b/dev/reference/dbDataType.html @@ -93,7 +93,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbDisconnect.html b/dev/reference/dbDisconnect.html index 5cbc7f0e..c7cc4d3e 100644 --- a/dev/reference/dbDisconnect.html +++ b/dev/reference/dbDisconnect.html @@ -57,7 +57,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbDriver.html b/dev/reference/dbDriver.html index bff7a2bd..8968006b 100644 --- a/dev/reference/dbDriver.html +++ b/dev/reference/dbDriver.html @@ -23,7 +23,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbExecute.html b/dev/reference/dbExecute.html index 13f655b9..35ec349e 100644 --- a/dev/reference/dbExecute.html +++ b/dev/reference/dbExecute.html @@ -43,7 +43,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbExistsTable.html b/dev/reference/dbExistsTable.html index 17049e4a..edcd9346 100644 --- a/dev/reference/dbExistsTable.html +++ b/dev/reference/dbExistsTable.html @@ -75,7 +75,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbFetch.html b/dev/reference/dbFetch.html index a5ecc22c..023ed167 100644 --- a/dev/reference/dbFetch.html +++ b/dev/reference/dbFetch.html @@ -55,7 +55,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbFetchArrow.html b/dev/reference/dbFetchArrow.html index f7cf11a2..9db0ac0a 100644 --- a/dev/reference/dbFetchArrow.html +++ b/dev/reference/dbFetchArrow.html @@ -21,7 +21,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbFetchArrowChunk.html b/dev/reference/dbFetchArrowChunk.html index 4210aafd..32de8d46 100644 --- a/dev/reference/dbFetchArrowChunk.html +++ b/dev/reference/dbFetchArrowChunk.html @@ -23,7 +23,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetConnectArgs.html b/dev/reference/dbGetConnectArgs.html index 41c0b163..c2c6b198 100644 --- a/dev/reference/dbGetConnectArgs.html +++ b/dev/reference/dbGetConnectArgs.html @@ -15,7 +15,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetDBIVersion.html b/dev/reference/dbGetDBIVersion.html index e75b77bb..12495c72 100644 --- a/dev/reference/dbGetDBIVersion.html +++ b/dev/reference/dbGetDBIVersion.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetQuery.html b/dev/reference/dbGetQuery.html index a76ffdb7..5c68021e 100644 --- a/dev/reference/dbGetQuery.html +++ b/dev/reference/dbGetQuery.html @@ -53,7 +53,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetQueryArrow.html b/dev/reference/dbGetQueryArrow.html index d6077664..66961628 100644 --- a/dev/reference/dbGetQueryArrow.html +++ b/dev/reference/dbGetQueryArrow.html @@ -35,7 +35,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetRowCount.html b/dev/reference/dbGetRowCount.html index 26d956cc..aa63e34d 100644 --- a/dev/reference/dbGetRowCount.html +++ b/dev/reference/dbGetRowCount.html @@ -45,7 +45,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetRowsAffected.html b/dev/reference/dbGetRowsAffected.html index 99593332..2539f04b 100644 --- a/dev/reference/dbGetRowsAffected.html +++ b/dev/reference/dbGetRowsAffected.html @@ -47,7 +47,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbGetStatement.html b/dev/reference/dbGetStatement.html index e098bb63..8c90b5b5 100644 --- a/dev/reference/dbGetStatement.html +++ b/dev/reference/dbGetStatement.html @@ -49,7 +49,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbHasCompleted.html b/dev/reference/dbHasCompleted.html index 11d335d6..5b6bf852 100644 --- a/dev/reference/dbHasCompleted.html +++ b/dev/reference/dbHasCompleted.html @@ -57,7 +57,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbIsReadOnly.html b/dev/reference/dbIsReadOnly.html index 0b4b0f4c..9075ffe5 100644 --- a/dev/reference/dbIsReadOnly.html +++ b/dev/reference/dbIsReadOnly.html @@ -17,7 +17,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbIsValid.html b/dev/reference/dbIsValid.html index de17bfae..0275e771 100644 --- a/dev/reference/dbIsValid.html +++ b/dev/reference/dbIsValid.html @@ -91,7 +91,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbListConnections.html b/dev/reference/dbListConnections.html index fd383d78..c75119c2 100644 --- a/dev/reference/dbListConnections.html +++ b/dev/reference/dbListConnections.html @@ -9,7 +9,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbListObjects.html b/dev/reference/dbListObjects.html index 925b7565..867dbc0d 100644 --- a/dev/reference/dbListObjects.html +++ b/dev/reference/dbListObjects.html @@ -37,7 +37,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbListResults.html b/dev/reference/dbListResults.html index cc7936e7..0213021c 100644 --- a/dev/reference/dbListResults.html +++ b/dev/reference/dbListResults.html @@ -11,7 +11,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbQuoteIdentifier.html b/dev/reference/dbQuoteIdentifier.html index b46ef248..804cbc06 100644 --- a/dev/reference/dbQuoteIdentifier.html +++ b/dev/reference/dbQuoteIdentifier.html @@ -71,7 +71,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbQuoteLiteral.html b/dev/reference/dbQuoteLiteral.html index 177887e6..ebdc2d8f 100644 --- a/dev/reference/dbQuoteLiteral.html +++ b/dev/reference/dbQuoteLiteral.html @@ -35,7 +35,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbQuoteString.html b/dev/reference/dbQuoteString.html index 3b43c479..580b96f3 100644 --- a/dev/reference/dbQuoteString.html +++ b/dev/reference/dbQuoteString.html @@ -59,7 +59,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbReadTable.html b/dev/reference/dbReadTable.html index 2a06ceed..955031be 100644 --- a/dev/reference/dbReadTable.html +++ b/dev/reference/dbReadTable.html @@ -61,7 +61,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbReadTableArrow.html b/dev/reference/dbReadTableArrow.html index 22efc57e..bc92ff91 100644 --- a/dev/reference/dbReadTableArrow.html +++ b/dev/reference/dbReadTableArrow.html @@ -21,7 +21,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbRemoveTable.html b/dev/reference/dbRemoveTable.html index 71024005..caba3fe0 100644 --- a/dev/reference/dbRemoveTable.html +++ b/dev/reference/dbRemoveTable.html @@ -57,7 +57,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbSendQuery.html b/dev/reference/dbSendQuery.html index 8b056220..7193417c 100644 --- a/dev/reference/dbSendQuery.html +++ b/dev/reference/dbSendQuery.html @@ -73,7 +73,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbSendQueryArrow.html b/dev/reference/dbSendQueryArrow.html index fede0a52..b70d91bf 100644 --- a/dev/reference/dbSendQueryArrow.html +++ b/dev/reference/dbSendQueryArrow.html @@ -37,7 +37,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbSendStatement.html b/dev/reference/dbSendStatement.html index cbea4df6..21ca6e23 100644 --- a/dev/reference/dbSendStatement.html +++ b/dev/reference/dbSendStatement.html @@ -45,7 +45,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbSetDataMappings.html b/dev/reference/dbSetDataMappings.html index f450499b..e93bd509 100644 --- a/dev/reference/dbSetDataMappings.html +++ b/dev/reference/dbSetDataMappings.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbWithTransaction.html b/dev/reference/dbWithTransaction.html index 99c84b5e..397e4eb0 100644 --- a/dev/reference/dbWithTransaction.html +++ b/dev/reference/dbWithTransaction.html @@ -37,7 +37,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbWriteTable.html b/dev/reference/dbWriteTable.html index 029f5e6a..28fdd63f 100644 --- a/dev/reference/dbWriteTable.html +++ b/dev/reference/dbWriteTable.html @@ -83,7 +83,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dbWriteTableArrow.html b/dev/reference/dbWriteTableArrow.html index bb875be3..c3fc75fd 100644 --- a/dev/reference/dbWriteTableArrow.html +++ b/dev/reference/dbWriteTableArrow.html @@ -19,7 +19,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/dot-SQL92Keywords.html b/dev/reference/dot-SQL92Keywords.html index 002ed673..52cc211d 100644 --- a/dev/reference/dot-SQL92Keywords.html +++ b/dev/reference/dot-SQL92Keywords.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/hidden_aliases.html b/dev/reference/hidden_aliases.html index e58804ad..19f7900d 100644 --- a/dev/reference/hidden_aliases.html +++ b/dev/reference/hidden_aliases.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/index.html b/dev/reference/index.html index 4d8be933..24036373 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -7,7 +7,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/rownames.html b/dev/reference/rownames.html index cc8347c9..5a2cdf35 100644 --- a/dev/reference/rownames.html +++ b/dev/reference/rownames.html @@ -17,7 +17,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/sqlAppendTable.html b/dev/reference/sqlAppendTable.html index f16a14a7..8ae9d46c 100644 --- a/dev/reference/sqlAppendTable.html +++ b/dev/reference/sqlAppendTable.html @@ -25,7 +25,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/sqlCreateTable.html b/dev/reference/sqlCreateTable.html index c8ab324d..3c81bad3 100644 --- a/dev/reference/sqlCreateTable.html +++ b/dev/reference/sqlCreateTable.html @@ -37,7 +37,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/sqlData.html b/dev/reference/sqlData.html index 2288e53c..b3533284 100644 --- a/dev/reference/sqlData.html +++ b/dev/reference/sqlData.html @@ -35,7 +35,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/sqlInterpolate.html b/dev/reference/sqlInterpolate.html index cac4ba8e..d521375d 100644 --- a/dev/reference/sqlInterpolate.html +++ b/dev/reference/sqlInterpolate.html @@ -43,7 +43,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/sqlParseVariables.html b/dev/reference/sqlParseVariables.html index d1c37823..8bc71f03 100644 --- a/dev/reference/sqlParseVariables.html +++ b/dev/reference/sqlParseVariables.html @@ -13,7 +13,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/reference/transactions.html b/dev/reference/transactions.html index 1e999f39..1d87b21c 100644 --- a/dev/reference/transactions.html +++ b/dev/reference/transactions.html @@ -109,7 +109,7 @@ DBI - 1.2.3.9012 + 1.2.3.9013Site built with pkgdown 2.1.0.
+Site built with pkgdown 2.1.1.9000.
diff --git a/dev/search.json b/dev/search.json index 96fb3817..ece04dca 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://dbi.r-dbi.org/dev/CODE_OF_CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (https://www.contributor-covenant.org), version 1.0.0, available https://contributor-covenant.org/version/1/0/0/.","code":""},{"path":"https://dbi.r-dbi.org/dev/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to DBI","title":"Contributing to DBI","text":"outlines propose change DBI.","code":""},{"path":"https://dbi.r-dbi.org/dev/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to DBI","text":"Small typos grammatical errors documentation may edited directly using GitHub web interface, long changes made source file. YES: edit roxygen comment .R file R/. : edit .Rd file man/.","code":""},{"path":"https://dbi.r-dbi.org/dev/CONTRIBUTING.html","id":"prerequisites","dir":"","previous_headings":"","what":"Prerequisites","title":"Contributing to DBI","text":"make substantial pull request, always file issue make sure someone team agrees ’s problem. ’ve found bug, create associated issue illustrate bug minimal reprex.","code":""},{"path":"https://dbi.r-dbi.org/dev/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"","what":"Pull request process","title":"Contributing to DBI","text":"recommend create Git branch pull request (PR). Look Travis AppVeyor build status making changes. README contain badges continuous integration services used package. use roxygen2, Markdown syntax, documentation. use testthat. Contributions test cases included easier accept. Please update NEWS.md.","code":""},{"path":"https://dbi.r-dbi.org/dev/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to DBI","text":"Please note DBI project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://dbi.r-dbi.org/dev/LICENSE.html","id":"gnu-lesser-general-public-license","dir":"","previous_headings":"","what":"GNU LESSER GENERAL PUBLIC LICENSE","title":"NA","text":"Version 2.1, February 1999","code":"Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.]"},{"path":"https://dbi.r-dbi.org/dev/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"NA","text":"licenses software designed take away freedom share change . contrast, GNU General Public Licenses intended guarantee freedom share change free software–make sure software free users. license, Lesser General Public License, applies specially designated software packages–typically libraries–Free Software Foundation authors decide use . can use , suggest first think carefully whether license ordinary General Public License better strategy use particular case, based explanations . speak free software, referring freedom use, price. General Public Licenses designed make sure freedom distribute copies free software (charge service wish); receive source code can get want ; can change software use pieces new free programs; informed can things. protect rights, need make restrictions forbid distributors deny rights ask surrender rights. restrictions translate certain responsibilities distribute copies library modify . example, distribute copies library, whether gratis fee, must give recipients rights gave . must make sure , , receive can get source code. link code library, must provide complete object files recipients, can relink library making changes library recompiling . must show terms know rights. protect rights two-step method: (1) copyright library, (2) offer license, gives legal permission copy, distribute /modify library. protect distributor, want make clear warranty free library. Also, library modified someone else passed , recipients know original version, original author’s reputation affected problems might introduced others. Finally, software patents pose constant threat existence free program. wish make sure company effectively restrict users free program obtaining restrictive license patent holder. Therefore, insist patent license obtained version library must consistent full freedom use specified license. GNU software, including libraries, covered ordinary GNU General Public License. license, GNU Lesser General Public License, applies certain designated libraries, quite different ordinary General Public License. use license certain libraries order permit linking libraries non-free programs. program linked library, whether statically using shared library, combination two legally speaking combined work, derivative original library. ordinary General Public License therefore permits linking entire combination fits criteria freedom. Lesser General Public License permits lax criteria linking code library. call license “Lesser” General Public License Less protect user’s freedom ordinary General Public License. also provides free software developers Less advantage competing non-free programs. disadvantages reason use ordinary General Public License many libraries. However, Lesser license provides advantages certain special circumstances. example, rare occasions, may special need encourage widest possible use certain library, becomes de-facto standard. achieve , non-free programs must allowed use library. frequent case free library job widely used non-free libraries. case, little gain limiting free library free software , use Lesser General Public License. cases, permission use particular library non-free programs enables greater number people use large body free software. example, permission use GNU C Library non-free programs enables many people use whole GNU operating system, well variant, GNU/Linux operating system. Although Lesser General Public License Less protective users’ freedom, ensure user program linked Library freedom wherewithal run program using modified version Library. precise terms conditions copying, distribution modification follow. Pay close attention difference “work based library” “work uses library”. former contains code derived library, whereas latter must combined library order run.","code":""},{"path":"https://dbi.r-dbi.org/dev/LICENSE.html","id":"terms-and-conditions-for-copying-distribution-and-modification","dir":"","previous_headings":"","what":"TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION","title":"NA","text":"0. License Agreement applies software library program contains notice placed copyright holder authorized party saying may distributed terms Lesser General Public License (also called “License”). licensee addressed “”. “library” means collection software functions /data prepared conveniently linked application programs (use functions data) form executables. “Library”, , refers software library work distributed terms. “work based Library” means either Library derivative work copyright law: say, work containing Library portion , either verbatim modifications /translated straightforwardly another language. (Hereinafter, translation included without limitation term “modification”.) “Source code” work means preferred form work making modifications . library, complete source code means source code modules contains, plus associated interface definition files, plus scripts used control compilation installation library. Activities copying, distribution modification covered License; outside scope. act running program using Library restricted, output program covered contents constitute work based Library (independent use Library tool writing ). Whether true depends Library program uses Library . 1. may copy distribute verbatim copies Library’s complete source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice disclaimer warranty; keep intact notices refer License absence warranty; distribute copy License along Library. may charge fee physical act transferring copy, may option offer warranty protection exchange fee. 2. may modify copy copies Library portion , thus forming work based Library, copy distribute modifications work terms Section 1 , provided also meet conditions: ) modified work must software library. b) must cause files modified carry prominent notices stating changed files date change. c) must cause whole work licensed charge third parties terms License. d) facility modified Library refers function table data supplied application program uses facility, argument passed facility invoked, must make good faith effort ensure , event application supply function table, facility still operates, performs whatever part purpose remains meaningful. (example, function library compute square roots purpose entirely well-defined independent application. Therefore, Subsection 2d requires application-supplied function table used function must optional: application supply , square root function must still compute square roots.) requirements apply modified work whole. identifiable sections work derived Library, can reasonably considered independent separate works , License, terms, apply sections distribute separate works. distribute sections part whole work based Library, distribution whole must terms License, whose permissions licensees extend entire whole, thus every part regardless wrote . Thus, intent section claim rights contest rights work written entirely ; rather, intent exercise right control distribution derivative collective works based Library. addition, mere aggregation another work based Library Library (work based Library) volume storage distribution medium bring work scope License. 3. may opt apply terms ordinary GNU General Public License instead License given copy Library. , must alter notices refer License, refer ordinary GNU General Public License, version 2, instead License. (newer version version 2 ordinary GNU General Public License appeared, can specify version instead wish.) make change notices. change made given copy, irreversible copy, ordinary GNU General Public License applies subsequent copies derivative works made copy. option useful wish copy part code Library program library. 4. may copy distribute Library (portion derivative , Section 2) object code executable form terms Sections 1 2 provided accompany complete corresponding machine-readable source code, must distributed terms Sections 1 2 medium customarily used software interchange. distribution object code made offering access copy designated place, offering equivalent access copy source code place satisfies requirement distribute source code, even though third parties compelled copy source along object code. 5. program contains derivative portion Library, designed work Library compiled linked , called “work uses Library”. work, isolation, derivative work Library, therefore falls outside scope License. However, linking “work uses Library” Library creates executable derivative Library (contains portions Library), rather “work uses library”. executable therefore covered License. Section 6 states terms distribution executables. “work uses Library” uses material header file part Library, object code work may derivative work Library even though source code . Whether true especially significant work can linked without Library, work library. threshold true precisely defined law. object file uses numerical parameters, data structure layouts accessors, small macros small inline functions (ten lines less length), use object file unrestricted, regardless whether legally derivative work. (Executables containing object code plus portions Library still fall Section 6.) Otherwise, work derivative Library, may distribute object code work terms Section 6. executables containing work also fall Section 6, whether linked directly Library . 6. exception Sections , may also combine link “work uses Library” Library produce work containing portions Library, distribute work terms choice, provided terms permit modification work customer’s use reverse engineering debugging modifications. must give prominent notice copy work Library used Library use covered License. must supply copy License. work execution displays copyright notices, must include copyright notice Library among , well reference directing user copy License. Also, must one things: ) Accompany work complete corresponding machine-readable source code Library including whatever changes used work (must distributed Sections 1 2 ); , work executable linked Library, complete machine-readable “work uses Library”, object code /source code, user can modify Library relink produce modified executable containing modified Library. (understood user changes contents definitions files Library necessarily able recompile application use modified definitions.) b) Use suitable shared library mechanism linking Library. suitable mechanism one (1) uses run time copy library already present user’s computer system, rather copying library functions executable, (2) operate properly modified version library, user installs one, long modified version interface-compatible version work made . c) Accompany work written offer, valid least three years, give user materials specified Subsection 6a, , charge cost performing distribution. d) distribution work made offering access copy designated place, offer equivalent access copy specified materials place. e) Verify user already received copy materials already sent user copy. executable, required form “work uses Library” must include data utility programs needed reproducing executable . However, special exception, materials distributed need include anything normally distributed (either source binary form) major components (compiler, kernel, ) operating system executable runs, unless component accompanies executable. may happen requirement contradicts license restrictions proprietary libraries normally accompany operating system. contradiction means use Library together executable distribute. 7. may place library facilities work based Library side--side single library together library facilities covered License, distribute combined library, provided separate distribution work based Library library facilities otherwise permitted, provided two things: ) Accompany combined library copy work based Library, uncombined library facilities. must distributed terms Sections . b) Give prominent notice combined library fact part work based Library, explaining find accompanying uncombined form work. 8. may copy, modify, sublicense, link , distribute Library except expressly provided License. attempt otherwise copy, modify, sublicense, link , distribute Library void, automatically terminate rights License. However, parties received copies, rights, License licenses terminated long parties remain full compliance. 9. required accept License, since signed . However, nothing else grants permission modify distribute Library derivative works. actions prohibited law accept License. Therefore, modifying distributing Library (work based Library), indicate acceptance License , terms conditions copying, distributing modifying Library works based . 10. time redistribute Library (work based Library), recipient automatically receives license original licensor copy, distribute, link modify Library subject terms conditions. may impose restrictions recipients’ exercise rights granted herein. responsible enforcing compliance third parties License. 11. , consequence court judgment allegation patent infringement reason (limited patent issues), conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. distribute satisfy simultaneously obligations License pertinent obligations, consequence may distribute Library . example, patent license permit royalty-free redistribution Library receive copies directly indirectly , way satisfy License refrain entirely distribution Library. portion section held invalid unenforceable particular circumstance, balance section intended apply, section whole intended apply circumstances. purpose section induce infringe patents property right claims contest validity claims; section sole purpose protecting integrity free software distribution system implemented public license practices. Many people made generous contributions wide range software distributed system reliance consistent application system; author/donor decide willing distribute software system licensee impose choice. section intended make thoroughly clear believed consequence rest License. 12. distribution /use Library restricted certain countries either patents copyrighted interfaces, original copyright holder places Library License may add explicit geographical distribution limitation excluding countries, distribution permitted among countries thus excluded. case, License incorporates limitation written body License. 13. Free Software Foundation may publish revised /new versions Lesser General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Library specifies version number License applies “later version”, option following terms conditions either version later version published Free Software Foundation. Library specify license version number, may choose version ever published Free Software Foundation. 14. wish incorporate parts Library free programs whose distribution conditions incompatible , write author ask permission. software copyrighted Free Software Foundation, write Free Software Foundation; sometimes make exceptions . decision guided two goals preserving free status derivatives free software promoting sharing reuse software generally. WARRANTY 15. LIBRARY LICENSED FREE CHARGE, WARRANTY LIBRARY, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE LIBRARY “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE LIBRARY . LIBRARY PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION. 16. EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MAY MODIFY /REDISTRIBUTE LIBRARY PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE LIBRARY (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE LIBRARY OPERATE SOFTWARE), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":[]},{"path":"https://dbi.r-dbi.org/dev/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-libraries","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Libraries","title":"NA","text":"develop new library, want greatest possible use public, recommend making free software everyone can redistribute change. can permitting redistribution terms (, alternatively, terms ordinary General Public License). apply terms, attach following notices library. safest attach start source file effectively convey exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. also get employer (work programmer) school, , sign “copyright disclaimer” library, necessary. sample; alter names: ’s !","code":"one line to give the library's name and an idea of what it does. Copyright (C) year name of author This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:version","dir":"Articles","previous_headings":"","what":"Version","title":"A Common Database Interface (DBI)","text":"document describes version 0.1-6 database interface API (application programming interface).","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:intro","dir":"Articles","previous_headings":"","what":"Introduction","title":"A Common Database Interface (DBI)","text":"database interface (DBI) separates connectivity DBMS “front-end” “back-end”. Applications use exposed “front-end” API. facilities communicate specific DBMS (Oracle, PostgreSQL, etc.) provided “device drivers” get invoked automatically S language evaluator. following example illustrates DBI capabilities: (first 2 expressions DBMS-specific – others independent database engine ). Individual DBI drivers need implement features list (indicate optional). Furthermore, drivers may extend core DBI facilities, suggest extensions clearly indicated documented. following elements DBI: set classes methods (Section [sec:DBIClasses]) defines operations possible defined, e.g.: connect/disconnect DBMS create execute statements DBMS extract results/output statements error/exception handling information (meta-data) database objects transaction management (optional) things left explicitly unspecified, e.g., authentication even query language, although hard avoid references SQL relational database management systems (RDBMS). Drivers Drivers collection functions implement functionality defined context specific DBMS, e.g., mSQL, Informix. Data type mappings (Section [sec:data-mappings].) Mappings conversions DBMS data types R/S objects. drivers implement “basic” primitives (see ), may chose add user-defined conversion function handle generic objects (e.g., factors, ordered factors, time series, arrays, images). Utilities (Section [sec:utilities].) facilities help details mapping identifiers S DBMS (e.g., _ illegal R/S names, . used constructing compound SQL identifiers), etc.","code":"## Choose the proper DBMS driver and connect to the server drv <- dbDriver(\"ODBC\") con <- dbConnect(drv, \"dsn\", \"usr\", \"pwd\") ## The interface can work at a higher level importing tables ## as data.frames and exporting data.frames as DBMS tables. dbListTables(con) dbListFields(con, \"quakes\") if(dbExistsTable(con, \"new_results\")) dbRemoveTable(con, \"new_results\") dbWriteTable(con, \"new_results\", new.output) ## The interface allows lower-level interface to the DBMS res <- dbSendQuery(con, paste( \"SELECT g.id, g.mirror, g.diam, e.voltage\", \"FROM geom_table as g, elec_measures as e\", \"WHERE g.id = e.id and g.mirrortype = 'inside'\", \"ORDER BY g.diam\")) out <- NULL while(!dbHasCompleted(res)){ chunk <- fetch(res, n = 10000) out <- c(out, doit(chunk)) } ## Free up resources dbClearResult(res) dbDisconnect(con) dbUnloadDriver(drv)"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:DBIClasses","dir":"Articles","previous_headings":"","what":"DBI Classes and Methods","title":"A Common Database Interface (DBI)","text":"following main DBI classes. need extended individual database back-ends (Sybase, Oracle, etc.) Individual drivers need provide methods generic functions listed (methods optional indicated). Note: Although R releases prior 1.4 formal concept classes, use syntax S Version 4 classes methods (available R releases 1.4 later library methods) convey precisely DBI class hierarchy, methods, intended behavior. DBI classes DBIObject, DBIDriver, DBIConnection DBIResult. virtual classes. Drivers define new classes extend , e.g., PgSQLDriver, PgSQLConnection, . DBIObject: Virtual class1 groups DBI classes. DBIDriver: Virtual class groups DBMS drivers. DBMS driver extends class. Typically generator functions instantiate actual driver objects, e.g., PgSQL, HDF5, BerkeleyDB. DBIConnection: Virtual class encapsulates connections DBMS. DBIResult: Virtual class describes result DBMS query statement. [Q: distinguish simple result DBMS statements e.g., delete DBMS queries (.e., generate data).] methods format, print, show, dbGetInfo, summary defined (implemented DBI package) DBIObject base class, thus available implementations; individual drivers, however, free override see fit. format(x, ...): produces concise character representation (label) DBIObject x. print(x, ...)/show(x): prints one-line identification object x. summary(object, ...): produces concise description object. default method DBIObject simply invokes dbGetInfo(dbObj) prints name-value pairs one per line. Individual implementations may tailor appropriately. dbGetInfo(dbObj, ...): extracts information (meta-data) relevant DBIObject dbObj. may return list key/value pairs, individual meta-data supplied call, NULL requested meta-data available. Hint: Driver implementations may choose allow argument specify individual meta-data, e.g., dbGetInfo(drv, = max.connections). next sub-sections describe detail classes methods.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:DBIObject","dir":"Articles","previous_headings":"DBI Classes and Methods","what":"Class DBIObject","title":"A Common Database Interface (DBI)","text":"class simply groups DBI classes, thus extend .","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:DBIDriver","dir":"Articles","previous_headings":"DBI Classes and Methods","what":"Class DBIDriver","title":"A Common Database Interface (DBI)","text":"class identifies database management system. needs extended individual back-ends (Oracle, PostgreSQL, etc.) DBI provides generator dbDriver(driverName) simply invokes function driverName, turn instantiates corresponding driver object. DBIDriver class defines following methods: driverName: [meth:driverName] initializes driver code. name driverName refers actual generator function DBMS, e.g., RPgSQL, RODBC, HDF5. driver instance object used dbConnect (see page ) opening one possibly connections one DBMS. dbListConnections(drv, ...): list current connections handled drv driver. May NULL open connections. Drivers support multiple connections may return one open connection. dbGetInfo(dbObj, ...): returns list name-value pairs information driver. Hint: Useful entries include name: driver name (e.g., RODBC, RPgSQL); driver.version: version driver; DBI.version: version DBI driver implements, e.g., 0.1-2; client.version: client DBMS libraries (e.g., version libpq library case RPgSQL); max.connections: maximum number simultaneous connections; plus relevant information implementation, instance, driver handles upper/lower case identifiers. dbUnloadDriver(driverName) (optional): frees resources (local remote) used driver. Returns logical indicate succeeded .","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:DBIConnection","dir":"Articles","previous_headings":"DBI Classes and Methods","what":"Class DBIConnection","title":"A Common Database Interface (DBI)","text":"virtual class encapsulates connection DBMS, provides access dynamic queries, result sets, DBMS session management (transactions), etc. Note: Individual drivers free implement single multiple simultaneous connections. methods defined DBIConnection class include: dbConnect(drv, ...): [meth:dbConnect] creates opens connection database implemented driver drv (see Section [sec:DBIDriver]). driver define arguments required, e.g., dbname dsn database name, user, password. returns object extends DBIConnection driver-specific manner (e.g., MySQL implementation create object class MySQLConnection extends DBIConnection). dbDisconnect(conn, ...): closes connection, discards pending work, frees resources (e.g., memory, sockets). Returns logical indicating whether succeeded . dbSendQuery(conn, statement, ...): submits one statement DBMS. returns DBIResult object. object needed fetching data case statement generates output (see fetch page ), may used querying state operation; see dbGetInfo meta-data methods page . dbGetQuery(conn, statement, ...): submit, execute, extract output one operation. resulting object may data.frame statement generates output. Otherwise return value logical indicating whether query succeeded . dbGetException(conn, ...): returns list elements errNum errMsg status last DBMS statement sent given connection (information may also provided dbGetInfo meta-data function conn object. Hint: ANSI SQL-92 defines status code status message return members list. dbGetInfo(dbObj, ...): returns list name-value pairs describing state connection; may return one meta-data, actual driver method allows specify individual pieces meta-data (e.g., maximum number open results/cursors). Hint: Useful entries include dbname: name database use; db.version: DBMS server version (e.g., “Oracle 8.1.7 Solaris”; host: host database server resides; user: user name; password: password (safe?); plus arguments related connection (e.g., thread id, socket TCP connection type). dbListResults(conn, ...): list DBIResult objects currently active connection conn. May NULL result set active conn. Drivers implement one result set per connection return one object (need wrap list). Note: following convenience methods simplify import/export (mainly) data.frames. first five methods implement core methods needed attach remote DBMS S search path. (details, see Chambers (1991, 1998).) Hint: relational DBMS methods may easily implemented using core DBI methods dbConnect, dbSendQuery, fetch, due SQL reflectance (.e., one easily gets meta-data querying appropriate tables RDBMS). dbListTables(conn, ...): returns character vector (possibly zero-length) object (table) names available conn connection. dbReadTable(conn, name, ...): imports data stored remotely table name connection conn. Use field row.names row.names attribute output data.frame. Returns data.frame. [Q: spell row.names created? E.g., use field (unique values) row.names? Also, dbReadTable reproduce data.frame exported dbWriteTable?] dbWriteTable(conn, name, value, ...): write object value (perhaps coercing data.frame) remote object name connection conn. Returns logical indicating whether operation succeeded . dbExistsTable(conn, name, ...): remote object name exist conn? Returns logical. dbRemoveTable(conn, name, ...): removes remote object name connection conn. Returns logical indicating whether operation succeeded . dbListFields(conn, name, ...): returns character vector listing field names remote table name connection conn (see dbColumnInfo() extracting data type table). Note: following methods deal transactions stored procedures. functions optional. dbCommit(conn, ...)(optional): commits pending transaction connection returns TRUE FALSE depending whether operation succeeded . dbRollback(conn, ...)(optional): undoes current transaction connection returns TRUE FALSE depending whether operation succeeded . dbCallProc(conn, storedProc, ...)(optional): invokes stored procedure DBMS returns DBIResult object. [Stored procedures part ANSI SQL-92 standard vary substantially one RDBMS another.] Deprecated since 2014: recommended way calling stored procedure now dbGetQuery result set returned dbExecute data manipulation cases return result set.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:DBIResult","dir":"Articles","previous_headings":"DBI Classes and Methods","what":"Class DBIResult","title":"A Common Database Interface (DBI)","text":"virtual class describes result state execution DBMS statement (statement, query non-query). result set res keeps track whether statement produces output R/S, many rows affected operation, many rows fetched (statement query), whether rows fetch, etc. Note: Individual drivers free allow single multiple active results per connection. [Q: distinguish results return data return data?] class DBIResult defines following methods: fetch(res, n, ...): [meth:fetch] fetches next n elements (rows) result set res return data.frame. value n=-1 interpreted “return elements/rows”. dbClearResult(res, ...): flushes pending data frees resources (local remote) used object res sides connection. Returns logical indicating success . dbGetInfo(dbObj, ...): returns name-value list state result set. Hint: Useful entries include statement: character string representation statement executed; rows.affected: number affected records (changed, deleted, inserted, extracted); row.count: number rows fetched far; .completed: statement (query) finished? .select: logical describing whether statement generates output; plus relevant driver-specific meta-data. dbColumnInfo(res, ...): produces data.frame describes output query. data.frame many rows output fields result set, column data.frame describe aspect result set field (field name, type, etc.) Hint: data.frame columns include field.name: DBMS field label; field.type: DBMS field type (implementation-specific); data.type: corresponding R/S data type, e.g., integer; precision/scale: (ODBC terminology), display width number decimal digits, respectively; nullable: whether corresponding field may contain (DBMS) NULL values; plus driver-specific information. dbSetDataMappings(flds, ...)(optional): defines conversion internal DBMS data types R/S classes. expect default mappings (see Section [sec:data-mappings]) far common ones, users need control may specify class generator individual fields result set. [topic needs discussion.] Note: following convenience methods extract information result object (may implemented invoking dbGetInfo appropriate arguments). dbGetStatement(res, ...)(optional): returns DBMS statement (character string) associated result res. dbGetRowsAffected(res, ...)(optional): returns number rows affected executed statement (number records deleted, modified, extracted, etc.) dbHasCompleted(res, ...)(optional): returns logical indicates whether operation completed (e.g., records fetched?). dbGetRowCount(res, ...)(optional): returns number rows fetched far.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:data-mappings","dir":"Articles","previous_headings":"","what":"Data Type Mappings","title":"A Common Database Interface (DBI)","text":"data types supported databases different data types R S, mapping “primitive” types straightforward: many fixed varying length character types mapped R/S character. Fixed-precision (non-IEEE) numbers mapped either doubles (numeric) long (integer). Notice many DBMS follow -called IEEE arithmetic, potential problems /overflows loss precision, given R/S primitive types much identify situations warn application (?). default dates date-time objects mapped character using appropriate TO_CHAR function DBMS (take care locale information). RDBMS support type CURRENCY MONEY mapped numeric (potential round errors). Large objects (character, binary, file, etc.) also need mapped. User-defined functions may specified actual conversion (done inter-systems packages 2). Specifying user-defined conversion functions still needs defined.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:utilities","dir":"Articles","previous_headings":"","what":"Utilities","title":"A Common Database Interface (DBI)","text":"core DBI implementation make available drivers common basic utilities. instance: dbGetDBIVersion: returns version currently attached DBI string. dbDataType(dbObj, obj, ...): returns string (approximately) appropriate data type R/S object obj. DBI can implement following ANSI-92 standard, individual drivers may want/need extend make use DBMS-specific types. make.db.names(dbObj, snames, ...): maps R/S names (identifiers) SQL identifiers replacing illegal characters (.) legal SQL _. SQLKeywords(dbObj, ...): returns character vector SQL keywords (reserved words). default method returns list .SQL92Keywords, drivers update vector DBMS-specific additional reserved words. isSQLKeyword(dbObj, name, ...): element character vector name determine whether SQL keyword, reported generic function SQLKeywords. Returns logical vector parallel input object name.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:open-issues","dir":"Articles","previous_headings":"","what":"Open Issues and Limitations","title":"A Common Database Interface (DBI)","text":"number issues limitations current DBI conscientiously address interest simplicity. list important ones. Non-SQL: realistic attempt encompass non-relational databases, like HDF5, Berkeley DB, etc.? Security: allowing users specify passwords R/S scripts may unacceptable applications. need consider alternatives users store authentication files (perhaps similar ODBC’s odbc.ini) stringent permissions. Exceptions: exception mechanism bit simple, provide information problems stem DBMS interface . instance, /overflow loss precision move numeric data DBMS limited primitives R/S. Asynchronous communication: DBMS support synchronous asynchronous communications, allowing applications submit query proceed database server process query. application notified (may need poll server) query completed. large computations, useful, DBI need specify interrupt server (necessary) plus details. Also, DBMS require applications use threads implement asynchronous communication, something neither R S-Plus currently addresses. SQL scripts: DBI defines execute one SQL statement time, forcing users split SQL scripts individual statements. need mechanism users can submit SQL scripts possibly generate multiple result sets; case may need introduce new methods loop multiple results (similar Python’s nextResultSet). BLOBS/CLOBS: large objects (character binary) present challenges R S-Plus. becoming common store images, sounds, data types binary objects DBMS, can principle quite large. SQL-92 ANSI standard allows 2 gigabytes objects. need carefully plan deal binary objects. Transactions: transaction management fully described. Additional methods: need additional methods? (e.g., dbListDatabases(conn), dbListTableIndices(conn, name), list available drivers?) Bind variables: interface heavily biased towards queries, opposed general purpose database development. particular made attempt define “bind variables”; mechanism contents R/S objects implicitly moved database SQL execution. instance, following embedded SQL statement take vector sampleEmployee iterate elements get result. Perhaps DBI point future implement feature.","code":"/* SQL */ SELECT * from emp_table where emp_id = :sampleEmployee"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-1.html","id":"sec:resources","dir":"Articles","previous_headings":"","what":"Resources","title":"A Common Database Interface (DBI)","text":"idea common interface databases successfully implemented various environments, instance: Java’s Database Connectivity (JDBC) (www.javasoft.com). C Open Database Connectivity (ODBC) (www.unixodbc.org). Python’s Database Application Programming Interface (www.python.org). Perl’s Database Interface (dbi.perl.org).","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"who-this-tutorial-is-for","dir":"Articles","previous_headings":"","what":"Who this tutorial is for","title":"Advanced DBI Usage","text":"tutorial need use richer set SQL features data manipulation queries, parameterized queries queries performed using SQL’s transaction features. See vignette(\"DBI\", package = \"DBI\") basic tutorial covering connecting DBMS executing simple queries.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"how-to-run-more-complex-queries-using-dbi","dir":"Articles","previous_headings":"","what":"How to run more complex queries using DBI","title":"Advanced DBI Usage","text":"dbGetQuery() works calling number functions behind scenes. need control can manually build query, retrieve results selected rate, release resources involved calling functions. functions : dbSendQuery() sends SQL query DBMS returns result object. query limited SELECT statements. want send statements, INSERT, UPDATE, DELETE, etc, use dbSendStatement(). dbFetch() called result object returned dbSendQuery(). also accepts argument specifying number rows returned, e.g. n = 200. want fetch rows, use n = -1. dbClearResult() called finished retrieving data. releases resources associated result object.","code":"library(DBI) con <- dbConnect( RMariaDB::MariaDB(), host = \"db.relational-data.org\", port = 3306, username = \"guest\", password = \"relational\", dbname = \"sakila\" ) res <- dbSendQuery(con, \"SELECT * FROM film WHERE rating = 'G'\") df <- dbFetch(res, n = 3) dbClearResult(res) head(df, 3) ## film_id title ## 1 2 ACE GOLDFINGER ## 2 4 AFFAIR PREJUDICE ## 3 5 AFRICAN EGG ## description ## 1 A Astounding Epistle of a Database Administrator And a Explorer who must Find a Car in Ancient China ## 2 A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a Monkey in A Shark Tank ## 3 A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursue a Forensic Psychologist in The Gulf of Mexico ## release_year language_id original_language_id rental_duration rental_rate ## 1 2006 1 NA 3 4.99 ## 2 2006 1 NA 5 2.99 ## 3 2006 1 NA 6 2.99 ## length replacement_cost rating special_features ## 1 48 12.99 G Trailers,Deleted Scenes ## 2 117 26.99 G Commentaries,Behind the Scenes ## 3 130 22.99 G Deleted Scenes ## last_update ## 1 2006-02-15 04:03:42 ## 2 2006-02-15 04:03:42 ## 3 2006-02-15 04:03:42"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"how-to-read-part-of-a-table-from-a-database","dir":"Articles","previous_headings":"","what":"How to read part of a table from a database","title":"Advanced DBI Usage","text":"dataset large may want fetch limited number rows time. demonstrated , can accomplished using loop function dbHasCompleted() used check ongoing rows, dbFetch() used n = X argument, specifying many rows return iteration. , call dbClearResult() end release resources.","code":"res <- dbSendQuery(con, \"SELECT * FROM film\") while (!dbHasCompleted(res)) { chunk <- dbFetch(res, n = 300) print(nrow(chunk)) } ## [1] 300 ## [1] 300 ## [1] 300 ## [1] 100 dbClearResult(res)"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"how-to-use-parameters-safely-in-sql-queries","dir":"Articles","previous_headings":"","what":"How to use parameters (safely) in SQL queries","title":"Advanced DBI Usage","text":"dbSendQuery() can used parameterized SQL queries. DBI supports two ways avoid SQL injection attacks user-supplied parameters: quoting parameterized queries.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"quoting","dir":"Articles","previous_headings":"How to use parameters (safely) in SQL queries","what":"Quoting","title":"Advanced DBI Usage","text":"Quoting parameter values performed using function dbQuoteLiteral(), supports many R data types, including date time.1 cases users may supplying table column names use query data retrieval, names identifiers must also escaped. may DBMS-specific rules escaping identifiers, DBI provides function dbQuoteIdentifier() generate safe string representation. result can using glue::glue_sql(). performs safe quoting variable R statement appearing braces within query string.","code":"safe_id <- dbQuoteIdentifier(con, \"rating\") safe_param <- dbQuoteLiteral(con, \"G\") query <- paste0(\"SELECT title, \", safe_id, \" FROM film WHERE \", safe_id, \" = \", safe_param) query ## [1] \"SELECT title, `rating` FROM film WHERE `rating` = 'G'\" res <- dbSendQuery(con, query) dbFetch(res) ## title rating ## 1 ACE GOLDFINGER G ## 2 AFFAIR PREJUDICE G ## 3 AFRICAN EGG G ## Showing 3 out of 178 rows. dbClearResult(res) id <- \"rating\" param <- \"G\" query <- glue::glue_sql(\"SELECT title, {`id`} FROM film WHERE {`id`} = {param}\", .con = con) df <- dbGetQuery(con, query) head(df, 3) ## title rating ## 1 ACE GOLDFINGER G ## 2 AFFAIR PREJUDICE G ## 3 AFRICAN EGG G"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"parameterized-queries","dir":"Articles","previous_headings":"How to use parameters (safely) in SQL queries","what":"Parameterized queries","title":"Advanced DBI Usage","text":"Rather performing parameter substitution , can push DBMS including placeholders query. Different DBMS use different placeholder schemes, DBI passes SQL expression unchanged. MariaDB uses question mark (?) placeholder expects unnamed list parameter values. DBMS may use named parameters. recommend consulting documentation DBMS using. example, web search “mariadb parameterized queries” leads documentation PREPARE statement mentions: Within statement, “?” characters can used parameter markers indicate data values bound query later execute . Currently list placeholder scheme particular DBMS supports. Placeholders work literal values. parts query, e.g. table column identifiers, still need quoted dbQuoteIdentifier(). single set parameters, params argument dbSendQuery() dbGetQuery() can used. takes list members substituted order placeholders within query. example query using multiple placeholders MariaDB driver. placeholders supplied list values ordered match position placeholders query. wish perform query different sets parameter values, dbBind() used. two ways use dbBind(). Firstly, can used multiple times query. Secondly, dbBind() can used execute statement multiple values . Use list vectors query multiple parameters: Always disconnect database done.","code":"params <- list(\"G\") safe_id <- dbQuoteIdentifier(con, \"rating\") query <- paste0(\"SELECT * FROM film WHERE \", safe_id, \" = ?\") query ## [1] \"SELECT * FROM film WHERE `rating` = ?\" res <- dbSendQuery(con, query, params = params) dbFetch(res, n = 3) ## film_id title ## 1 2 ACE GOLDFINGER ## 2 4 AFFAIR PREJUDICE ## 3 5 AFRICAN EGG ## description ## 1 A Astounding Epistle of a Database Administrator And a Explorer who must Find a Car in Ancient China ## 2 A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a Monkey in A Shark Tank ## 3 A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursue a Forensic Psychologist in The Gulf of Mexico ## release_year language_id original_language_id rental_duration rental_rate ## 1 2006 1 NA 3 4.99 ## 2 2006 1 NA 5 2.99 ## 3 2006 1 NA 6 2.99 ## length replacement_cost rating special_features ## 1 48 12.99 G Trailers,Deleted Scenes ## 2 117 26.99 G Commentaries,Behind the Scenes ## 3 130 22.99 G Deleted Scenes ## last_update ## 1 2006-02-15 04:03:42 ## 2 2006-02-15 04:03:42 ## 3 2006-02-15 04:03:42 dbClearResult(res) q_params <- list(\"G\", 90) query <- \"SELECT title, rating, length FROM film WHERE rating = ? AND length >= ?\" res <- dbSendQuery(con, query, params = q_params) dbFetch(res, n = 3) ## title rating length ## 1 AFFAIR PREJUDICE G 117 ## 2 AFRICAN EGG G 130 ## 3 ALAMO VIDEOTAPE G 126 dbClearResult(res) res <- dbSendQuery(con, \"SELECT * FROM film WHERE rating = ?\") dbBind(res, list(\"G\")) dbFetch(res, n = 3) ## film_id title ## 1 2 ACE GOLDFINGER ## 2 4 AFFAIR PREJUDICE ## 3 5 AFRICAN EGG ## description ## 1 A Astounding Epistle of a Database Administrator And a Explorer who must Find a Car in Ancient China ## 2 A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a Monkey in A Shark Tank ## 3 A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursue a Forensic Psychologist in The Gulf of Mexico ## release_year language_id original_language_id rental_duration rental_rate ## 1 2006 1 NA 3 4.99 ## 2 2006 1 NA 5 2.99 ## 3 2006 1 NA 6 2.99 ## length replacement_cost rating special_features ## 1 48 12.99 G Trailers,Deleted Scenes ## 2 117 26.99 G Commentaries,Behind the Scenes ## 3 130 22.99 G Deleted Scenes ## last_update ## 1 2006-02-15 04:03:42 ## 2 2006-02-15 04:03:42 ## 3 2006-02-15 04:03:42 dbBind(res, list(\"PG\")) dbFetch(res, n = 3) ## film_id title ## 1 1 ACADEMY DINOSAUR ## 2 6 AGENT TRUMAN ## 3 12 ALASKA PHANTOM ## description ## 1 A Epic Drama of a Feminist And a Mad Scientist who must Battle a Teacher in The Canadian Rockies ## 2 A Intrepid Panorama of a Robot And a Boy who must Escape a Sumo Wrestler in Ancient China ## 3 A Fanciful Saga of a Hunter And a Pastry Chef who must Vanquish a Boy in Australia ## release_year language_id original_language_id rental_duration rental_rate ## 1 2006 1 NA 6 0.99 ## 2 2006 1 NA 3 2.99 ## 3 2006 1 NA 6 0.99 ## length replacement_cost rating special_features ## 1 86 20.99 PG Deleted Scenes,Behind the Scenes ## 2 169 17.99 PG Deleted Scenes ## 3 136 22.99 PG Commentaries,Deleted Scenes ## last_update ## 1 2006-02-15 04:03:42 ## 2 2006-02-15 04:03:42 ## 3 2006-02-15 04:03:42 dbClearResult(res) res <- dbSendQuery(con, \"SELECT * FROM film WHERE rating = ?\") dbBind(res, list(c(\"G\", \"PG\"))) dbFetch(res, n = 3) ## film_id title ## 1 2 ACE GOLDFINGER ## 2 4 AFFAIR PREJUDICE ## 3 5 AFRICAN EGG ## description ## 1 A Astounding Epistle of a Database Administrator And a Explorer who must Find a Car in Ancient China ## 2 A Fanciful Documentary of a Frisbee And a Lumberjack who must Chase a Monkey in A Shark Tank ## 3 A Fast-Paced Documentary of a Pastry Chef And a Dentist who must Pursue a Forensic Psychologist in The Gulf of Mexico ## release_year language_id original_language_id rental_duration rental_rate ## 1 2006 1 NA 3 4.99 ## 2 2006 1 NA 5 2.99 ## 3 2006 1 NA 6 2.99 ## length replacement_cost rating special_features ## 1 48 12.99 G Trailers,Deleted Scenes ## 2 117 26.99 G Commentaries,Behind the Scenes ## 3 130 22.99 G Deleted Scenes ## last_update ## 1 2006-02-15 04:03:42 ## 2 2006-02-15 04:03:42 ## 3 2006-02-15 04:03:42 dbClearResult(res) q_params <- list(c(\"G\", \"PG\"), c(90, 120)) query <- \"SELECT title, rating, length FROM film WHERE rating = ? AND length >= ?\" res <- dbSendQuery(con, query, params = q_params) dbFetch(res, n = 3) ## title rating length ## 1 AFFAIR PREJUDICE G 117 ## 2 AFRICAN EGG G 130 ## 3 ALAMO VIDEOTAPE G 126 dbClearResult(res) dbDisconnect(con)"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"sql-data-manipulation---update-delete-and-friends","dir":"Articles","previous_headings":"","what":"SQL data manipulation - UPDATE, DELETE and friends","title":"Advanced DBI Usage","text":"SQL queries affect underlying database, UPDATE, DELETE, INSERT , DROP TABLE, DBI provides two functions. dbExecute() passes SQL statement DBMS execution returns number rows affected. dbSendStatement() performs manner, returns result object. Call dbGetRowsAffected() result object get count affected rows. need call dbClearResult() result object afterwards release resources. actuality, dbExecute() convenience function calls dbSendStatement(), dbGetRowsAffected(), dbClearResult(). can use functions need control query process. subsequent examples use -memory SQL database provided RSQLite::SQLite(), remote database used examples allow writing. forget disconnect database end.","code":"library(DBI) con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbWriteTable(con, \"cars\", head(cars, 3)) dbExecute( con, \"INSERT INTO cars (speed, dist) VALUES (1, 1), (2, 2), (3, 3)\" ) ## [1] 3 rs <- dbSendStatement( con, \"INSERT INTO cars (speed, dist) VALUES (4, 4), (5, 5), (6, 6)\" ) dbGetRowsAffected(rs) ## [1] 3 dbClearResult(rs) dbReadTable(con, \"cars\") ## speed dist ## 1 4 2 ## 2 4 10 ## 3 7 4 ## Showing 3 out of 9 rows. dbDisconnect(con)"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"sql-transactions-with-dbi","dir":"Articles","previous_headings":"","what":"SQL transactions with DBI","title":"Advanced DBI Usage","text":"DBI allows group multiple queries single atomic transaction. Transactions initiated dbBegin() either made persistent dbCommit() undone dbRollback(). example updates two tables ensures either tables updated, changes persisted database error thrown. withdrawing 300 credits, cash increased account decreased amount. transaction ensures either operations succeed, change occurs. can roll back changes manually necessary. forget call dbRollback() case error, otherwise transaction remains open indefinitely. dbWithTransaction() simplifies using transactions. Pass connection code want run transaction. execute code call dbCommit() success call dbRollback() error thrown. usual, forget disconnect database done.","code":"con <- dbConnect(RSQLite::SQLite(), \":memory:\") dbWriteTable(con, \"cash\", data.frame(amount = 100)) dbWriteTable(con, \"account\", data.frame(amount = 2000)) withdraw <- function(amount) { # All operations must be carried out as logical unit: dbExecute(con, \"UPDATE cash SET amount = amount + ?\", list(amount)) dbExecute(con, \"UPDATE account SET amount = amount - ?\", list(amount)) } withdraw_transacted <- function(amount) { # Ensure atomicity dbBegin(con) # Perform operation withdraw(amount) # Persist results dbCommit(con) } withdraw_transacted(300) dbReadTable(con, \"cash\") ## amount ## 1 400 dbReadTable(con, \"account\") ## amount ## 1 1700 withdraw_if_funds <- function(amount) { dbBegin(con) withdraw(amount) # Rolling back after detecting negative value on account: if (dbReadTable(con, \"account\")$amount >= 0) { dbCommit(con) TRUE } else { message(\"Insufficient funds\") dbRollback(con) FALSE } } withdraw_if_funds(5000) ## Insufficient funds ## [1] FALSE dbReadTable(con, \"cash\") ## amount ## 1 400 dbReadTable(con, \"account\") ## amount ## 1 1700 withdraw_safely <- function(amount) { dbWithTransaction(con, { withdraw(amount) if (dbReadTable(con, \"account\")$amount < 0) { stop(\"Error: insufficient funds\", call. = FALSE) } }) } withdraw_safely(5000) ## Error: Error: insufficient funds dbReadTable(con, \"cash\") ## amount ## 1 400 dbReadTable(con, \"account\") ## amount ## 1 1700 dbDisconnect(con)"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-advanced.html","id":"conclusion","dir":"Articles","previous_headings":"","what":"Conclusion","title":"Advanced DBI Usage","text":"concludes major features DBI. details library functions covered tutorial vignette(\"DBI\", package = \"DBI\") introductory tutorial see DBI specification vignette(\"spec\", package = \"DBI\"). data manipulation library works higher level abstraction, check dplyr. grammar data manipulation can work local dataframes remote databases uses DBI hood.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-arrow.html","id":"who-this-tutorial-is-for","dir":"Articles","previous_headings":"","what":"Who this tutorial is for","title":"Using DBI with Arrow","text":"tutorial want leverage Apache Arrow accessing manipulating data databases. See vignette(\"DBI\", package = \"DBI\") vignette(\"DBI-advanced\", package = \"DBI\") tutorials accessing data using R’s data frames instead Arrow’s structures.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-arrow.html","id":"rationale","dir":"Articles","previous_headings":"","what":"Rationale","title":"Using DBI with Arrow","text":"Apache Arrow cross-language development platform -memory analytics, suitable large huge data, support --memory operation. Arrow also data exchange format, data types covered Arrow align well data types supported SQL databases. DBI 1.2.0 introduced support Arrow format exchanging data R databases. aim : accelerate data retrieval loading, using fewer costly data conversions; better support reading summarizing data database larger memory; provide better type fidelity workflows centered around Arrow. allows existing code used Arrow, allows new code written efficient flexible code uses R’s data frames. interface built around {nanoarrow} R package, nanoarrow::as_nanoarrow_array nanoarrow::as_nanoarrow_array_stream fundamental data structures.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-arrow.html","id":"new-classes-and-generics","dir":"Articles","previous_headings":"","what":"New classes and generics","title":"Using DBI with Arrow","text":"DBI 1.2.0 introduces new classes generics working Arrow data: dbReadTableArrow() dbWriteTableArrow() dbCreateTableArrow() dbAppendTableArrow() dbGetQueryArrow() dbSendQueryArrow() dbBindArrow() dbFetchArrow() dbFetchArrowChunk() DBIResultArrow-class DBIResultArrowDefault-class Compatibility important DBI, implementing new generics classes greatly reduces risk breaking existing code. DBI package comes fully functional fallback implementation existing DBI backends. fallback improving performance, allows existing code used Arrow switching backend native Arrow support. Backends native support, like adbi package, implement new generics classes direct support improved performance. remainder tutorial, demonstrate new generics classes using RSQLite package. SQLite -memory database, code need database server installed running.","code":""},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-arrow.html","id":"prepare","dir":"Articles","previous_headings":"","what":"Prepare","title":"Using DBI with Arrow","text":"start setting database connection creating table data, using original dbWriteTable() method.","code":"library(DBI) con <- dbConnect(RSQLite::SQLite()) data <- data.frame( a = 1:3, b = 4.5, c = \"five\" ) dbWriteTable(con, \"tbl\", data)"},{"path":"https://dbi.r-dbi.org/dev/articles/DBI-arrow.html","id":"read-all-rows-from-a-table","dir":"Articles","previous_headings":"","what":"Read all rows from a table","title":"Using DBI with Arrow","text":"dbReadTableArrow() method reads rows table Arrow stream, similarly dbReadTable(). Arrow objects implement .data.frame() method, can convert stream data frame.","code":"stream <- dbReadTableArrow(con, \"tbl\") stream ##