diff --git a/pkgdown.yml b/pkgdown.yml index d8994e7ba..b32a9874d 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1.9000 pkgdown_sha: dfa28bef27858bd442334b5cce8f645d555914be articles: DBItest: DBItest.html -last_built: 2024-12-07T15:03Z +last_built: 2024-12-08T07:11Z urls: reference: https://dbitest.r-dbi.org/reference article: https://dbitest.r-dbi.org/articles diff --git a/reference/context.html b/reference/context.html index a48cae1cc..d03c32ec8 100644 --- a/reference/context.html +++ b/reference/context.html @@ -124,7 +124,7 @@

Examples#> <DBIConnector><SQLiteDriver> #> Arguments: #> $dbname -#> [1] "/tmp/RtmpaZXKrm/DBItest2bb63971ce6b.sqlite" +#> [1] "/tmp/RtmpQAG6mU/DBItest2bd873f6acb7.sqlite" #> #> #> $drv diff --git a/search.json b/search.json index ee826565b..6ff6bf193 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://dbitest.r-dbi.org/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://dbitest.r-dbi.org/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to DBItest","title":"Contributing to DBItest","text":"outlines propose change DBItest.","code":""},{"path":"https://dbitest.r-dbi.org/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to DBItest","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://dbitest.r-dbi.org/CONTRIBUTING.html","id":"prerequisites","dir":"","previous_headings":"","what":"Prerequisites","title":"Contributing to DBItest","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://dbitest.r-dbi.org/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"","what":"Pull request process","title":"Contributing to DBItest","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://dbitest.r-dbi.org/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to DBItest","text":"Please note DBItest project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://dbitest.r-dbi.org/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://dbitest.r-dbi.org/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://dbitest.r-dbi.org/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://dbitest.r-dbi.org/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://dbitest.r-dbi.org/articles/DBItest.html","id":"testing-a-new-backend","dir":"Articles","previous_headings":"","what":"Testing a new backend","title":"Testing DBI backends","text":"test cases DBItest package structured similarly sections “backend” vignette: Like “backend” vignette, vignette assumes implementing RKazam package Kazam() function creates new DBIDriver instance connecting “Kazam” database. can add tests DBItest package incrementally, proceed implementing various parts DBI. DBItest package builds upon testthat package. enable , run following package directory (installing updating devtools): creates, among others, file test-DBItest.R tests/testthat directory. Replace entire contents following: Now test package devtools::test(). followed least “Getting started” section DBI “backend” vignette, tests succeed. adding corresponding test function tests/test-DBItest.R file implementing section, get immediate feedback functionality section still needs implemented running devtools::test() . Therefore, proceed appending following tests/test-DBItest.R, include test case forthcoming section: , tests succeed done “Driver” section. Add call next tester function, implement following section tests succeed, forth. scenario, usually interested first error test suite finds. StopReporter testthat helpful , activate passing reporter = \"stop\" devtools::test(). Alternatively, call relevant DBItest::test_() function directly. tests documented corresponding functions: instance, ?test_driver shows coarse description tests “Driver” test case. Test failures include name test failing; case, investigating documentation source code DBItest package usually lead cause error. tests can satisfied: example, one test tests logical variables survive write-read roundtrip database, whereas another test tests logical variables converted integer case. Tests can skipped adding regular expressions tests skip character vector call, following1: reasons skip tests : - database support feature - want postpone avoid implementation feature - test takes long run.","code":"vignette(\"backend\", package = \"DBI\") devtools::use_testthat() devtools::use_test(\"DBItest\") DBItest::make_context(Kazam(), NULL) DBItest::test_getting_started() DBItest::test_driver() DBItest::test_driver(skip = c( \"data_type\" # Reason 1... \"constructor.*\", # Reason 2... NULL ))"},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"testing-an-existing-backend","dir":"Articles","previous_headings":"","what":"Testing an existing backend","title":"Testing DBI backends","text":"existing backends, simply enabling tests may quickest way get started. Run following package directory (installing updating devtools): creates, among others, file test-DBItest.R tests/testthat directory. Replace entire contents following: notes “Kazam” skipping tests previous section apply well. test_all() function simply calls test cases.","code":"devtools::use_testthat() devtools::use_test(\"DBItest\") DBItest::make_context(Kazam(), NULL) DBItest::test_all()"},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"external-testing","dir":"Articles","previous_headings":"","what":"External testing","title":"Testing DBI backends","text":"DBItest currently geared towards usage part package’s test suite. effort possible test database backend custom database. can help verify database installation gives expected results accessed DBI specific connection arguments. example shows run tests RSQLite backend.","code":""},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"preparation","dir":"Articles","previous_headings":"External testing","what":"Preparation","title":"Testing DBI backends","text":"First, need define test context. contains: connector describes establish database connection, see ?DBI::`DBIConnector-class` details, tweaks, see ?tweaks, tests skipped default, character vector. Database backends use DBItest testing usually file test/testthat/helper-DBItest.R test/testthat/test-DBItest.R call make_context() can found. help make_context() already contains example works RSQLite. Adapt needs. make_context() function must called tests can run.","code":"library(DBItest) tweaks <- tweaks( constructor_relax_args = TRUE, placeholder_pattern = c(\"?\", \"$1\", \"$name\", \":name\"), date_cast = function(x) paste0(\"'\", x, \"'\"), time_cast = function(x) paste0(\"'\", x, \"'\"), timestamp_cast = function(x) paste0(\"'\", x, \"'\"), logical_return = function(x) as.integer(x), date_typed = FALSE, time_typed = FALSE, timestamp_typed = FALSE ) default_skip <- c(\"roundtrip_date\", \"roundtrip_timestamp\") invisible(make_context( new( \"DBIConnector\", .drv = RSQLite::SQLite(), .conn_args = list(dbname = tempfile(\"DBItest\", fileext = \".sqlite\")) ), tweaks = tweaks, default_skip = default_skip ))"},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"testing","dir":"Articles","previous_headings":"External testing","what":"Testing","title":"Testing DBI backends","text":"Use test_all() run tests, test_some() run specific test failed previously. test_* functions need run testthat reporter avoid stopping first error warning. interactive use, “progress” reporter gives good results. example , “location” “stop” reporters combined. Review ?testthat::Reporter list reporters. DBItest relies heavily metaprogramming. Unfortunately, means failing test may give indication reason failure. test_some() function now default integrates new experimental dblog package package. prints DBI code executed tests run, seen . Another way scout reason problem review sources DBItest relate test name (printed failure) human-readable specification embedded test code.","code":"DBItest::test_some(\"get_query_atomic\") ## Test passed testthat::with_reporter( c(\"location\", \"fail\"), DBItest::test_some(\"get_query_atomic\") ) ## Start test: DBItest: Result: get_query_atomic ## [success] ## [success] ## [success] ## [success] ## [success] ## [success] ## [success] ## End test: DBItest: Result: get_query_atomic"},{"path":"https://dbitest.r-dbi.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Kirill Müller. Author, maintainer. . Copyright holder. R Consortium. Funder.","code":""},{"path":"https://dbitest.r-dbi.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Müller K (2024). DBItest: Testing DBI Backends. R package version 1.8.2, https://github.com/r-dbi/DBItest, https://dbitest.r-dbi.org.","code":"@Manual{, title = {DBItest: Testing DBI Backends}, author = {Kirill Müller}, year = {2024}, note = {R package version 1.8.2, https://github.com/r-dbi/DBItest}, url = {https://dbitest.r-dbi.org}, }"},{"path":"https://dbitest.r-dbi.org/index.html","id":"dbitest","dir":"","previous_headings":"","what":"Testing DBI Backends","title":"Testing DBI Backends","text":"package primarily useful developers DBI backends. provides considerable set test cases DBI backends. test cases correspond DBI specification. Please follow steps add test cases DBI backend.","code":""},{"path":"https://dbitest.r-dbi.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Testing DBI Backends","text":"Install CRAN via development version using","code":"install.packages(\"DBItest\") devtools::install_github(\"r-dbi/DBItest\")"},{"path":"https://dbitest.r-dbi.org/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Testing DBI Backends","text":"driver package, add DBItest Suggests: enable tests. Run following code package’s directory: enables testing using testthat (necessary) creates, among others, file test-DBItest.R tests/testthat directory. Replace entire contents following: assumes Kazam() returns instance DBIDriver class. Additional arguments dbConnect() specified named list instead NULL argument make_context(). default_skip argument make_context() allows skipping tests (yet) satisfied backend. reading: Detailed instructions vignette(\"DBItest\") feature list original proposal. Please note ‘DBItest’ project released Contributor Code Conduct. contributing project, agree abide terms.","code":"# install.packages(\"usethis\") usethis::use_package(\"DBItest\", \"suggests\") usethis::use_test(\"DBItest\") DBItest::make_context(Kazam(), NULL) DBItest::test_all()"},{"path":"https://dbitest.r-dbi.org/reference/DBItest-package.html","id":null,"dir":"Reference","previous_headings":"","what":"DBItest: Testing DBI Backends — DBItest-package","title":"DBItest: Testing DBI Backends — DBItest-package","text":"helper tests DBI back ends conformity interface.","code":""},{"path":"https://dbitest.r-dbi.org/reference/DBItest-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"DBItest: Testing DBI Backends — DBItest-package","text":"two important functions make_context() test_all(). former tells package connect DBI backend, latter executes tests test suite. fine-grained test functions (prefix test_) available. See package's vignette details.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/DBItest-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"DBItest: Testing DBI Backends — DBItest-package","text":"Kirill Müller","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":null,"dir":"Reference","previous_headings":"","what":"Test contexts — make_context","title":"Test contexts — make_context","text":"Create test context, set query default context.","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test contexts — make_context","text":"","code":"make_context( drv, connect_args = NULL, set_as_default = TRUE, tweaks = NULL, name = NULL, default_skip = NULL ) set_default_context(ctx) get_default_context()"},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test contexts — make_context","text":"drv [DBIConnector] object class DBI::DBIConnector describes connect database. connect_args [named list] Deprecated. set_as_default [logical(1)] created context set default context? tweaks [DBItest_tweaks] Tweaks constructed tweaks() function. name [character] optional name context used test messages. default_skip [character] Default value skip argument test_all() testing functions. ctx [DBItest_context] test context.","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test contexts — make_context","text":"[DBItest_context] test context, set_default_context previous default context (invisibly) NULL.","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test contexts — make_context","text":"","code":"make_context( new( \"DBIConnector\", .drv = RSQLite::SQLite(), .conn_args = list(dbname = tempfile(\"DBItest\", fileext = \".sqlite\")) ), tweaks = tweaks( constructor_relax_args = TRUE, placeholder_pattern = c(\"?\", \"$1\", \"$name\", \":name\"), date_cast = function(x) paste0(\"'\", x, \"'\"), time_cast = function(x) paste0(\"'\", x, \"'\"), timestamp_cast = function(x) paste0(\"'\", x, \"'\"), logical_return = function(x) as.integer(x), date_typed = FALSE, time_typed = FALSE, timestamp_typed = FALSE ), default_skip = c(\"roundtrip_date\", \"roundtrip_timestamp\") ) #> $cnr #> #> Arguments: #> $dbname #> [1] \"/tmp/RtmpaZXKrm/DBItest2bb63971ce6b.sqlite\" #> #> #> $drv #> #> #> $tweaks #> DBItest tweaks: #> constructor_relax_args: TRUE #> strict_identifier: FALSE #> omit_blob_tests: FALSE #> current_needs_parens: FALSE #> union: function (x) #> placeholder_pattern: ? #> logical_return: function (x) #> date_cast: function (x) #> time_cast: function (x) #> timestamp_cast: function (x) #> blob_cast: function (x) #> date_typed: FALSE #> time_typed: FALSE #> timestamp_typed: FALSE #> temporary_tables: TRUE #> list_temporary_tables: TRUE #> allow_na_rows_affected: FALSE #> is_null_check: function (x) #> create_table_as: function (table_name, query) #> dbitest_version: 1.7.1 #> #> $name #> NULL #> #> $default_skip #> [1] \"roundtrip_date\" \"roundtrip_timestamp\" #> #> attr(,\"class\") #> [1] \"DBItest_context\""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a function that creates n placeholders — make_placeholder_fun","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"internal use placeholder_format tweak.","code":""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"","code":"make_placeholder_fun(pattern)"},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"pattern [character(1)] character, optionally followed 1 name. Examples: \"?\", \"$1\", \":name\"","code":""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"[function(n)] function one argument n returns vector length n placeholders specified format.","code":""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"","code":"body(DBItest:::make_placeholder_fun(\"?\")) #> rep(\"?\", n) DBItest:::make_placeholder_fun(\"?\")(2) #> [1] \"?\" \"?\" DBItest:::make_placeholder_fun(\"$1\")(3) #> [1] \"$1\" \"$2\" \"$3\" DBItest:::make_placeholder_fun(\":name\")(5) #> a b c d e #> \":a\" \":b\" \":c\" \":d\" \":e\""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"spec_arrow_append_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"dbAppendTableArrow() returns scalar numeric.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"table exist, new data values data frame different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings (non-empty strings) factor (possibly returned character) objects type blob::blob (supported database) date (supported database; returned Date) also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported. name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbAppendTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done support databases allow non-syntactic names objects: value argument must data frame subset columns existing table. order columns matter.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"spec_arrow_create_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"dbCreateTableArrow() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"table exists, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values temporary argument (non-scalars, unsupported data types, NA, incompatible values, duplicate names) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"following arguments part dbCreateTableArrow() generic (improve compatibility across backends) part DBI specification: temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbCreateTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument can : data frame, nanoarrow array nanoarrow array stream (still contain data call) nanoarrow schema temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces can also used table names column names, database supports non-syntactic identifiers.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"spec_arrow_fetch_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"dbFetchArrow() always returns object coercible data.frame many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"attempt fetch closed result set raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"Fetching multi-row queries one columns default returns entire result. object returned dbFetchArrow() can also passed nanoarrow::as_nanoarrow_array_stream() create nanoarrow array stream object can used read result set batches. chunk size implementation-specific.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"spec_arrow_fetch_arrow_chunk","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"dbFetchArrowChunk() always returns object coercible data.frame many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"attempt fetch closed result set raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"Fetching multi-row queries one columns returns next chunk. size chunk implementation-specific. object returned dbFetchArrowChunk() can also passed nanoarrow::as_nanoarrow_array() create nanoarrow array object. chunk size implementation-specific.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"spec_arrow_get_query_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"dbGetQueryArrow() always returns object coercible data.frame, many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"error raised issuing query closed invalid connection, syntax query invalid, query non-NA string. object returned dbGetQueryArrow() can also passed nanoarrow::as_nanoarrow_array_stream() create nanoarrow array stream object can used read result set batches. chunk size implementation-specific.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"following arguments part dbGetQueryArrow() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" \"Value\" sections details usage. param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"spec_arrow_read_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"dbReadTableArrow() returns Arrow object contains complete data remote table, effectively result calling DBI::dbGetQueryArrow() SELECT * . empty table returned Arrow object zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"error raised table exist. error raised calling method closed invalid connection. error raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbReadTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_send_query — spec_arrow_send_query_arrow","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"spec_result_send_query","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"dbSendQueryArrow() returns S4 object inherits DBI::DBIResultArrow. result set can used DBI::dbFetchArrow() extract records. finished using result, make sure clear DBI::dbClearResult().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"error raised issuing query closed invalid connection, query non-NA string. error also raised syntax query invalid query parameters given (passing params argument) immediate argument set TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"following arguments part dbSendQueryArrow() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"warnings occur normal conditions. done, DBIResult object must cleared call DBI::dbClearResult(). Failure clear result set leads warning connection closed. backend supports one open result set per connection, issuing second query invalidates already open result set raises warning. newly opened result set valid must cleared dbClearResult(). param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"spec_arrow_write_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"dbWriteTableArrow() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"table exists, append overwrite arguments unset, append = TRUE data frame new data different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values additional arguments overwrite, append, temporary (non-scalars, unsupported data types, NA, incompatible values, incompatible columns) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"following arguments part dbWriteTableArrow() generic (improve compatibility across backends) part DBI specification: overwrite (default: FALSE) append (default: FALSE) temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbWriteTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument must data frame subset columns existing table append = TRUE. order columns matter append = TRUE. overwrite argument TRUE, existing table name overwritten. argument change behavior table exist yet. append argument TRUE, rows existing table preserved, new data appended. table exist yet, created. temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings non-empty string factor (possibly returned character) objects type blob::blob (supported database) date (supported database; returned Date), also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_compliance_methods.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_compliance_methods — spec_compliance_methods","title":"spec_compliance_methods — spec_compliance_methods","text":"spec_compliance_methods","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_compliance_methods.html","id":"dbi-classes-and-methods","dir":"Reference","previous_headings":"","what":"DBI classes and methods","title":"spec_compliance_methods — spec_compliance_methods","text":"backend defines three classes, subclasses DBI::DBIDriver, DBI::DBIConnection, DBI::DBIResult. backend provides implementation methods base classes defined implemented DBI. methods defined DBI reexported (package can used without attach DBI), ellipsis ... formals extensibility.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_connection_disconnect.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_connection_disconnect — spec_connection_disconnect","title":"spec_connection_disconnect — spec_connection_disconnect","text":"spec_connection_disconnect","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_connection_disconnect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_connection_disconnect — spec_connection_disconnect","text":"dbDisconnect() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_connection_disconnect.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_connection_disconnect — spec_connection_disconnect","text":"warning issued garbage collection connection released without calling dbDisconnect(), tested automatically. least one warning issued immediately calling dbDisconnect() already disconnected invalid connection.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_connect.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_connect — spec_driver_connect","title":"spec_driver_connect — spec_driver_connect","text":"spec_driver_connect","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_connect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_driver_connect — spec_driver_connect","text":"dbConnect() returns S4 object inherits DBI::DBIConnection. object used communicate database engine. format() method defined connection object. returns string consists single line text.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_connect.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_driver_connect — spec_driver_connect","text":"DBI recommends using following argument names authentication parameters, NULL default: user user name (default: current user) password password host host name (default: local connection) port port number (default: local connection) dbname name database host, database file name defaults provide reasonable behavior, particular local connection host = NULL. DBMS (e.g., PostgreSQL), different TCP/IP connection localhost. addition, DBI supports bigint argument governs 64-bit integer data returned. following values supported: \"integer\": always return integer, silently overflow \"numeric\": always return numeric, silently round \"character\": always return decimal representation character \"integer64\": return data type can coerced using .integer() (warning overflow), .numeric() .character()","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_constructor.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_constructor — spec_driver_constructor","title":"spec_driver_constructor — spec_driver_constructor","text":"spec_driver_constructor","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_constructor.html","id":"construction-of-the-dbidriver-object","dir":"Reference","previous_headings":"","what":"Construction of the DBIDriver object","title":"spec_driver_constructor — spec_driver_constructor","text":"backend must support creation instance DBI::DBIDriver subclass constructor function. default, name package name without leading ‘R’ (exists), e.g., SQLite RSQLite package. However, backend authors may choose different name. constructor must exported, must function callable without arguments. DBI recommends define constructor empty argument list.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_data_type — spec_driver_data_type","title":"spec_driver_data_type — spec_driver_data_type","text":"spec_driver_data_type","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_driver_data_type — spec_driver_data_type","text":"dbDataType() returns SQL type corresponds obj argument non-empty character string. data frames, character vector one element per column returned.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_driver_data_type — spec_driver_data_type","text":"error raised invalid values obj argument NULL value.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_driver_data_type — spec_driver_data_type","text":"backend can override DBI::dbDataType() generic driver class. generic expects arbitrary object second argument. query values returned default implementation, run example(dbDataType, package = \"DBI\"). backend needs override generic, must accept basic R data types second argument, namely logical, integer, numeric, character, dates (see Dates), date-time (see DateTimeClasses), difftime. database supports blobs, method also must accept lists raw vectors, blob::blob objects. -objects (.e., wrapped ()) must supported return results unwrapped counterparts. SQL data type factor ordered character. behavior object types specified.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_get_info.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_get_info — spec_get_info","title":"spec_driver_get_info — spec_get_info","text":"spec_driver_get_info spec_connection_get_info spec_meta_get_info_result","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_get_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_driver_get_info — spec_get_info","text":"objects class DBI::DBIDriver, dbGetInfo() returns named list contains least following components: driver.version: package version DBI backend, client.version: version DBMS client library. objects class DBI::DBIConnection, dbGetInfo() returns named list contains least following components: db.version: version database server, dbname: database name, username: username connect database, host: hostname database server, port: port database server. must contain password component. Components applicable set NA. objects class DBI::DBIResult, dbGetInfo() returns named list contains least following components: statatment: statement used DBI::dbSendQuery() DBI::dbExecute(), returned DBI::dbGetStatement(), row.count: number rows fetched far (queries), returned DBI::dbGetRowCount(), rows.affected: number rows affected (statements), returned DBI::dbGetRowsAffected() .completed: logical indicates query statement completed, returned DBI::dbHasCompleted().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_getting_started.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_getting_started — spec_getting_started","title":"spec_getting_started — spec_getting_started","text":"spec_getting_started","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_getting_started.html","id":"definition","dir":"Reference","previous_headings":"","what":"Definition","title":"spec_getting_started — spec_getting_started","text":"DBI backend R package imports DBI methods packages. better worse, names many existing backends start ‘R’, e.g., RSQLite, RMySQL, RSQLServer; backend author adopt convention .","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_bind — spec_meta_bind","title":"spec_meta_bind — spec_meta_bind","text":"spec_meta_bind spec_meta_bind spec_meta_bind","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_bind — spec_meta_bind","text":"dbBind() returns result set, invisibly, queries issued DBI::dbSendQuery() DBI::dbSendQueryArrow() also data manipulation statements issued DBI::dbSendStatement().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_meta_bind — spec_meta_bind","text":"DBI clients execute parametrized statements follows: Call DBI::dbSendQuery(), DBI::dbSendQueryArrow() DBI::dbSendStatement() query statement contains placeholders, store returned DBI::DBIResult object variable. Mixing placeholders (particular, named unnamed ones) recommended. good practice register call DBI::dbClearResult() via .exit() right calling dbSendQuery() dbSendStatement() (see last enumeration item). DBI::dbBind() DBI::dbBindArrow() called, returned result set object following behavior: DBI::dbFetch() raises error (dbSendQuery() dbSendQueryArrow()) DBI::dbGetRowCount() returns zero (dbSendQuery() dbSendQueryArrow()) DBI::dbGetRowsAffected() returns integer NA (dbSendStatement()) DBI::dbIsValid() returns TRUE DBI::dbHasCompleted() returns FALSE Call DBI::dbBind() DBI::dbBindArrow(): DBI::dbBind(), params argument must list elements lengths contain values supported backend. data.frame internally stored list. DBI::dbBindArrow(), params argument must nanoarrow array stream, one column per query parameter. Retrieve data number affected rows DBIResult object. queries issued dbSendQuery() dbSendQueryArrow(), call DBI::dbFetch(). statements issued dbSendStatements(), call DBI::dbGetRowsAffected(). (Execution begins immediately DBI::dbBind() call, statement processed entirely function returns.) Repeat 2. 3. necessary. Close result set via DBI::dbClearResult(). elements params argument need scalars, vectors arbitrary length (including length 0) supported. queries, calling dbFetch() binding parameters returns concatenated results, equivalent binding fetching set values connecting via rbind(). data manipulation statements, dbGetRowsAffected() returns total number rows affected binding non-scalar parameters. dbBind() also accepts repeated calls result set queries data manipulation statements, even results fetched calls dbBind(), queries data manipulation statements. placeholders query named, order params argument important. least following data types accepted input (including NA): integer numeric logical Boolean values character (also special characters spaces, newlines, quotes, backslashes) factor (bound character, warning) lubridate::Date (also stored internally integer) lubridate::POSIXct timestamps POSIXlt timestamps difftime values (also units seconds value stored integer) lists raw blobs (NULL entries SQL NULL values) objects type blob::blob","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_bind — spec_meta_bind","text":"Calling dbBind() query without parameters raises error. Binding many enough values, parameters wrong names unequal length, also raises error. placeholders query named, parameter values must names (must empty NA), vice versa, otherwise error raised. behavior mixing placeholders different types (particular mixing positional named placeholders) specified. Calling dbBind() result set already cleared DBI::dbClearResult() also raises error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_column_info — spec_meta_column_info","title":"spec_meta_column_info — spec_meta_column_info","text":"spec_meta_column_info","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_column_info — spec_meta_column_info","text":"dbColumnInfo() returns data frame least two columns \"name\" \"type\" (order) (optional columns start dot). \"name\" \"type\" columns contain names types R columns data frame returned DBI::dbFetch(). \"type\" column type character information. compute \"type\" column, instead use dbFetch(res, n = 0) create zero-row data frame initialized correct data types.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_column_info — spec_meta_column_info","text":"attempt query columns closed result set raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_meta_column_info — spec_meta_column_info","text":"column named row_names treated like column. column names always consistent data returned dbFetch(). query returns unnamed columns, non-empty non-NA names assigned. Column names correspond SQL R keywords left unchanged.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_row_count.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_get_row_count — spec_meta_get_row_count","title":"spec_meta_get_row_count — spec_meta_get_row_count","text":"spec_meta_get_row_count","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_row_count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_get_row_count — spec_meta_get_row_count","text":"dbGetRowCount() returns scalar number (integer numeric), number rows fetched far. calling DBI::dbSendQuery(), row count initially zero. call DBI::dbFetch() without limit, row count matches total number rows returned. Fetching limited number rows increases number rows number rows returned, even fetching past end result set. queries empty result set, zero returned even fetching. data manipulation statements issued DBI::dbSendStatement(), zero returned calling dbFetch().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_row_count.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_get_row_count — spec_meta_get_row_count","text":"Attempting get row count result set cleared DBI::dbClearResult() gives error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_rows_affected.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","title":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","text":"spec_meta_get_rows_affected","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_rows_affected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","text":"dbGetRowsAffected() returns scalar number (integer numeric), number rows affected data manipulation statement issued DBI::dbSendStatement(). value available directly call change calling DBI::dbFetch(). NA_integer_ NA_numeric_ allowed number rows affected known. queries issued DBI::dbSendQuery(), zero returned call dbFetch(). NA values allowed.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_rows_affected.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","text":"Attempting get rows affected result set cleared DBI::dbClearResult() gives error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_statement.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_get_statement — spec_meta_get_statement","title":"spec_meta_get_statement — spec_meta_get_statement","text":"spec_meta_get_statement","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_statement.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_get_statement — spec_meta_get_statement","text":"dbGetStatement() returns string, query used either DBI::dbSendQuery() DBI::dbSendStatement().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_statement.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_get_statement — spec_meta_get_statement","text":"Attempting query statement result set cleared DBI::dbClearResult() gives error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_has_completed — spec_meta_has_completed","title":"spec_meta_has_completed — spec_meta_has_completed","text":"spec_meta_has_completed","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_has_completed — spec_meta_has_completed","text":"dbHasCompleted() returns logical scalar. query initiated DBI::dbSendQuery() non-empty result set, dbHasCompleted() returns FALSE initially TRUE calling DBI::dbFetch() without limit. query initiated DBI::dbSendStatement(), dbHasCompleted() always returns TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_has_completed — spec_meta_has_completed","text":"Attempting query completion status result set cleared DBI::dbClearResult() gives error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_meta_has_completed — spec_meta_has_completed","text":"completion status query guaranteed set FALSE attempting fetch past end entire result. Therefore, query empty result set, initial return value unspecified, result value TRUE trying fetch one row. Similarly, query result set length n, return value unspecified fetching n rows, result value TRUE trying fetch one row.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_is_valid.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_is_valid — spec_meta_is_valid","title":"spec_meta_is_valid — spec_meta_is_valid","text":"spec_meta_is_valid","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_is_valid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_is_valid — spec_meta_is_valid","text":"dbIsValid() returns logical scalar, TRUE object specified dbObj valid, FALSE otherwise. DBI::DBIConnection object initially valid, becomes invalid disconnecting DBI::dbDisconnect(). invalid connection object (e.g., drivers object saved file restored), method also returns FALSE. DBI::DBIResult object valid call DBI::dbSendQuery(), stays valid even rows fetched; clearing DBI::dbClearResult() invalidates . DBI::DBIResult object also valid call DBI::dbSendStatement(), stays valid querying number rows affected; clearing DBI::dbClearResult() invalidates . connection database system dropped (e.g., due connectivity problems, server failure, etc.), dbIsValid() return FALSE. tested automatically.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_clear_result — spec_result_clear_result","title":"spec_result_clear_result — spec_result_clear_result","text":"spec_result_clear_result","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_clear_result — spec_result_clear_result","text":"dbClearResult() returns TRUE, invisibly, result sets obtained dbSendQuery(), dbSendStatement(), dbSendQueryArrow(),","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_clear_result — spec_result_clear_result","text":"attempt close already closed result set issues warning dbSendQuery(), dbSendStatement(), dbSendQueryArrow(),","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_clear_result — spec_result_clear_result","text":"dbClearResult() frees resources associated retrieving result query update operation. DBI backend can expect call dbClearResult() DBI::dbSendQuery() DBI::dbSendStatement() call.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_create_table_with_data_type.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_create_table_with_data_type — spec_result_create_table_with_data_type","title":"spec_result_create_table_with_data_type — spec_result_create_table_with_data_type","text":"spec_result_create_table_with_data_type","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_create_table_with_data_type.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_create_table_with_data_type — spec_result_create_table_with_data_type","text":"data types returned dbDataType() usable SQL statement form \"CREATE TABLE test (...)\".","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_execute — spec_result_execute","title":"spec_result_execute — spec_result_execute","text":"spec_result_execute","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_execute — spec_result_execute","text":"dbExecute() always returns scalar numeric specifies number rows affected statement.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_execute — spec_result_execute","text":"error raised issuing statement closed invalid connection, syntax statement invalid, statement non-NA string.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_execute — spec_result_execute","text":"following arguments part dbExecute() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_execute — spec_result_execute","text":"param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_execute — spec_result_execute","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_fetch — spec_result_fetch","title":"spec_result_fetch — spec_result_fetch","text":"spec_result_fetch","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_fetch — spec_result_fetch","text":"dbFetch() always returns data.frame many rows records fetched many columns fields result set, even result single value one zero rows. Passing n = NA supported returns arbitrary number rows (least one) specified driver, remaining rows result set.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_fetch — spec_result_fetch","text":"attempt fetch closed result set raises error. n argument atomic whole number greater equal -1 Inf, error raised, subsequent call dbFetch() proper n argument succeeds. Calling dbFetch() result set data manipulation query created DBI::dbSendStatement() can fetched return empty data frame, warning.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_fetch — spec_result_fetch","text":"Fetching multi-row queries one columns default returns entire result. Multi-row queries can also fetched progressively passing whole number (integer numeric) n argument. value Inf n argument supported also returns full result. rows available fetched, result returned full without warning. fewer rows requested returned, fetches return data frame zero rows. zero rows fetched, columns data frame still fully typed. Fetching fewer rows available permitted, warning issued clearing result set. column named row_names treated like column.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_get_query — spec_result_get_query","title":"spec_result_get_query — spec_result_get_query","text":"spec_result_get_query","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_get_query — spec_result_get_query","text":"dbGetQuery() always returns data.frame, many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_get_query — spec_result_get_query","text":"error raised issuing query closed invalid connection, syntax query invalid, query non-NA string. n argument atomic whole number greater equal -1 Inf, error raised, subsequent call dbGetQuery() proper n argument succeeds.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_get_query — spec_result_get_query","text":"following arguments part dbGetQuery() generic (improve compatibility across backends) part DBI specification: n (default: -1) params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_get_query — spec_result_get_query","text":"column named row_names treated like column. n argument specifies number rows fetched. omitted, fetching multi-row queries one columns returns entire result. value Inf n argument supported also returns full result. rows available fetched (passing large value n), result returned full without warning. zero rows requested, columns data frame still fully typed. Fetching fewer rows available permitted, warning issued. param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_get_query — spec_result_get_query","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_roundtrip.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_roundtrip — spec_result_roundtrip","title":"spec_result_roundtrip — spec_result_roundtrip","text":"spec_result_roundtrip","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_roundtrip.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_roundtrip — spec_result_roundtrip","text":"column types returned data frame depend data returned: integer (coercible integer) integer values -2^31 2^31 - 1, NA SQL NULL values numeric numbers fractional component, NA SQL NULL values logical Boolean values (backends may return integer); NA SQL NULL values character text, NA SQL NULL values lists raw blobs NULL entries SQL NULL values coercible using .Date() dates, NA SQL NULL values (also applies return value SQL function current_date) coercible using hms::as_hms() times, NA SQL NULL values (also applies return value SQL function current_time) coercible using .POSIXct() timestamps, NA SQL NULL values (also applies return value SQL function current_timestamp) dates timestamps supported backend, following R types used: lubridate::Date dates (also applies return value SQL function current_date) lubridate::POSIXct timestamps (also applies return value SQL function current_timestamp) R built-type lossless support full range 64-bit larger integers. 64-bit integers returned query, following rules apply: Values returned container support full range valid 64-bit values (integer64 class bit64 package) Coercion numeric always returns number close possible true value Loss precision converting numeric gives warning Conversion character always returns lossless decimal representation data","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_send_query — spec_result_send_query","title":"spec_result_send_query — spec_result_send_query","text":"spec_result_send_query","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_send_query — spec_result_send_query","text":"dbSendQuery() returns S4 object inherits DBI::DBIResult. result set can used DBI::dbFetch() extract records. finished using result, make sure clear DBI::dbClearResult().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_send_query — spec_result_send_query","text":"error raised issuing query closed invalid connection, query non-NA string. error also raised syntax query invalid query parameters given (passing params argument) immediate argument set TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_send_query — spec_result_send_query","text":"following arguments part dbSendQuery() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_send_query — spec_result_send_query","text":"warnings occur normal conditions. done, DBIResult object must cleared call DBI::dbClearResult(). Failure clear result set leads warning connection closed. backend supports one open result set per connection, issuing second query invalidates already open result set raises warning. newly opened result set valid must cleared dbClearResult(). param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_send_query — spec_result_send_query","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_send_statement — spec_result_send_statement","title":"spec_result_send_statement — spec_result_send_statement","text":"spec_result_send_statement","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_send_statement — spec_result_send_statement","text":"dbSendStatement() returns S4 object inherits DBI::DBIResult. result set can used DBI::dbGetRowsAffected() determine number rows affected query. finished using result, make sure clear DBI::dbClearResult().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_send_statement — spec_result_send_statement","text":"error raised issuing statement closed invalid connection, statement non-NA string. error also raised syntax query invalid query parameters given (passing params argument) immediate argument set TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_send_statement — spec_result_send_statement","text":"warnings occur normal conditions. done, DBIResult object must cleared call DBI::dbClearResult(). Failure clear result set leads warning connection closed. backend supports one open result set per connection, issuing second query invalidates already open result set raises warning. newly opened result set valid must cleared dbClearResult(). param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_send_statement — spec_result_send_statement","text":"following arguments part dbSendStatement() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_send_statement — spec_result_send_statement","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_append_table — spec_sql_append_table","title":"spec_sql_append_table — spec_sql_append_table","text":"spec_sql_append_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_append_table — spec_sql_append_table","text":"dbAppendTable() returns scalar numeric.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_append_table — spec_sql_append_table","text":"table exist, new data values data frame different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values row.names argument (non-scalars, unsupported data types, NA) also raise error. Passing value argument different NULL row.names argument (particular TRUE, NA, string) raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_append_table — spec_sql_append_table","text":"SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings (non-empty strings) factor (returned character, warning) list raw (supported database) objects type blob::blob (supported database) date (supported database; returned Date) also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported. name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbAppendTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done support databases allow non-syntactic names objects: row.names argument must NULL, default value. Row names ignored. value argument must data frame subset columns existing table. order columns matter.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_create_table — spec_sql_create_table","title":"spec_sql_create_table — spec_sql_create_table","text":"spec_sql_create_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_create_table — spec_sql_create_table","text":"dbCreateTable() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_create_table — spec_sql_create_table","text":"table exists, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values row.names temporary arguments (non-scalars, unsupported data types, NA, incompatible values, duplicate names) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_create_table — spec_sql_create_table","text":"following arguments part dbCreateTable() generic (improve compatibility across backends) part DBI specification: temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_create_table — spec_sql_create_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbCreateTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument can : data frame, named list SQL types temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces can also used table names column names, database supports non-syntactic identifiers. row.names argument must missing NULL, default value. values row.names argument (particular TRUE, NA, string) raise error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_exists_table — spec_sql_exists_table","title":"spec_sql_exists_table — spec_sql_exists_table","text":"spec_sql_exists_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_exists_table — spec_sql_exists_table","text":"dbExistsTable() returns logical scalar, TRUE table view specified name argument exists, FALSE otherwise. includes temporary tables supported database.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_exists_table — spec_sql_exists_table","text":"error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_exists_table — spec_sql_exists_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbExistsTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done tables listed DBI::dbListTables(), dbExistsTable() returns TRUE.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_list_fields — spec_sql_list_fields","title":"spec_sql_list_fields — spec_sql_list_fields","text":"spec_sql_list_fields","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_list_fields — spec_sql_list_fields","text":"dbListFields() returns character vector enumerates fields table correct order. also works temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_list_fields — spec_sql_list_fields","text":"table exist, error raised. Invalid types name argument (e.g., character length equal one, numeric) lead error. error also raised calling method closed invalid connection.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_list_fields — spec_sql_list_fields","text":"name argument can string return value DBI::dbQuoteIdentifier() value table column return value DBI::dbListObjects() is_prefix FALSE column named row_names treated like column.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_list_objects — spec_sql_list_objects","title":"spec_sql_list_objects — spec_sql_list_objects","text":"spec_sql_list_objects","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_list_objects — spec_sql_list_objects","text":"dbListObjects() returns data frame columns table is_prefix (order), optionally columns dot (.) prefix. table column type list. object list suitable use argument DBI::dbQuoteIdentifier(). is_prefix column logical. data frame contains one row object (schema, table view) accessible prefix (passed) global namespace (prefix omitted). Tables added DBI::dbWriteTable() part data frame. soon table removed database, also removed data frame database objects. applies temporary objects supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_list_objects — spec_sql_list_objects","text":"error raised calling method closed invalid connection.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_list_objects — spec_sql_list_objects","text":"prefix column indicates table value refers table prefix. call default prefix = NULL, table values is_prefix == FALSE correspond tables returned DBI::dbListTables(), table object can quoted DBI::dbQuoteIdentifier(). result quoting can passed DBI::dbUnquoteIdentifier(). (backends may convenient use DBI::Id class, required.) Values table column is_prefix == TRUE can passed prefix argument another call dbListObjects(). data frame returned dbListObject() call prefix argument set, table values is_prefix FALSE can used call DBI::dbExistsTable() returns TRUE.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_tables.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_list_tables — spec_sql_list_tables","title":"spec_sql_list_tables — spec_sql_list_tables","text":"spec_sql_list_tables","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_list_tables — spec_sql_list_tables","text":"dbListTables() returns character vector enumerates tables views database. Tables added DBI::dbWriteTable() part list. soon table removed database, also removed list database tables. applies temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_tables.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_list_tables — spec_sql_list_tables","text":"error raised calling method closed invalid connection.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_quote_identifier — spec_sql_quote_identifier","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"spec_sql_quote_identifier","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"dbQuoteIdentifier() returns object can coerced character, length input. empty character vector function returns length-0 object. names input argument preserved output. passing returned object dbQuoteIdentifier() x argument, returned unchanged. Passing objects class DBI::SQL also return unchanged. (backends may convenient return DBI::SQL objects achieve behavior, required.)","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"error raised input contains NA, empty string.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"Calling DBI::dbGetQuery() query format SELECT 1 ... returns data frame identifier, unquoted, column name. Quoted identifiers can used table column names SQL queries, particular queries like SELECT 1 ... SELECT * (SELECT 1) .... method must use quoting mechanism unambiguously different quoting mechanism used strings, query like SELECT ... (SELECT 1 ...) throws error column names match. method can quote column names contain special characters space, dot, comma, quotes used mark strings identifiers, database supports . case, checking validity identifier performed executing query, dbQuoteIdentifier().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_quote_literal — spec_sql_quote_literal","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"spec_sql_quote_literal","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"dbQuoteLiteral() returns object can coerced character, length input. empty integer, numeric, character, logical, date, time, blob vector, function returns length-0 object. passing returned object dbQuoteLiteral() x argument, returned unchanged. Passing objects class DBI::SQL also return unchanged. (backends may convenient return DBI::SQL objects achieve behavior, required.)","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"returned expression can used SELECT ... query, value dbGetQuery(paste0(\"SELECT \", dbQuoteLiteral(x)))[[1]] must equal x scalar integer, numeric, string, logical. x NA, result must merely satisfy .na(). literals \"NA\" \"NULL\" treated specially. NA translated unquoted SQL NULL, query SELECT * (SELECT 1) ... NULL returns one row.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"Passing list x argument raises error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_quote_string — spec_sql_quote_string","title":"spec_sql_quote_string — spec_sql_quote_string","text":"spec_sql_quote_string","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_quote_string — spec_sql_quote_string","text":"dbQuoteString() returns object can coerced character, length input. empty character vector function returns length-0 object. passing returned object dbQuoteString() x argument, returned unchanged. Passing objects class DBI::SQL also return unchanged. (backends may convenient return DBI::SQL objects achieve behavior, required.)","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_quote_string — spec_sql_quote_string","text":"returned expression can used SELECT ... query, scalar character x value dbGetQuery(paste0(\"SELECT \", dbQuoteString(x)))[[1]] must identical x, even x contains spaces, tabs, quotes (single double), backticks, newlines (combination) result dbQuoteString() call coerced back character (even repeatedly). x NA, result must merely satisfy .na(). strings \"NA\" \"NULL\" treated specially. NA translated unquoted SQL NULL, query SELECT * (SELECT 1) ... NULL returns one row.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_quote_string — spec_sql_quote_string","text":"Passing numeric, integer, logical, raw vector, list x argument raises error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_read_table — spec_sql_read_table","title":"spec_sql_read_table — spec_sql_read_table","text":"spec_sql_read_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_read_table — spec_sql_read_table","text":"dbReadTable() returns data frame contains complete data remote table, effectively result calling DBI::dbGetQuery() SELECT * . empty table returned data frame zero rows. presence rownames depends row.names argument, see DBI::sqlColumnToRownames() details: FALSE NULL, returned data frame row names. TRUE, column named \"row_names\" converted row names. NA, column named \"row_names\" converted row names exists, otherwise translation occurs. string, specifies name column remote table contains row names. default row.names = FALSE. database supports identifiers special characters, columns returned data frame converted valid R identifiers check.names argument TRUE, check.names = FALSE, returned table non-syntactic column names without quotes.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_read_table — spec_sql_read_table","text":"error raised table exist. error raised row.names TRUE \"row_names\" column exists, error raised row.names set string corresponding column exists. error raised calling method closed invalid connection. error raised name processed DBI::dbQuoteIdentifier() results non-scalar. Unsupported values row.names check.names (non-scalars, unsupported data types, NA check.names) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_read_table — spec_sql_read_table","text":"following arguments part dbReadTable() generic (improve compatibility across backends) part DBI specification: row.names (default: FALSE) check.names must provided named arguments. See \"Value\" section details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_read_table — spec_sql_read_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbReadTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_remove_table — spec_sql_remove_table","title":"spec_sql_remove_table — spec_sql_remove_table","text":"spec_sql_remove_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_remove_table — spec_sql_remove_table","text":"dbRemoveTable() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_remove_table — spec_sql_remove_table","text":"table exist, error raised. attempt remove view function may result error. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_remove_table — spec_sql_remove_table","text":"following arguments part dbRemoveTable() generic (improve compatibility across backends) part DBI specification: temporary (default: FALSE) fail_if_missing (default: TRUE) arguments must provided named arguments. temporary TRUE, call dbRemoveTable() consider temporary tables. backends support argument. particular, permanent tables name left untouched. fail_if_missing FALSE, call dbRemoveTable() succeeds table exist.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_remove_table — spec_sql_remove_table","text":"table removed dbRemoveTable() appear list tables returned DBI::dbListTables(), DBI::dbExistsTable() returns FALSE. removal propagates immediately connections database. function can also used remove temporary table. name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbRemoveTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"spec_sql_unquote_identifier","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"dbUnquoteIdentifier() returns list objects length input. empty vector, function returns length-0 object. names input argument preserved output. x value returned dbUnquoteIdentifier(), calling dbUnquoteIdentifier(..., dbQuoteIdentifier(..., x)) returns list(x). x object class DBI::Id, calling dbUnquoteIdentifier(..., x) returns list(x). (backends may convenient return DBI::Id objects achieve behavior, required.) Plain character vectors can also passed dbUnquoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"error raised character vectors missing value passed x argument.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"character vector length one, quoting (DBI::dbQuoteIdentifier()) unquoting quoting first element identical just quoting. also true strings contain special characters space, dot, comma, quotes used mark strings identifiers, database supports . Unquoting simple strings (consisting letters) wrapped DBI::SQL() quoting via DBI::dbQuoteIdentifier() gives result just quoting string. Similarly, unquoting expressions form SQL(\"schema.table\") quoting gives result quoting identifier constructed Id(\"schema\", \"table\").","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_write_table — spec_sql_write_table","title":"spec_sql_write_table — spec_sql_write_table","text":"spec_sql_write_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_write_table — spec_sql_write_table","text":"dbWriteTable() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_write_table — spec_sql_write_table","text":"table exists, append overwrite arguments unset, append = TRUE data frame new data different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values additional arguments row.names, overwrite, append, field.types, temporary (non-scalars, unsupported data types, NA, incompatible values, duplicate missing names, incompatible columns) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_write_table — spec_sql_write_table","text":"following arguments part dbWriteTable() generic (improve compatibility across backends) part DBI specification: row.names (default: FALSE) overwrite (default: FALSE) append (default: FALSE) field.types (default: NULL) temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_write_table — spec_sql_write_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbWriteTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument must data frame subset columns existing table append = TRUE. order columns matter append = TRUE. overwrite argument TRUE, existing table name overwritten. argument change behavior table exist yet. append argument TRUE, rows existing table preserved, new data appended. table exist yet, created. temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings non-empty string factor (returned character) list raw (supported database) objects type blob::blob (supported database) date (supported database; returned Date), also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported. field.types argument must named character vector one entry column. indicates SQL data type used new column. column missed field.types, type inferred input data DBI::dbDataType(). interpretation rownames depends row.names argument, see DBI::sqlRownamesToColumn() details: FALSE NULL, row names ignored. TRUE, row names converted column named \"row_names\", even input data frame natural row names 1 nrow(...). NA, column named \"row_names\" created data custom row names, extra column created case natural row names. string, specifies name column remote table contains row names, even input data frame natural row names. default row.names = FALSE.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"spec_transaction_begin_commit_rollback","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"dbBegin(), dbCommit() dbRollback() return TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"implementations expected raise error case failure, tested. way, generics throw error closed invalid connection. addition, call dbCommit() dbRollback() without prior call dbBegin() raises error. Nested transactions supported DBI, attempt call dbBegin() twice yields error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"Actual support transactions may vary backends. transaction initiated call dbBegin() committed call dbCommit(). Data written transaction must persist transaction committed. example, record missing transaction started created transaction must exist transaction, also new connection. transaction can also aborted dbRollback(). data written transaction must removed transaction rolled back. example, record missing transaction started created transaction must exist anymore rollback. Disconnection connection open transaction effectively rolls back transaction. data written transaction must removed transaction rolled back. behavior specified arguments passed functions. particular, RSQLite issues named transactions support nesting name argument set. transaction isolation level specified DBI.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_transaction_with_transaction — spec_transaction_with_transaction","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"spec_transaction_with_transaction","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"dbWithTransaction() returns value executed code.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"Failure initiate transaction (e.g., connection closed invalid DBI::dbBegin() called already) gives error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"dbWithTransaction() initiates transaction dbBegin(), executes code given code argument, commits transaction DBI::dbCommit(). code raises error, transaction instead aborted DBI::dbRollback(), error propagated. code calls dbBreak(), execution code stops transaction silently aborted. side effects caused code (creation new variables) propagate calling environment.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Run all tests — test_all","title":"Run all tests — test_all","text":"test_all() calls tests defined package (see section \"Tests\" ). function supports running one test setting environment variable, e.g., set DBITEST_ONLY_RESULT nonempty value run test_result(). test_some() allows testing one tests.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run all tests — test_all","text":"","code":"test_all(skip = NULL, run_only = NULL, ctx = get_default_context()) test_some(test, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run all tests — test_all","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context(). test [character] character vector regular expressions describing tests run. regular expressions matched entire test name.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run all tests — test_all","text":"Internally ^ $ used prefix suffix around regular expressions passed skip run_only arguments.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"tests","dir":"Reference","previous_headings":"","what":"Tests","title":"Run all tests — test_all","text":"function runs following tests, except stress tests: test_getting_started(): Getting started testing test_driver(): Test \"Driver\" class test_connection(): Test \"Connection\" class test_result(): Test \"Result\" class test_sql(): Test SQL methods test_meta(): Test metadata functions test_transaction(): Test transaction functions test_arrow(): Test Arrow methods test_compliance(): Test full compliance DBI test_stress(): Stress tests (tested test_all)","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Arrow methods — test_arrow","title":"Test Arrow methods — test_arrow","text":"Test Arrow methods","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_arrow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Arrow methods — test_arrow","text":"","code":"test_arrow(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_arrow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Arrow methods — test_arrow","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_compliance.html","id":null,"dir":"Reference","previous_headings":"","what":"Test full compliance to DBI — test_compliance","title":"Test full compliance to DBI — test_compliance","text":"Test full compliance DBI","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_compliance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test full compliance to DBI — test_compliance","text":"","code":"test_compliance(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_compliance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test full compliance to DBI — test_compliance","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_connection.html","id":null,"dir":"Reference","previous_headings":"","what":"Test the ","title":"Test the ","text":"Test \"Connection\" class","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_connection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test the ","text":"","code":"test_connection(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_connection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test the ","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":null,"dir":"Reference","previous_headings":"","what":"test_data_type — test_data_type","title":"test_data_type — test_data_type","text":"test_data_type","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"test_data_type — test_data_type","text":"","code":"test_data_type(ctx, dbObj)"},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"test_data_type — test_data_type","text":"ctx, dbObj Arguments internal test function","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"test_data_type — test_data_type","text":"dbDataType() returns SQL type corresponds obj argument non-empty character string. data frames, character vector one element per column returned.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"test_data_type — test_data_type","text":"error raised invalid values obj argument NULL value.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"test_data_type — test_data_type","text":"backend can override DBI::dbDataType() generic driver class. generic expects arbitrary object second argument. query values returned default implementation, run example(dbDataType, package = \"DBI\"). backend needs override generic, must accept basic R data types second argument, namely logical, integer, numeric, character, dates (see Dates), date-time (see DateTimeClasses), difftime. database supports blobs, method also must accept lists raw vectors, blob::blob objects. -objects (.e., wrapped ()) must supported return results unwrapped counterparts. SQL data type factor ordered character. behavior object types specified.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_driver.html","id":null,"dir":"Reference","previous_headings":"","what":"Test the ","title":"Test the ","text":"Test \"Driver\" class","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_driver.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test the ","text":"","code":"test_driver(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_driver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test the ","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_getting_started.html","id":null,"dir":"Reference","previous_headings":"","what":"Getting started with testing — test_getting_started","title":"Getting started with testing — test_getting_started","text":"Tests basic features DBI driver package, support testing test-first development right start.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_getting_started.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Getting started with testing — test_getting_started","text":"","code":"test_getting_started(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_getting_started.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Getting started with testing — test_getting_started","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"Test metadata functions — test_meta","title":"Test metadata functions — test_meta","text":"Test metadata functions","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test metadata functions — test_meta","text":"","code":"test_meta(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test metadata functions — test_meta","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_result.html","id":null,"dir":"Reference","previous_headings":"","what":"Test the ","title":"Test the ","text":"Test \"Result\" class","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_result.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test the ","text":"","code":"test_result(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_result.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test the ","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_sql.html","id":null,"dir":"Reference","previous_headings":"","what":"Test SQL methods — test_sql","title":"Test SQL methods — test_sql","text":"Test SQL methods","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_sql.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test SQL methods — test_sql","text":"","code":"test_sql(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_sql.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test SQL methods — test_sql","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_stress.html","id":null,"dir":"Reference","previous_headings":"","what":"Stress tests — test_stress","title":"Stress tests — test_stress","text":"Stress tests","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_stress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stress tests — test_stress","text":"","code":"test_stress(skip = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_stress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stress tests — test_stress","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_transaction.html","id":null,"dir":"Reference","previous_headings":"","what":"Test transaction functions — test_transaction","title":"Test transaction functions — test_transaction","text":"Test transaction functions","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_transaction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test transaction functions — test_transaction","text":"","code":"test_transaction(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_transaction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test transaction functions — test_transaction","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":null,"dir":"Reference","previous_headings":"","what":"Tweaks for DBI tests — tweaks","title":"Tweaks for DBI tests — tweaks","text":"tweaks way control behavior certain tests. Currently, need search DBItest source code understand tests affected tweaks. function usually called set tweaks argument make_context() call.","code":""},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tweaks for DBI tests — tweaks","text":"","code":"tweaks( ..., constructor_name = NULL, constructor_relax_args = FALSE, strict_identifier = FALSE, omit_blob_tests = FALSE, current_needs_parens = FALSE, union = function(x) paste(x, collapse = \" UNION \"), placeholder_pattern = NULL, logical_return = identity, date_cast = function(x) paste0(\"date('\", x, \"')\"), time_cast = function(x) paste0(\"time('\", x, \"')\"), timestamp_cast = function(x) paste0(\"timestamp('\", x, \"')\"), blob_cast = identity, date_typed = TRUE, time_typed = TRUE, timestamp_typed = TRUE, temporary_tables = TRUE, list_temporary_tables = TRUE, allow_na_rows_affected = FALSE, is_null_check = function(x) paste0(\"(\", x, \" IS NULL)\"), create_table_as = function(table_name, query) paste0(\"CREATE TABLE \", table_name, \" AS \", query), dbitest_version = \"1.7.1\" )"},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tweaks for DBI tests — tweaks","text":"... [] Unknown tweaks accepted, warning. ellipsis also makes sure can pass named arguments. constructor_name [character(1)] Name function constructs Driver object. constructor_relax_args [logical(1)] TRUE, allow driver constructor default values arguments; otherwise, require constructor empty argument list (default). strict_identifier [logical(1)] Set TRUE DBMS support arbitrarily-named identifiers even quoting used. omit_blob_tests [logical(1)] Set TRUE DBMS support BLOB data type. current_needs_parens [logical(1)] Set TRUE SQL functions current_date, current_time, current_timestamp require parentheses. union [function(character)] Function combines several subqueries one resulting query returns concatenated results subqueries placeholder_pattern [character] pattern placeholders used DBI::dbBind(), e.g., \"?\", \"$1\", \":name\". See make_placeholder_fun() details. logical_return [function(logical)] vectorized function converts logical values data type returned DBI backend. date_cast [function(character)] vectorized function creates SQL expression coercing string date value. time_cast [function(character)] vectorized function creates SQL expression coercing string time value. timestamp_cast [function(character)] vectorized function creates SQL expression coercing string timestamp value. blob_cast [function(character)] vectorized function creates SQL expression coercing string blob value. date_typed [logical(1L)] Set FALSE DBMS support dedicated type dates. time_typed [logical(1L)] Set FALSE DBMS support dedicated type times. timestamp_typed [logical(1L)] Set FALSE DBMS support dedicated type timestamps. temporary_tables [logical(1L)] Set FALSE DBMS support temporary tables. list_temporary_tables [logical(1L)] Set FALSE DBMS support listing temporary tables. allow_na_rows_affected [logical(1L)] Set TRUE allow DBI::dbGetRowsAffected() return NA. is_null_check [function(character)] vectorized function creates SQL expression checking value NULL. create_table_as [function(character(1), character(1))] function creates SQL expression creating table SQL expression. dbitest_version [character(1)] Compatible DBItest version, default: \"1.7.1\".","code":""},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tweaks for DBI tests — tweaks","text":"","code":"if (FALSE) { # \\dontrun{ make_context(..., tweaks = tweaks(strict_identifier = TRUE)) } # }"},{"path":"https://dbitest.r-dbi.org/security.html","id":null,"dir":"","previous_headings":"","what":"Process for reporting security vulnerabilities","title":"Process for reporting security vulnerabilities","text":"reporting security vulnerability, please e-mail package maintainer krlmlr+r@mailbox.org instructions. include confidential information e-mail.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-8-2","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.8.2 (2024-12-07)","text":"explicit message constructive errors. Bump DBI dependency.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-8-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.8.2 (2024-12-07)","text":"Set BS version explicitly now (@maelle, #370). Add package \\link{} targets.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"testing-1-8-2","dir":"Changelog","previous_headings":"","what":"Testing","title":"DBItest 1.8.2 (2024-12-07)","text":"Adapt tests updates constructive package.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-8-1","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.8.1 (2024-03-31)","text":"Allow multiple warnings disconnect tests (#363). Fix specification Arrow tests (#357). Show DBItest function backtrace (#349, #354). Specify value argument dbCreateTable() dbCreateTableArrow() (#345). Enable two tests dbGetQueryArrow() (#342). Relax dbListObjects() spec (#339, #341).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-8-1","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.8.1 (2024-03-31)","text":"Avoid dplyr (#364). Remove .dots argument test_select_with_null() (#362). Prefer map() lapply() (#361) map_*() vapply() (#356). Bump DBI dependency fix tests (#359). Document sources autogenerated files (#353), add comments generated code (#358). Make test names unique, numeric suffix (#355). Align RSQLite (#351). Replace unconditional skip versioned skip (#347). Consistent use skip_if_not_dbitest() (#346).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"continuous-integration-1-8-1","dir":"Changelog","previous_headings":"","what":"Continuous integration","title":"DBItest 1.8.1 (2024-03-31)","text":"Modernize backends checks.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-8-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.8.1 (2024-03-31)","text":"Use dbitemplate (@maelle, #360). Mention dbBindArrow() documentation (#350). Minor specification fixes (#344).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-8-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.8.0 (2023-12-21)","text":"Fix create_roundtrip_keywords create_roundtrip_quotes tests (#283).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-8-0","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.8.0 (2023-12-21)","text":"Relax specification dbUnquoteIdentifier(), character vectors now allowed . Specify dbFetchChunk() (#331), dbFetchArrowChunk() (#301) dbBindArrow() (#328). Inline tests dbBind() (#326). Require support dbFetch(n = NA) (#296, #316). New allow_na_rows_affected tweak support NA values returned dbGetRowsAffected() (#297, #312). Switch nanoarrow (#291). Basic tests new db*Arrow() interface (#287). New skip_if_not_dbitest() (#289). reexport test uses interface dev DBI backend compatible DBItest > 1.7.3. Slightly better code generated tweaks() (#313). Remove interface dblog CRAN version.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"cicd-1-8-0","dir":"Changelog","previous_headings":"","what":"CI/CD","title":"DBItest 1.8.0 (2023-12-21)","text":"Add adbi check matrix (#314). Reenable ODBC MySQL tests (#288). Tweak read_table_missing test (#285).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-8-0","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.8.0 (2023-12-21)","text":"Remove rlang qualification (#332). longer need .data.frame() twice Arrow (#302, #330). Consistent use skip_if_not_dbitest() (#317). Disable Arrow skips (#303). Modernize sql_union() (#304). Make better use trivial_df() (#284).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-8-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.8.0 (2023-12-21)","text":"Avoid error RSQLite installed.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"testing-1-8-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"DBItest 1.8.0 (2023-12-21)","text":"Run DBItest SQLite part checks (#318). Enable remaining Arrow tests (#307). Fix checks without suggested packages (#300).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-7-3","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.7.3 (2022-10-18)","text":"Use enable compatibility testthat edition 3 (#263, #268). Complete removal expect_is() (@MichaelChirico, #257). Adapt new Arrow DBI generics (#265). Better stack traces visibility tests. dbQuoteIdentifier() roundtrip tested tables (@dpprdan, #256). test_some() also tests test normally skipped.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-7-3","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.7.3 (2022-10-18)","text":"Bump minimum DBI version 1.1.3. Refactor DBI tests preparation inlining .","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-7-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.7.3 (2022-10-18)","text":"Correct cleanup even dbIsValid() implemented.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-7-2","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.7.2 (2021-12-17)","text":"tweaks() gains dbitest_version argument support targeting specific version DBItest package. default 1.7.1 (#236). Reuse database connection tests (#245). New roundtrip_date_extended, roundtrip_timestamp_extended, append_roundtrip_date_extended append_roundtrip_timestamp_extended test dates 1800 2999 (#148, #249). New quote_literal_empty test (#248). New bind_character_escape test binding special characters (#242). New bind_time_minutes_integer test integer durations.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-7-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.7.2 (2021-12-17)","text":"column names specified using lowercase input, compatibility Redshift (#234). column_info_consistent longer tests mangling column names (#181). spec_sql_append_table test: Remove bad argument.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-7-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.7.2 (2021-12-17)","text":"Improve documentation: list spec_ objects pkgdown help index, add cross references (#128). Add specification value argument DBI::dbWriteTable() (#235).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-7-2","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.7.2 (2021-12-17)","text":"Replace internal with_result(), with_remove_test_tables() with_rollback_on_error() better error traces (#184, #250, #251, #253). Use palmerpenguins::penguins instead iris (#241). Fix MySQL ODBC test GitHub Actions (#237). Improve testthat 3e compatibility: remove testthat::expect_is() testthat::expect_that() tests (#231, @michaelquinn32). Decompose query used testing dbBind().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-7-1","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.7.1 (2021-07-30)","text":"Many tests now emit simpler stack traces, connection opened test driver test (#187). Reduce usage with_remove_test_table() better stack traces error (#196). Remove with_*connection() (#193). test_some() shows DBI code via dblog (#217) dblog = TRUE (#226). New \"bind_date_integer\", \"bind_time_seconds\" \"bind_time_hours\" tests (#218). New create_table_as tweak (#131). \"roundtrip_time\" \"append_roundtrip_time\" tests now also test values class \"difftime\" units \"secs\" (#199). tables created tests \"dbit\" prefix. Almost tests now use random table names avoid collisions unrelated test failures (#197). \"roundtrip_timestamp\" tests now accept time zone set database backend (#178, #198). Support one class type DBI backend packages.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-7-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.7.1 (2021-07-30)","text":"Fix input dataset \"overwrite_table_missing\" test (#210, @martinstuder). Use original test name decide test skipped (#225). Fix reexport test: skip package installed, remove checks deprecated functions functions reexported (#203).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-7-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.7.1 (2021-07-30)","text":"Requires DBI 1.1.1. Test odbc part backend tests (#228). Dynamic build matrix backends (#221). Compatibility testthat 3.0.0 (#207). Switch GitHub Actions (#201).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"specifications-1-7-0","dir":"Changelog","previous_headings":"","what":"Specifications","title":"DBItest 1.7.0 (2019-12-16)","text":"Specify tests dbGetInfo(). Specify immediate argument (r-dbi/DBI#268). Specify dbCreateTable() dbAppendTable() (#169). New unquote_identifier_table_schema test: Identifiers form table.schema can processed dbUnquoteIdentifier(). Fix has_completed_statement test (#176).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"testing-infrastructure-1-7-0","dir":"Changelog","previous_headings":"","what":"Testing infrastructure","title":"DBItest 1.7.0 (2019-12-16)","text":"Document run tests externally debug tests (#165). test_*() gain new run_only = NULL argument allow restricting tests run positive match. test_some() uses run_only instead constructing regular expression negative lookahead. helps troubleshooting single test testthat::set_reporter(DebugReporter$new()) . make_context() gains default_skip argument uses DBIConnector class. Support NULL default value driver constructor (#171).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-7-0","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.7.0 (2019-12-16)","text":"Fulfill CII badge requirements (#179, @TSchiefer). Use debugme. Require R 3.2. Avoid subsetting vectors bounds, consistency vctrs.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"new-checks-1-6-0","dir":"Changelog","previous_headings":"","what":"New checks","title":"DBItest 1.6.0 (2018-05-03)","text":"Now checking Id() reexported. Support temporary argument dbRemoveTable() (default: FALSE) (r-dbi/DBI#141). Added specification behavior case duplicate column names (#137). bigint argument dbConnect() now specified. Accepts \"integer64\", \"integer\", \"numeric\" \"character\", large integers returned values type (#133). Add specification partially filled field.types argument. Specify dbRemoveTable(fail_if_missing = FALSE) (r-dbi/DBI#197). Add specification dbColumnInfo() (r-dbi/DBI#75). Add specification dbListFields() (r-dbi/DBI#75). Test named parameters actually matched name dbBind(), shuffling (#138). Explicitly specify default row.names = FALSE dbReadTable() dbWriteTable() (#139). Add specification writing 64-bit values, backends must support roundtripping values returned database (#146). Add specification params argument dbGetQuery(), dbSendQuery(), dbExecute() dbSendStatement() (#159). Add test dbQuoteIdentifier(): “names input argument preserved output” (r-lib/DBI#173). Blob tests now also read write zero bytes (). Add string encoded Latin-1 character tests. Added test dbIsValid() stale connections.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"removed-checks-1-6-0","dir":"Changelog","previous_headings":"","what":"Removed checks","title":"DBItest 1.6.0 (2018-05-03)","text":"Don’t test selecting untyped NULL anymore. Full interface compliance doesn’t require method dbGetInfo(DBIDriver) now. Remove \"cannot_forget_disconnect\" test fails R-devel (#150). Methods without db prefix checked ellipsis signature anymore. Don’t specify Inf NaN lack consistent support across DBMS (#142).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"updatedcorrected-checks-1-6-0","dir":"Changelog","previous_headings":"","what":"Updated/corrected checks","title":"DBItest 1.6.0 (2018-05-03)","text":"Fix query supposed generate syntax error. Fix typo (#147, @jonmcalder). Implement POSIXlt bind test correctly. Improve error detection dbBind(). Redesign tests dbBind(), now queries form SELECT CASE (? = ?) (? NULL) 1.5 ELSE 2.5 issued. original tests inappropriate RMariaDB, untyped placeholder returned blob. Transaction tests now use dbWriteTable() instead dbCreateTable(), DBMS don’t support transactions DML. Fix timestamp tests RMariaDB. Fix string constants. \"roundtrip_timestamp\" test now correctly handles timezone information. output timezone ignored. Clear result spec_meta_get_info_result (#143). Use named argument n dbGetQuery() call. Minor fixes.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"tweaks-1-6-0","dir":"Changelog","previous_headings":"","what":"Tweaks","title":"DBItest 1.6.0 (2018-05-03)","text":"New tweak blob_cast allows specifying conversion function BLOB data type. New is_null_check tweak allows specifying function used checking values NULL. Required RPostgres. New list_temporary_tables tweak can enabled independently temporary_tables indicate DBMS support listing temporary tables.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"infrastructure-1-6-0","dir":"Changelog","previous_headings":"","what":"Infrastructure","title":"DBItest 1.6.0 (2018-05-03)","text":"Allow running subset tests test_all() specifying environment variable. test_all() test_some() return NULL invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internals-1-6-0","dir":"Changelog","previous_headings":"","what":"Internals","title":"DBItest 1.6.0 (2018-05-03)","text":"Compatibility code DBI::dbQuoteLiteral() unavailable. New trivial_query() replaces many hard-coded queries uses non-integer values better compatibility RMariaDB. Convert factor character iris data (#141).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-15-2-2018-01-26","dir":"Changelog","previous_headings":"","what":"DBItest 1.5-2 (2018-01-26)","title":"DBItest 1.5-2 (2018-01-26)","text":"Fix test fails “noLD”. Fix NOTEs R-devel.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-15-1-2017-12-10","dir":"Changelog","previous_headings":"","what":"DBItest 1.5-1 (2017-12-10)","title":"DBItest 1.5-1 (2017-12-10)","text":"Remove \"cannot_forget_disconnect\" test fails R-devel (#150).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-15-2017-06-18","dir":"Changelog","previous_headings":"","what":"DBItest 1.5 (2017-06-18)","title":"DBItest 1.5 (2017-06-18)","text":"Finalize specification. tests now come corresponding prose, behavior finally decided don’t prose version yet (#88).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"new-tests-1-5","dir":"Changelog","previous_headings":"","what":"New tests","title":"DBItest 1.5 (2017-06-18)","text":"Test behavior methods presence placeholders (#120). Test column name mismatch behavior appending tables (#93). Test dbBind() factor works raises warning (#91). Test roundtrip alternating empty non-empty strings (#42). Test multiple columns different types one statement table (#35). Test field.types argument dbWriteTable() (#12). Added tests invalid closed connection argument methods expect connection first argument (#117). Enabled test tests missing dbDisconnect(). Add test unambiguous escaping identifiers (rstats-db/RSQLite#123). Reenable tests visibility (#89). Fix specify 64-bit roundtrip test. 64-bit integers need coercible numeric character (#74). Added roundtrip test time values (#14). Added tweaks handling date, time, timestamp, … (#53, #76). Test dbFetch() update-query returns warning (#66).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"adapted-tests-1-5","dir":"Changelog","previous_headings":"","what":"Adapted tests","title":"DBItest 1.5 (2017-06-18)","text":"NULL valid value row.names argument, FALSE. column named row_names receives special handling (#54). warning (error anymore) expected calling dbDisconnect() closed invalid connection. row.names = FALSE now default methods read write tables. Add NA beginning end columns table roundtrip tests (#24). Stricter tests confusion named unnamed SQL parameters placeholders (#107). Also check names returned data frames. return value calls dbGetQuery(), dbFetch(), dbReadTable() now checked consistency (columns length, length matches number rows) (#126). Removed stress tests start new session. Allow hms (subclasses difftime) returned time class (#135, @jimhester). Test dates type numeric (#99, @jimhester). Replace POSIXlt POSIXct (#100, @jimhester). Use \"PST8PDT\" instead \"PST\" time zone (#110, @thrasibule). Added tests support blob objects (input output), backends required return blob objects (#98). logical_return, date_typed timestamp_typed tweaks respected bind tests. Fixed tests involving time comparison; now uses UTC timezone compares difftime. Tests roundtrip character values now includes tabs, addition many special characters (#85). Make sure least one table exists dbListTables() test. Fix roundtrip tests raw columns: now expecting NULL NA entries SQL NULL values. Fix expect_equal_df() list columns. Testing warning given user forgets call dbDisconnect() dbClearResult() (#103). Numeric roundtrip accepts conversion NaN NA (#79).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-5","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.5 (2017-06-18)","text":"Fix R CMD check errors. Internal consistency checks (#114). Skip patterns don’t match tests now raise warning (#84). New test_some() test individual tests (#136). Use desc instead devtools (#40). unexpected warnings now reported test failures (#113). DBItest_tweaks class gains $ method, accessing undefined tweak now raises error. arguments tweaks() function now default values describe intended usage. New with_closed_connection(ctx = ctx, ), with_invalid_connection(ctx = ctx, ), with_result() with_remove_test_table() helpers, expect_visible(), expect_inbisible_true(), expect_equal_df() expectations concise tests.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbi-specification-1-4","dir":"Changelog","previous_headings":"","what":"DBI specification","title":"DBItest 1.4 (2016-12-02)","text":"Use markdown documentation. Description parametrized queries statements (#88). New hidden DBIspec-wip page work--progress documentation. Get rid “Format” “Usage” sections, aliases, specs.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"tests-1-4","dir":"Changelog","previous_headings":"","what":"Tests","title":"DBItest 1.4 (2016-12-02)","text":"testing presence max.connections element dbGetInfo(Driver) (rstats-db/DBI#56). Test multi-row binding queries statements (#96). New ellipsis check verifies implemented DBI methods contain ... formals. excludes show() methods defined packages. Refactored bind_ tests use new parameter_pattern tweak (#95). Rough draft transaction tests (#36). New fetch_zero_rows test, split fetch_premature_close. “compliance” test tests backend package exports exactly one subclass DBI virtual class. Document enhance test dbDataType(\"DBIDriver\", \"\") (#88). Minor corrections “bind” tests.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-4","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.4 (2016-12-02)","text":"Isolate stress tests main test suite (#92). Refactor test specification smaller modules, isolated actual test execution (#81). breaks documentation tests, substituted DBI specification prose. Align description binding code. Refactor tests dbBind(), test run BindTester class, behavior specified members instances new BindTesterExtra class. skip argument test_() functions evaluated perl = TRUE support negative lookaheads (#33). Use dbSendStatement() dbExecute() appropriate. Avoid empty subsections Rd documentation satisfy R CMD check (#81).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.3 (2016-07-07)","text":"Fix read_table test backend actually returns data different order.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"new-tests-1-3","dir":"Changelog","previous_headings":"","what":"New tests","title":"DBItest 1.3 (2016-07-07)","text":"Test dbDataType() connections (#69, #75, @imanuelcostigan). Check returned strings UTF-8 encoding (#72). Repeated dbBind() + dbFetch() result set (#51).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-3","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.3 (2016-07-07)","text":"tweaks() gains ... first argument support future/deprecated tweaks (warning), also avoid unnamed arguments (#83). testthat now shows accurate location source errors, failures, skips (#78). Aggregate skipped tests, one skip() call per test function. Indicate tests optional documentation (#15).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-3","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.3 (2016-07-07)","text":"New constructor_relax_args tweak, currently queried. ctx argument now explicit test functions. Change underscores dashes file names. Remove testthat compatibility hack. New all_have_utf8_or_ascii_encoding() vectorizes has_utf8_or_ascii_encoding(). Test AppVeyor (#73). Work around regression R 3.3.0 (fix scheduled R 3.3.1) affected stress tests.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-12-2016-05-21","dir":"Changelog","previous_headings":"","what":"DBItest 1.2 (2016-05-21)","title":"DBItest 1.2 (2016-05-21)","text":"Support names contexts (@hoesler, #67). skip argument test functions now treated Perl regular expression allow negative lookahead. Use skip = \"(?!test_regex).*\" choose single test run (#33). Added encoding arguments non-ASCII string constants (#60, @hoesler). simultaneous_connections test always closes connections exit (@hoesler, #68). generic compliance check (@hoesler, #61). Update documentation reflect test condition (@imanuelcostigan, #70). Import testthat avoid R CMD check warnings. Compatibility dev version testthat (#62). Use container-based builds Travis. Install RPostgres RMySQL rstats-db. Install DBI testthat GitHub.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-11-2016-02-12","dir":"Changelog","previous_headings":"","what":"Version 1.1 (2016-02-12)","title":"Version 1.1 (2016-02-12)","text":"New argument tweaks make_context() (#49). New tweaks(), essentially constructs named list tweaks predefined documented argument names. constructor_name, respected constructor.* tests. strict_identifier, TRUE identifier must syntactic names even quoted. quoting test now split, part ignored conditional tweak. roundtrip_quotes tests also respects tweak. omit_blob_tests DBMS don’t BLOB data type. current_needs_parens – SQL dialects (e.g., BigQuery) require parentheses functions current_date, current_time current_timestamp. union, specifying nonstandard way combining queries. union queries now name column subquery (required bigrquery). dbGetInfo(Result) (rstats-db/DBI#55). dbListFields() (#26). New package_name test test_getting_started(). Stress test now installs package temporary library (loading DBI) using R CMD INSTALL loading DBI (rstats-db/RSQLite#128, #48). Row count now tested equality identity, backends can return numeric value > 2^31 discretion. Call dbRemoveTable() instead issuing DROP requests, latter might unsupported. Use subqueries queries use . Test dbClearResult() closed result set raises warning. Expect warning instead error double disconnect (#50). Move connection test requires dbFetch() test_result(). Split can_connect_and_disconnect test. Expect DBI Imports, Depends. Remove test dbGetException() (rstats-db/DBI#51). Fix broken tests quoting. Test RPostgres, RMySQL, RSQLite RKazam part Travis-CI tests (#52). Travis CI now installs rstats-db/DBI, updated namespace imports (dbiCheckCompliance(), dbListResults()). Use fork testthat. Return test results named array logical. Requires hadley/testthat#360, gracefully degrades CRAN version. Refactored get_info_() tests use vector names. Use versioned dependency DBI Use unqualified calls dbBind() ","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-10-2015-12-17","dir":"Changelog","previous_headings":"","what":"Version 1.0 (2015-12-17)","title":"Version 1.0 (2015-12-17)","text":"Eliminate errors win-builder Satisfy R CMD check Use LGPL-2 license Add RStudio copyright holder Move devtools package “Imports” “Suggests”","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-03-2015-11-15","dir":"Changelog","previous_headings":"","what":"Version 0.3 (2015-11-15)","title":"Version 0.3 (2015-11-15)","text":"Feature-complete, ready review Add missing methods compliance check Add simple read-test (#27) Add stress tests repeated load/unload (without connecting) new R session (#2), Migrate tests existing backends (#28) Refactor data_ tests use worker function test_select() Test tables NA values non-NA value data_ tests Test return values error conditions dbBind() dbClearResult() (#31) Test vectorization dbQuoteString() dbQuoteIdentifier() (#18) Test dates integer underlying data type (#9) Roundtrip tests sort output table sure (#32) Test NA NULL conversion dbQuoteString(), false friends (#23) Enhance test dbQuoteIdentifier() (#30) Avoid using data.frame() date time columns (#10) Use expect_identical() instead expect_equal() many places (#13) Catch errors .exit() handlers via expect_error() (#20). Combine “meta” tests new test_meta() (#37) New “test” vignette (#16) Add package documentation (#38) 0.2-5","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-02-2015-11-11","dir":"Changelog","previous_headings":"","what":"Version 0.2 (2015-11-11)","title":"Version 0.2 (2015-11-11)","text":"SQL Metadata DBI compliance (testing read-yet) Migrate tests RMySQL Test BLOB data type (#17) Check actual availability type returned dbDataType() (#19) Disambiguate test names (#21) Use regex matching deciding skipped tests, skip regex must match entire test name Document tests test function using new inline documentation feature roxygen2 Improve documentation test_all(): Tests listed new “Tests” section Add brief instructions README Move repository rstats-db namespace 0.1-6","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-01-2015-10-11","dir":"Changelog","previous_headings":"","what":"Version 0.1 (2015-10-11)","title":"Version 0.1 (2015-10-11)","text":"First GitHub release Builds successfully Travis Test context Skipped tests call skip() Function test_all() runs tests Getting started Driver Connection Results Code formatting checked lintr 0.0-5","code":""}] +[{"path":"https://dbitest.r-dbi.org/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://dbitest.r-dbi.org/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"Contributing to DBItest","title":"Contributing to DBItest","text":"outlines propose change DBItest.","code":""},{"path":"https://dbitest.r-dbi.org/CONTRIBUTING.html","id":"fixing-typos","dir":"","previous_headings":"","what":"Fixing typos","title":"Contributing to DBItest","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://dbitest.r-dbi.org/CONTRIBUTING.html","id":"prerequisites","dir":"","previous_headings":"","what":"Prerequisites","title":"Contributing to DBItest","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://dbitest.r-dbi.org/CONTRIBUTING.html","id":"pull-request-process","dir":"","previous_headings":"","what":"Pull request process","title":"Contributing to DBItest","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://dbitest.r-dbi.org/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of Conduct","title":"Contributing to DBItest","text":"Please note DBItest project released Contributor Code Conduct. contributing project agree abide terms.","code":""},{"path":"https://dbitest.r-dbi.org/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://dbitest.r-dbi.org/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://dbitest.r-dbi.org/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://dbitest.r-dbi.org/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://dbitest.r-dbi.org/articles/DBItest.html","id":"testing-a-new-backend","dir":"Articles","previous_headings":"","what":"Testing a new backend","title":"Testing DBI backends","text":"test cases DBItest package structured similarly sections “backend” vignette: Like “backend” vignette, vignette assumes implementing RKazam package Kazam() function creates new DBIDriver instance connecting “Kazam” database. can add tests DBItest package incrementally, proceed implementing various parts DBI. DBItest package builds upon testthat package. enable , run following package directory (installing updating devtools): creates, among others, file test-DBItest.R tests/testthat directory. Replace entire contents following: Now test package devtools::test(). followed least “Getting started” section DBI “backend” vignette, tests succeed. adding corresponding test function tests/test-DBItest.R file implementing section, get immediate feedback functionality section still needs implemented running devtools::test() . Therefore, proceed appending following tests/test-DBItest.R, include test case forthcoming section: , tests succeed done “Driver” section. Add call next tester function, implement following section tests succeed, forth. scenario, usually interested first error test suite finds. StopReporter testthat helpful , activate passing reporter = \"stop\" devtools::test(). Alternatively, call relevant DBItest::test_() function directly. tests documented corresponding functions: instance, ?test_driver shows coarse description tests “Driver” test case. Test failures include name test failing; case, investigating documentation source code DBItest package usually lead cause error. tests can satisfied: example, one test tests logical variables survive write-read roundtrip database, whereas another test tests logical variables converted integer case. Tests can skipped adding regular expressions tests skip character vector call, following1: reasons skip tests : - database support feature - want postpone avoid implementation feature - test takes long run.","code":"vignette(\"backend\", package = \"DBI\") devtools::use_testthat() devtools::use_test(\"DBItest\") DBItest::make_context(Kazam(), NULL) DBItest::test_getting_started() DBItest::test_driver() DBItest::test_driver(skip = c( \"data_type\" # Reason 1... \"constructor.*\", # Reason 2... NULL ))"},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"testing-an-existing-backend","dir":"Articles","previous_headings":"","what":"Testing an existing backend","title":"Testing DBI backends","text":"existing backends, simply enabling tests may quickest way get started. Run following package directory (installing updating devtools): creates, among others, file test-DBItest.R tests/testthat directory. Replace entire contents following: notes “Kazam” skipping tests previous section apply well. test_all() function simply calls test cases.","code":"devtools::use_testthat() devtools::use_test(\"DBItest\") DBItest::make_context(Kazam(), NULL) DBItest::test_all()"},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"external-testing","dir":"Articles","previous_headings":"","what":"External testing","title":"Testing DBI backends","text":"DBItest currently geared towards usage part package’s test suite. effort possible test database backend custom database. can help verify database installation gives expected results accessed DBI specific connection arguments. example shows run tests RSQLite backend.","code":""},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"preparation","dir":"Articles","previous_headings":"External testing","what":"Preparation","title":"Testing DBI backends","text":"First, need define test context. contains: connector describes establish database connection, see ?DBI::`DBIConnector-class` details, tweaks, see ?tweaks, tests skipped default, character vector. Database backends use DBItest testing usually file test/testthat/helper-DBItest.R test/testthat/test-DBItest.R call make_context() can found. help make_context() already contains example works RSQLite. Adapt needs. make_context() function must called tests can run.","code":"library(DBItest) tweaks <- tweaks( constructor_relax_args = TRUE, placeholder_pattern = c(\"?\", \"$1\", \"$name\", \":name\"), date_cast = function(x) paste0(\"'\", x, \"'\"), time_cast = function(x) paste0(\"'\", x, \"'\"), timestamp_cast = function(x) paste0(\"'\", x, \"'\"), logical_return = function(x) as.integer(x), date_typed = FALSE, time_typed = FALSE, timestamp_typed = FALSE ) default_skip <- c(\"roundtrip_date\", \"roundtrip_timestamp\") invisible(make_context( new( \"DBIConnector\", .drv = RSQLite::SQLite(), .conn_args = list(dbname = tempfile(\"DBItest\", fileext = \".sqlite\")) ), tweaks = tweaks, default_skip = default_skip ))"},{"path":"https://dbitest.r-dbi.org/articles/DBItest.html","id":"testing","dir":"Articles","previous_headings":"External testing","what":"Testing","title":"Testing DBI backends","text":"Use test_all() run tests, test_some() run specific test failed previously. test_* functions need run testthat reporter avoid stopping first error warning. interactive use, “progress” reporter gives good results. example , “location” “stop” reporters combined. Review ?testthat::Reporter list reporters. DBItest relies heavily metaprogramming. Unfortunately, means failing test may give indication reason failure. test_some() function now default integrates new experimental dblog package package. prints DBI code executed tests run, seen . Another way scout reason problem review sources DBItest relate test name (printed failure) human-readable specification embedded test code.","code":"DBItest::test_some(\"get_query_atomic\") ## Test passed testthat::with_reporter( c(\"location\", \"fail\"), DBItest::test_some(\"get_query_atomic\") ) ## Start test: DBItest: Result: get_query_atomic ## [success] ## [success] ## [success] ## [success] ## [success] ## [success] ## [success] ## End test: DBItest: Result: get_query_atomic"},{"path":"https://dbitest.r-dbi.org/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Kirill Müller. Author, maintainer. . Copyright holder. R Consortium. Funder.","code":""},{"path":"https://dbitest.r-dbi.org/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Müller K (2024). DBItest: Testing DBI Backends. R package version 1.8.2, https://github.com/r-dbi/DBItest, https://dbitest.r-dbi.org.","code":"@Manual{, title = {DBItest: Testing DBI Backends}, author = {Kirill Müller}, year = {2024}, note = {R package version 1.8.2, https://github.com/r-dbi/DBItest}, url = {https://dbitest.r-dbi.org}, }"},{"path":"https://dbitest.r-dbi.org/index.html","id":"dbitest","dir":"","previous_headings":"","what":"Testing DBI Backends","title":"Testing DBI Backends","text":"package primarily useful developers DBI backends. provides considerable set test cases DBI backends. test cases correspond DBI specification. Please follow steps add test cases DBI backend.","code":""},{"path":"https://dbitest.r-dbi.org/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Testing DBI Backends","text":"Install CRAN via development version using","code":"install.packages(\"DBItest\") devtools::install_github(\"r-dbi/DBItest\")"},{"path":"https://dbitest.r-dbi.org/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Testing DBI Backends","text":"driver package, add DBItest Suggests: enable tests. Run following code package’s directory: enables testing using testthat (necessary) creates, among others, file test-DBItest.R tests/testthat directory. Replace entire contents following: assumes Kazam() returns instance DBIDriver class. Additional arguments dbConnect() specified named list instead NULL argument make_context(). default_skip argument make_context() allows skipping tests (yet) satisfied backend. reading: Detailed instructions vignette(\"DBItest\") feature list original proposal. Please note ‘DBItest’ project released Contributor Code Conduct. contributing project, agree abide terms.","code":"# install.packages(\"usethis\") usethis::use_package(\"DBItest\", \"suggests\") usethis::use_test(\"DBItest\") DBItest::make_context(Kazam(), NULL) DBItest::test_all()"},{"path":"https://dbitest.r-dbi.org/reference/DBItest-package.html","id":null,"dir":"Reference","previous_headings":"","what":"DBItest: Testing DBI Backends — DBItest-package","title":"DBItest: Testing DBI Backends — DBItest-package","text":"helper tests DBI back ends conformity interface.","code":""},{"path":"https://dbitest.r-dbi.org/reference/DBItest-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"DBItest: Testing DBI Backends — DBItest-package","text":"two important functions make_context() test_all(). former tells package connect DBI backend, latter executes tests test suite. fine-grained test functions (prefix test_) available. See package's vignette details.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/DBItest-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"DBItest: Testing DBI Backends — DBItest-package","text":"Kirill Müller","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":null,"dir":"Reference","previous_headings":"","what":"Test contexts — make_context","title":"Test contexts — make_context","text":"Create test context, set query default context.","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test contexts — make_context","text":"","code":"make_context( drv, connect_args = NULL, set_as_default = TRUE, tweaks = NULL, name = NULL, default_skip = NULL ) set_default_context(ctx) get_default_context()"},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test contexts — make_context","text":"drv [DBIConnector] object class DBI::DBIConnector describes connect database. connect_args [named list] Deprecated. set_as_default [logical(1)] created context set default context? tweaks [DBItest_tweaks] Tweaks constructed tweaks() function. name [character] optional name context used test messages. default_skip [character] Default value skip argument test_all() testing functions. ctx [DBItest_context] test context.","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test contexts — make_context","text":"[DBItest_context] test context, set_default_context previous default context (invisibly) NULL.","code":""},{"path":"https://dbitest.r-dbi.org/reference/context.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Test contexts — make_context","text":"","code":"make_context( new( \"DBIConnector\", .drv = RSQLite::SQLite(), .conn_args = list(dbname = tempfile(\"DBItest\", fileext = \".sqlite\")) ), tweaks = tweaks( constructor_relax_args = TRUE, placeholder_pattern = c(\"?\", \"$1\", \"$name\", \":name\"), date_cast = function(x) paste0(\"'\", x, \"'\"), time_cast = function(x) paste0(\"'\", x, \"'\"), timestamp_cast = function(x) paste0(\"'\", x, \"'\"), logical_return = function(x) as.integer(x), date_typed = FALSE, time_typed = FALSE, timestamp_typed = FALSE ), default_skip = c(\"roundtrip_date\", \"roundtrip_timestamp\") ) #> $cnr #> #> Arguments: #> $dbname #> [1] \"/tmp/RtmpQAG6mU/DBItest2bd873f6acb7.sqlite\" #> #> #> $drv #> #> #> $tweaks #> DBItest tweaks: #> constructor_relax_args: TRUE #> strict_identifier: FALSE #> omit_blob_tests: FALSE #> current_needs_parens: FALSE #> union: function (x) #> placeholder_pattern: ? #> logical_return: function (x) #> date_cast: function (x) #> time_cast: function (x) #> timestamp_cast: function (x) #> blob_cast: function (x) #> date_typed: FALSE #> time_typed: FALSE #> timestamp_typed: FALSE #> temporary_tables: TRUE #> list_temporary_tables: TRUE #> allow_na_rows_affected: FALSE #> is_null_check: function (x) #> create_table_as: function (table_name, query) #> dbitest_version: 1.7.1 #> #> $name #> NULL #> #> $default_skip #> [1] \"roundtrip_date\" \"roundtrip_timestamp\" #> #> attr(,\"class\") #> [1] \"DBItest_context\""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a function that creates n placeholders — make_placeholder_fun","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"internal use placeholder_format tweak.","code":""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"","code":"make_placeholder_fun(pattern)"},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"pattern [character(1)] character, optionally followed 1 name. Examples: \"?\", \"$1\", \":name\"","code":""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"[function(n)] function one argument n returns vector length n placeholders specified format.","code":""},{"path":"https://dbitest.r-dbi.org/reference/make_placeholder_fun.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a function that creates n placeholders — make_placeholder_fun","text":"","code":"body(DBItest:::make_placeholder_fun(\"?\")) #> rep(\"?\", n) DBItest:::make_placeholder_fun(\"?\")(2) #> [1] \"?\" \"?\" DBItest:::make_placeholder_fun(\"$1\")(3) #> [1] \"$1\" \"$2\" \"$3\" DBItest:::make_placeholder_fun(\":name\")(5) #> a b c d e #> \":a\" \":b\" \":c\" \":d\" \":e\""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"spec_arrow_append_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"dbAppendTableArrow() returns scalar numeric.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"table exist, new data values data frame different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_append_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_append_table_arrow — spec_arrow_append_table_arrow","text":"SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings (non-empty strings) factor (possibly returned character) objects type blob::blob (supported database) date (supported database; returned Date) also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported. name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbAppendTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done support databases allow non-syntactic names objects: value argument must data frame subset columns existing table. order columns matter.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"spec_arrow_create_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"dbCreateTableArrow() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"table exists, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values temporary argument (non-scalars, unsupported data types, NA, incompatible values, duplicate names) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"following arguments part dbCreateTableArrow() generic (improve compatibility across backends) part DBI specification: temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_create_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_create_table_arrow — spec_arrow_create_table_arrow","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbCreateTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument can : data frame, nanoarrow array nanoarrow array stream (still contain data call) nanoarrow schema temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces can also used table names column names, database supports non-syntactic identifiers.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"spec_arrow_fetch_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"dbFetchArrow() always returns object coercible data.frame many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"attempt fetch closed result set raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_fetch_arrow — spec_arrow_fetch_arrow","text":"Fetching multi-row queries one columns default returns entire result. object returned dbFetchArrow() can also passed nanoarrow::as_nanoarrow_array_stream() create nanoarrow array stream object can used read result set batches. chunk size implementation-specific.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"spec_arrow_fetch_arrow_chunk","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"dbFetchArrowChunk() always returns object coercible data.frame many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"attempt fetch closed result set raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_fetch_arrow_chunk.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_fetch_arrow_chunk — spec_arrow_fetch_arrow_chunk","text":"Fetching multi-row queries one columns returns next chunk. size chunk implementation-specific. object returned dbFetchArrowChunk() can also passed nanoarrow::as_nanoarrow_array() create nanoarrow array object. chunk size implementation-specific.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"spec_arrow_get_query_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"dbGetQueryArrow() always returns object coercible data.frame, many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"error raised issuing query closed invalid connection, syntax query invalid, query non-NA string. object returned dbGetQueryArrow() can also passed nanoarrow::as_nanoarrow_array_stream() create nanoarrow array stream object can used read result set batches. chunk size implementation-specific.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"following arguments part dbGetQueryArrow() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" \"Value\" sections details usage. param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_get_query_arrow.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_arrow_get_query_arrow — spec_arrow_get_query_arrow","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"spec_arrow_read_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"dbReadTableArrow() returns Arrow object contains complete data remote table, effectively result calling DBI::dbGetQueryArrow() SELECT * . empty table returned Arrow object zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"error raised table exist. error raised calling method closed invalid connection. error raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_read_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_read_table_arrow — spec_arrow_read_table_arrow","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbReadTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_send_query — spec_arrow_send_query_arrow","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"spec_result_send_query","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"dbSendQueryArrow() returns S4 object inherits DBI::DBIResultArrow. result set can used DBI::dbFetchArrow() extract records. finished using result, make sure clear DBI::dbClearResult().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"error raised issuing query closed invalid connection, query non-NA string. error also raised syntax query invalid query parameters given (passing params argument) immediate argument set TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"following arguments part dbSendQueryArrow() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"warnings occur normal conditions. done, DBIResult object must cleared call DBI::dbClearResult(). Failure clear result set leads warning connection closed. backend supports one open result set per connection, issuing second query invalidates already open result set raises warning. newly opened result set valid must cleared dbClearResult(). param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_send_query_arrow.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_send_query — spec_arrow_send_query_arrow","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"spec_arrow_write_table_arrow","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"dbWriteTableArrow() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"table exists, append overwrite arguments unset, append = TRUE data frame new data different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values additional arguments overwrite, append, temporary (non-scalars, unsupported data types, NA, incompatible values, incompatible columns) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"following arguments part dbWriteTableArrow() generic (improve compatibility across backends) part DBI specification: overwrite (default: FALSE) append (default: FALSE) temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_arrow_write_table_arrow.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_arrow_write_table_arrow — spec_arrow_write_table_arrow","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbWriteTableArrow() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument must data frame subset columns existing table append = TRUE. order columns matter append = TRUE. overwrite argument TRUE, existing table name overwritten. argument change behavior table exist yet. append argument TRUE, rows existing table preserved, new data appended. table exist yet, created. temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings non-empty string factor (possibly returned character) objects type blob::blob (supported database) date (supported database; returned Date), also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_compliance_methods.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_compliance_methods — spec_compliance_methods","title":"spec_compliance_methods — spec_compliance_methods","text":"spec_compliance_methods","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_compliance_methods.html","id":"dbi-classes-and-methods","dir":"Reference","previous_headings":"","what":"DBI classes and methods","title":"spec_compliance_methods — spec_compliance_methods","text":"backend defines three classes, subclasses DBI::DBIDriver, DBI::DBIConnection, DBI::DBIResult. backend provides implementation methods base classes defined implemented DBI. methods defined DBI reexported (package can used without attach DBI), ellipsis ... formals extensibility.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_connection_disconnect.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_connection_disconnect — spec_connection_disconnect","title":"spec_connection_disconnect — spec_connection_disconnect","text":"spec_connection_disconnect","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_connection_disconnect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_connection_disconnect — spec_connection_disconnect","text":"dbDisconnect() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_connection_disconnect.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_connection_disconnect — spec_connection_disconnect","text":"warning issued garbage collection connection released without calling dbDisconnect(), tested automatically. least one warning issued immediately calling dbDisconnect() already disconnected invalid connection.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_connect.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_connect — spec_driver_connect","title":"spec_driver_connect — spec_driver_connect","text":"spec_driver_connect","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_connect.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_driver_connect — spec_driver_connect","text":"dbConnect() returns S4 object inherits DBI::DBIConnection. object used communicate database engine. format() method defined connection object. returns string consists single line text.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_connect.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_driver_connect — spec_driver_connect","text":"DBI recommends using following argument names authentication parameters, NULL default: user user name (default: current user) password password host host name (default: local connection) port port number (default: local connection) dbname name database host, database file name defaults provide reasonable behavior, particular local connection host = NULL. DBMS (e.g., PostgreSQL), different TCP/IP connection localhost. addition, DBI supports bigint argument governs 64-bit integer data returned. following values supported: \"integer\": always return integer, silently overflow \"numeric\": always return numeric, silently round \"character\": always return decimal representation character \"integer64\": return data type can coerced using .integer() (warning overflow), .numeric() .character()","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_constructor.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_constructor — spec_driver_constructor","title":"spec_driver_constructor — spec_driver_constructor","text":"spec_driver_constructor","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_constructor.html","id":"construction-of-the-dbidriver-object","dir":"Reference","previous_headings":"","what":"Construction of the DBIDriver object","title":"spec_driver_constructor — spec_driver_constructor","text":"backend must support creation instance DBI::DBIDriver subclass constructor function. default, name package name without leading ‘R’ (exists), e.g., SQLite RSQLite package. However, backend authors may choose different name. constructor must exported, must function callable without arguments. DBI recommends define constructor empty argument list.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_data_type — spec_driver_data_type","title":"spec_driver_data_type — spec_driver_data_type","text":"spec_driver_data_type","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_driver_data_type — spec_driver_data_type","text":"dbDataType() returns SQL type corresponds obj argument non-empty character string. data frames, character vector one element per column returned.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_driver_data_type — spec_driver_data_type","text":"error raised invalid values obj argument NULL value.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_driver_data_type.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_driver_data_type — spec_driver_data_type","text":"backend can override DBI::dbDataType() generic driver class. generic expects arbitrary object second argument. query values returned default implementation, run example(dbDataType, package = \"DBI\"). backend needs override generic, must accept basic R data types second argument, namely logical, integer, numeric, character, dates (see Dates), date-time (see DateTimeClasses), difftime. database supports blobs, method also must accept lists raw vectors, blob::blob objects. -objects (.e., wrapped ()) must supported return results unwrapped counterparts. SQL data type factor ordered character. behavior object types specified.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_get_info.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_driver_get_info — spec_get_info","title":"spec_driver_get_info — spec_get_info","text":"spec_driver_get_info spec_connection_get_info spec_meta_get_info_result","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_get_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_driver_get_info — spec_get_info","text":"objects class DBI::DBIDriver, dbGetInfo() returns named list contains least following components: driver.version: package version DBI backend, client.version: version DBMS client library. objects class DBI::DBIConnection, dbGetInfo() returns named list contains least following components: db.version: version database server, dbname: database name, username: username connect database, host: hostname database server, port: port database server. must contain password component. Components applicable set NA. objects class DBI::DBIResult, dbGetInfo() returns named list contains least following components: statatment: statement used DBI::dbSendQuery() DBI::dbExecute(), returned DBI::dbGetStatement(), row.count: number rows fetched far (queries), returned DBI::dbGetRowCount(), rows.affected: number rows affected (statements), returned DBI::dbGetRowsAffected() .completed: logical indicates query statement completed, returned DBI::dbHasCompleted().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_getting_started.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_getting_started — spec_getting_started","title":"spec_getting_started — spec_getting_started","text":"spec_getting_started","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_getting_started.html","id":"definition","dir":"Reference","previous_headings":"","what":"Definition","title":"spec_getting_started — spec_getting_started","text":"DBI backend R package imports DBI methods packages. better worse, names many existing backends start ‘R’, e.g., RSQLite, RMySQL, RSQLServer; backend author adopt convention .","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_bind — spec_meta_bind","title":"spec_meta_bind — spec_meta_bind","text":"spec_meta_bind spec_meta_bind spec_meta_bind","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_bind — spec_meta_bind","text":"dbBind() returns result set, invisibly, queries issued DBI::dbSendQuery() DBI::dbSendQueryArrow() also data manipulation statements issued DBI::dbSendStatement().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_meta_bind — spec_meta_bind","text":"DBI clients execute parametrized statements follows: Call DBI::dbSendQuery(), DBI::dbSendQueryArrow() DBI::dbSendStatement() query statement contains placeholders, store returned DBI::DBIResult object variable. Mixing placeholders (particular, named unnamed ones) recommended. good practice register call DBI::dbClearResult() via .exit() right calling dbSendQuery() dbSendStatement() (see last enumeration item). DBI::dbBind() DBI::dbBindArrow() called, returned result set object following behavior: DBI::dbFetch() raises error (dbSendQuery() dbSendQueryArrow()) DBI::dbGetRowCount() returns zero (dbSendQuery() dbSendQueryArrow()) DBI::dbGetRowsAffected() returns integer NA (dbSendStatement()) DBI::dbIsValid() returns TRUE DBI::dbHasCompleted() returns FALSE Call DBI::dbBind() DBI::dbBindArrow(): DBI::dbBind(), params argument must list elements lengths contain values supported backend. data.frame internally stored list. DBI::dbBindArrow(), params argument must nanoarrow array stream, one column per query parameter. Retrieve data number affected rows DBIResult object. queries issued dbSendQuery() dbSendQueryArrow(), call DBI::dbFetch(). statements issued dbSendStatements(), call DBI::dbGetRowsAffected(). (Execution begins immediately DBI::dbBind() call, statement processed entirely function returns.) Repeat 2. 3. necessary. Close result set via DBI::dbClearResult(). elements params argument need scalars, vectors arbitrary length (including length 0) supported. queries, calling dbFetch() binding parameters returns concatenated results, equivalent binding fetching set values connecting via rbind(). data manipulation statements, dbGetRowsAffected() returns total number rows affected binding non-scalar parameters. dbBind() also accepts repeated calls result set queries data manipulation statements, even results fetched calls dbBind(), queries data manipulation statements. placeholders query named, order params argument important. least following data types accepted input (including NA): integer numeric logical Boolean values character (also special characters spaces, newlines, quotes, backslashes) factor (bound character, warning) lubridate::Date (also stored internally integer) lubridate::POSIXct timestamps POSIXlt timestamps difftime values (also units seconds value stored integer) lists raw blobs (NULL entries SQL NULL values) objects type blob::blob","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_bind.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_bind — spec_meta_bind","text":"Calling dbBind() query without parameters raises error. Binding many enough values, parameters wrong names unequal length, also raises error. placeholders query named, parameter values must names (must empty NA), vice versa, otherwise error raised. behavior mixing placeholders different types (particular mixing positional named placeholders) specified. Calling dbBind() result set already cleared DBI::dbClearResult() also raises error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_column_info — spec_meta_column_info","title":"spec_meta_column_info — spec_meta_column_info","text":"spec_meta_column_info","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_column_info — spec_meta_column_info","text":"dbColumnInfo() returns data frame least two columns \"name\" \"type\" (order) (optional columns start dot). \"name\" \"type\" columns contain names types R columns data frame returned DBI::dbFetch(). \"type\" column type character information. compute \"type\" column, instead use dbFetch(res, n = 0) create zero-row data frame initialized correct data types.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_column_info — spec_meta_column_info","text":"attempt query columns closed result set raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_column_info.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_meta_column_info — spec_meta_column_info","text":"column named row_names treated like column. column names always consistent data returned dbFetch(). query returns unnamed columns, non-empty non-NA names assigned. Column names correspond SQL R keywords left unchanged.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_row_count.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_get_row_count — spec_meta_get_row_count","title":"spec_meta_get_row_count — spec_meta_get_row_count","text":"spec_meta_get_row_count","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_row_count.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_get_row_count — spec_meta_get_row_count","text":"dbGetRowCount() returns scalar number (integer numeric), number rows fetched far. calling DBI::dbSendQuery(), row count initially zero. call DBI::dbFetch() without limit, row count matches total number rows returned. Fetching limited number rows increases number rows number rows returned, even fetching past end result set. queries empty result set, zero returned even fetching. data manipulation statements issued DBI::dbSendStatement(), zero returned calling dbFetch().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_row_count.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_get_row_count — spec_meta_get_row_count","text":"Attempting get row count result set cleared DBI::dbClearResult() gives error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_rows_affected.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","title":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","text":"spec_meta_get_rows_affected","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_rows_affected.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","text":"dbGetRowsAffected() returns scalar number (integer numeric), number rows affected data manipulation statement issued DBI::dbSendStatement(). value available directly call change calling DBI::dbFetch(). NA_integer_ NA_numeric_ allowed number rows affected known. queries issued DBI::dbSendQuery(), zero returned call dbFetch(). NA values allowed.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_rows_affected.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_get_rows_affected — spec_meta_get_rows_affected","text":"Attempting get rows affected result set cleared DBI::dbClearResult() gives error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_statement.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_get_statement — spec_meta_get_statement","title":"spec_meta_get_statement — spec_meta_get_statement","text":"spec_meta_get_statement","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_statement.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_get_statement — spec_meta_get_statement","text":"dbGetStatement() returns string, query used either DBI::dbSendQuery() DBI::dbSendStatement().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_get_statement.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_get_statement — spec_meta_get_statement","text":"Attempting query statement result set cleared DBI::dbClearResult() gives error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_has_completed — spec_meta_has_completed","title":"spec_meta_has_completed — spec_meta_has_completed","text":"spec_meta_has_completed","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_has_completed — spec_meta_has_completed","text":"dbHasCompleted() returns logical scalar. query initiated DBI::dbSendQuery() non-empty result set, dbHasCompleted() returns FALSE initially TRUE calling DBI::dbFetch() without limit. query initiated DBI::dbSendStatement(), dbHasCompleted() always returns TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_meta_has_completed — spec_meta_has_completed","text":"Attempting query completion status result set cleared DBI::dbClearResult() gives error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_has_completed.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_meta_has_completed — spec_meta_has_completed","text":"completion status query guaranteed set FALSE attempting fetch past end entire result. Therefore, query empty result set, initial return value unspecified, result value TRUE trying fetch one row. Similarly, query result set length n, return value unspecified fetching n rows, result value TRUE trying fetch one row.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_is_valid.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_meta_is_valid — spec_meta_is_valid","title":"spec_meta_is_valid — spec_meta_is_valid","text":"spec_meta_is_valid","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_meta_is_valid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_meta_is_valid — spec_meta_is_valid","text":"dbIsValid() returns logical scalar, TRUE object specified dbObj valid, FALSE otherwise. DBI::DBIConnection object initially valid, becomes invalid disconnecting DBI::dbDisconnect(). invalid connection object (e.g., drivers object saved file restored), method also returns FALSE. DBI::DBIResult object valid call DBI::dbSendQuery(), stays valid even rows fetched; clearing DBI::dbClearResult() invalidates . DBI::DBIResult object also valid call DBI::dbSendStatement(), stays valid querying number rows affected; clearing DBI::dbClearResult() invalidates . connection database system dropped (e.g., due connectivity problems, server failure, etc.), dbIsValid() return FALSE. tested automatically.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_clear_result — spec_result_clear_result","title":"spec_result_clear_result — spec_result_clear_result","text":"spec_result_clear_result","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_clear_result — spec_result_clear_result","text":"dbClearResult() returns TRUE, invisibly, result sets obtained dbSendQuery(), dbSendStatement(), dbSendQueryArrow(),","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_clear_result — spec_result_clear_result","text":"attempt close already closed result set issues warning dbSendQuery(), dbSendStatement(), dbSendQueryArrow(),","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_clear_result.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_clear_result — spec_result_clear_result","text":"dbClearResult() frees resources associated retrieving result query update operation. DBI backend can expect call dbClearResult() DBI::dbSendQuery() DBI::dbSendStatement() call.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_create_table_with_data_type.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_create_table_with_data_type — spec_result_create_table_with_data_type","title":"spec_result_create_table_with_data_type — spec_result_create_table_with_data_type","text":"spec_result_create_table_with_data_type","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_create_table_with_data_type.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_create_table_with_data_type — spec_result_create_table_with_data_type","text":"data types returned dbDataType() usable SQL statement form \"CREATE TABLE test (...)\".","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_execute — spec_result_execute","title":"spec_result_execute — spec_result_execute","text":"spec_result_execute","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_execute — spec_result_execute","text":"dbExecute() always returns scalar numeric specifies number rows affected statement.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_execute — spec_result_execute","text":"error raised issuing statement closed invalid connection, syntax statement invalid, statement non-NA string.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_execute — spec_result_execute","text":"following arguments part dbExecute() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_execute — spec_result_execute","text":"param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_execute.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_execute — spec_result_execute","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_fetch — spec_result_fetch","title":"spec_result_fetch — spec_result_fetch","text":"spec_result_fetch","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_fetch — spec_result_fetch","text":"dbFetch() always returns data.frame many rows records fetched many columns fields result set, even result single value one zero rows. Passing n = NA supported returns arbitrary number rows (least one) specified driver, remaining rows result set.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_fetch — spec_result_fetch","text":"attempt fetch closed result set raises error. n argument atomic whole number greater equal -1 Inf, error raised, subsequent call dbFetch() proper n argument succeeds. Calling dbFetch() result set data manipulation query created DBI::dbSendStatement() can fetched return empty data frame, warning.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_fetch.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_fetch — spec_result_fetch","text":"Fetching multi-row queries one columns default returns entire result. Multi-row queries can also fetched progressively passing whole number (integer numeric) n argument. value Inf n argument supported also returns full result. rows available fetched, result returned full without warning. fewer rows requested returned, fetches return data frame zero rows. zero rows fetched, columns data frame still fully typed. Fetching fewer rows available permitted, warning issued clearing result set. column named row_names treated like column.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_get_query — spec_result_get_query","title":"spec_result_get_query — spec_result_get_query","text":"spec_result_get_query","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_get_query — spec_result_get_query","text":"dbGetQuery() always returns data.frame, many rows records fetched many columns fields result set, even result single value one zero rows.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_get_query — spec_result_get_query","text":"error raised issuing query closed invalid connection, syntax query invalid, query non-NA string. n argument atomic whole number greater equal -1 Inf, error raised, subsequent call dbGetQuery() proper n argument succeeds.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_get_query — spec_result_get_query","text":"following arguments part dbGetQuery() generic (improve compatibility across backends) part DBI specification: n (default: -1) params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_get_query — spec_result_get_query","text":"column named row_names treated like column. n argument specifies number rows fetched. omitted, fetching multi-row queries one columns returns entire result. value Inf n argument supported also returns full result. rows available fetched (passing large value n), result returned full without warning. zero rows requested, columns data frame still fully typed. Fetching fewer rows available permitted, warning issued. param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_get_query.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_get_query — spec_result_get_query","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_roundtrip.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_roundtrip — spec_result_roundtrip","title":"spec_result_roundtrip — spec_result_roundtrip","text":"spec_result_roundtrip","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_roundtrip.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_roundtrip — spec_result_roundtrip","text":"column types returned data frame depend data returned: integer (coercible integer) integer values -2^31 2^31 - 1, NA SQL NULL values numeric numbers fractional component, NA SQL NULL values logical Boolean values (backends may return integer); NA SQL NULL values character text, NA SQL NULL values lists raw blobs NULL entries SQL NULL values coercible using .Date() dates, NA SQL NULL values (also applies return value SQL function current_date) coercible using hms::as_hms() times, NA SQL NULL values (also applies return value SQL function current_time) coercible using .POSIXct() timestamps, NA SQL NULL values (also applies return value SQL function current_timestamp) dates timestamps supported backend, following R types used: lubridate::Date dates (also applies return value SQL function current_date) lubridate::POSIXct timestamps (also applies return value SQL function current_timestamp) R built-type lossless support full range 64-bit larger integers. 64-bit integers returned query, following rules apply: Values returned container support full range valid 64-bit values (integer64 class bit64 package) Coercion numeric always returns number close possible true value Loss precision converting numeric gives warning Conversion character always returns lossless decimal representation data","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_send_query — spec_result_send_query","title":"spec_result_send_query — spec_result_send_query","text":"spec_result_send_query","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_send_query — spec_result_send_query","text":"dbSendQuery() returns S4 object inherits DBI::DBIResult. result set can used DBI::dbFetch() extract records. finished using result, make sure clear DBI::dbClearResult().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_send_query — spec_result_send_query","text":"error raised issuing query closed invalid connection, query non-NA string. error also raised syntax query invalid query parameters given (passing params argument) immediate argument set TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_send_query — spec_result_send_query","text":"following arguments part dbSendQuery() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_send_query — spec_result_send_query","text":"warnings occur normal conditions. done, DBIResult object must cleared call DBI::dbClearResult(). Failure clear result set leads warning connection closed. backend supports one open result set per connection, issuing second query invalidates already open result set raises warning. newly opened result set valid must cleared dbClearResult(). param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_query.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_send_query — spec_result_send_query","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_result_send_statement — spec_result_send_statement","title":"spec_result_send_statement — spec_result_send_statement","text":"spec_result_send_statement","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_result_send_statement — spec_result_send_statement","text":"dbSendStatement() returns S4 object inherits DBI::DBIResult. result set can used DBI::dbGetRowsAffected() determine number rows affected query. finished using result, make sure clear DBI::dbClearResult().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_result_send_statement — spec_result_send_statement","text":"error raised issuing statement closed invalid connection, statement non-NA string. error also raised syntax query invalid query parameters given (passing params argument) immediate argument set TRUE.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_result_send_statement — spec_result_send_statement","text":"warnings occur normal conditions. done, DBIResult object must cleared call DBI::dbClearResult(). Failure clear result set leads warning connection closed. backend supports one open result set per connection, issuing second query invalidates already open result set raises warning. newly opened result set valid must cleared dbClearResult(). param argument allows passing query parameters, see DBI::dbBind() details.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_result_send_statement — spec_result_send_statement","text":"following arguments part dbSendStatement() generic (improve compatibility across backends) part DBI specification: params (default: NULL) immediate (default: NULL) must provided named arguments. See \"Specification\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_result_send_statement.html","id":"specification-for-the-immediate-argument","dir":"Reference","previous_headings":"","what":"Specification for the immediate argument","title":"spec_result_send_statement — spec_result_send_statement","text":"immediate argument supports distinguishing \"direct\" \"prepared\" APIs offered many database drivers. Passing immediate = TRUE leads immediate execution query statement, via \"direct\" API (supported driver). default NULL means backend choose whatever API makes sense database, (relevant) tries API first attempt fails. successful second attempt result message suggests passing correct immediate argument. Examples possible behaviors: DBI backend defaults immediate = TRUE internally query without parameters passed: query executed query parameters passed: params given: rejected immediately database syntax error query, backend tries immediate = FALSE (gives message) params given: query executed using immediate = FALSE DBI backend defaults immediate = FALSE internally query without parameters passed: simple query: query executed \"special\" query (setting config options): fails, backend tries immediate = TRUE (gives message) query parameters passed: params given: waiting parameters via DBI::dbBind() params given: query executed","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_append_table — spec_sql_append_table","title":"spec_sql_append_table — spec_sql_append_table","text":"spec_sql_append_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_append_table — spec_sql_append_table","text":"dbAppendTable() returns scalar numeric.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_append_table — spec_sql_append_table","text":"table exist, new data values data frame different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values row.names argument (non-scalars, unsupported data types, NA) also raise error. Passing value argument different NULL row.names argument (particular TRUE, NA, string) raises error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_append_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_append_table — spec_sql_append_table","text":"SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings (non-empty strings) factor (returned character, warning) list raw (supported database) objects type blob::blob (supported database) date (supported database; returned Date) also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported. name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbAppendTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done support databases allow non-syntactic names objects: row.names argument must NULL, default value. Row names ignored. value argument must data frame subset columns existing table. order columns matter.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_create_table — spec_sql_create_table","title":"spec_sql_create_table — spec_sql_create_table","text":"spec_sql_create_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_create_table — spec_sql_create_table","text":"dbCreateTable() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_create_table — spec_sql_create_table","text":"table exists, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values row.names temporary arguments (non-scalars, unsupported data types, NA, incompatible values, duplicate names) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_create_table — spec_sql_create_table","text":"following arguments part dbCreateTable() generic (improve compatibility across backends) part DBI specification: temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_create_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_create_table — spec_sql_create_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbCreateTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument can : data frame, named list SQL types temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces can also used table names column names, database supports non-syntactic identifiers. row.names argument must missing NULL, default value. values row.names argument (particular TRUE, NA, string) raise error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_exists_table — spec_sql_exists_table","title":"spec_sql_exists_table — spec_sql_exists_table","text":"spec_sql_exists_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_exists_table — spec_sql_exists_table","text":"dbExistsTable() returns logical scalar, TRUE table view specified name argument exists, FALSE otherwise. includes temporary tables supported database.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_exists_table — spec_sql_exists_table","text":"error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_exists_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_exists_table — spec_sql_exists_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbExistsTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done tables listed DBI::dbListTables(), dbExistsTable() returns TRUE.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_list_fields — spec_sql_list_fields","title":"spec_sql_list_fields — spec_sql_list_fields","text":"spec_sql_list_fields","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_list_fields — spec_sql_list_fields","text":"dbListFields() returns character vector enumerates fields table correct order. also works temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_list_fields — spec_sql_list_fields","text":"table exist, error raised. Invalid types name argument (e.g., character length equal one, numeric) lead error. error also raised calling method closed invalid connection.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_fields.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_list_fields — spec_sql_list_fields","text":"name argument can string return value DBI::dbQuoteIdentifier() value table column return value DBI::dbListObjects() is_prefix FALSE column named row_names treated like column.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_list_objects — spec_sql_list_objects","title":"spec_sql_list_objects — spec_sql_list_objects","text":"spec_sql_list_objects","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_list_objects — spec_sql_list_objects","text":"dbListObjects() returns data frame columns table is_prefix (order), optionally columns dot (.) prefix. table column type list. object list suitable use argument DBI::dbQuoteIdentifier(). is_prefix column logical. data frame contains one row object (schema, table view) accessible prefix (passed) global namespace (prefix omitted). Tables added DBI::dbWriteTable() part data frame. soon table removed database, also removed data frame database objects. applies temporary objects supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_list_objects — spec_sql_list_objects","text":"error raised calling method closed invalid connection.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_objects.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_list_objects — spec_sql_list_objects","text":"prefix column indicates table value refers table prefix. call default prefix = NULL, table values is_prefix == FALSE correspond tables returned DBI::dbListTables(), table object can quoted DBI::dbQuoteIdentifier(). result quoting can passed DBI::dbUnquoteIdentifier(). (backends may convenient use DBI::Id class, required.) Values table column is_prefix == TRUE can passed prefix argument another call dbListObjects(). data frame returned dbListObject() call prefix argument set, table values is_prefix FALSE can used call DBI::dbExistsTable() returns TRUE.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_tables.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_list_tables — spec_sql_list_tables","title":"spec_sql_list_tables — spec_sql_list_tables","text":"spec_sql_list_tables","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_tables.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_list_tables — spec_sql_list_tables","text":"dbListTables() returns character vector enumerates tables views database. Tables added DBI::dbWriteTable() part list. soon table removed database, also removed list database tables. applies temporary tables supported database. returned names suitable quoting dbQuoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_list_tables.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_list_tables — spec_sql_list_tables","text":"error raised calling method closed invalid connection.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_quote_identifier — spec_sql_quote_identifier","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"spec_sql_quote_identifier","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"dbQuoteIdentifier() returns object can coerced character, length input. empty character vector function returns length-0 object. names input argument preserved output. passing returned object dbQuoteIdentifier() x argument, returned unchanged. Passing objects class DBI::SQL also return unchanged. (backends may convenient return DBI::SQL objects achieve behavior, required.)","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"error raised input contains NA, empty string.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_identifier.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_quote_identifier — spec_sql_quote_identifier","text":"Calling DBI::dbGetQuery() query format SELECT 1 ... returns data frame identifier, unquoted, column name. Quoted identifiers can used table column names SQL queries, particular queries like SELECT 1 ... SELECT * (SELECT 1) .... method must use quoting mechanism unambiguously different quoting mechanism used strings, query like SELECT ... (SELECT 1 ...) throws error column names match. method can quote column names contain special characters space, dot, comma, quotes used mark strings identifiers, database supports . case, checking validity identifier performed executing query, dbQuoteIdentifier().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_quote_literal — spec_sql_quote_literal","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"spec_sql_quote_literal","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"dbQuoteLiteral() returns object can coerced character, length input. empty integer, numeric, character, logical, date, time, blob vector, function returns length-0 object. passing returned object dbQuoteLiteral() x argument, returned unchanged. Passing objects class DBI::SQL also return unchanged. (backends may convenient return DBI::SQL objects achieve behavior, required.)","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"returned expression can used SELECT ... query, value dbGetQuery(paste0(\"SELECT \", dbQuoteLiteral(x)))[[1]] must equal x scalar integer, numeric, string, logical. x NA, result must merely satisfy .na(). literals \"NA\" \"NULL\" treated specially. NA translated unquoted SQL NULL, query SELECT * (SELECT 1) ... NULL returns one row.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_literal.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_quote_literal — spec_sql_quote_literal","text":"Passing list x argument raises error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_quote_string — spec_sql_quote_string","title":"spec_sql_quote_string — spec_sql_quote_string","text":"spec_sql_quote_string","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_quote_string — spec_sql_quote_string","text":"dbQuoteString() returns object can coerced character, length input. empty character vector function returns length-0 object. passing returned object dbQuoteString() x argument, returned unchanged. Passing objects class DBI::SQL also return unchanged. (backends may convenient return DBI::SQL objects achieve behavior, required.)","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_quote_string — spec_sql_quote_string","text":"returned expression can used SELECT ... query, scalar character x value dbGetQuery(paste0(\"SELECT \", dbQuoteString(x)))[[1]] must identical x, even x contains spaces, tabs, quotes (single double), backticks, newlines (combination) result dbQuoteString() call coerced back character (even repeatedly). x NA, result must merely satisfy .na(). strings \"NA\" \"NULL\" treated specially. NA translated unquoted SQL NULL, query SELECT * (SELECT 1) ... NULL returns one row.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_quote_string.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_quote_string — spec_sql_quote_string","text":"Passing numeric, integer, logical, raw vector, list x argument raises error.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_read_table — spec_sql_read_table","title":"spec_sql_read_table — spec_sql_read_table","text":"spec_sql_read_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_read_table — spec_sql_read_table","text":"dbReadTable() returns data frame contains complete data remote table, effectively result calling DBI::dbGetQuery() SELECT * . empty table returned data frame zero rows. presence rownames depends row.names argument, see DBI::sqlColumnToRownames() details: FALSE NULL, returned data frame row names. TRUE, column named \"row_names\" converted row names. NA, column named \"row_names\" converted row names exists, otherwise translation occurs. string, specifies name column remote table contains row names. default row.names = FALSE. database supports identifiers special characters, columns returned data frame converted valid R identifiers check.names argument TRUE, check.names = FALSE, returned table non-syntactic column names without quotes.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_read_table — spec_sql_read_table","text":"error raised table exist. error raised row.names TRUE \"row_names\" column exists, error raised row.names set string corresponding column exists. error raised calling method closed invalid connection. error raised name processed DBI::dbQuoteIdentifier() results non-scalar. Unsupported values row.names check.names (non-scalars, unsupported data types, NA check.names) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_read_table — spec_sql_read_table","text":"following arguments part dbReadTable() generic (improve compatibility across backends) part DBI specification: row.names (default: FALSE) check.names must provided named arguments. See \"Value\" section details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_read_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_read_table — spec_sql_read_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbReadTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_remove_table — spec_sql_remove_table","title":"spec_sql_remove_table — spec_sql_remove_table","text":"spec_sql_remove_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_remove_table — spec_sql_remove_table","text":"dbRemoveTable() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_remove_table — spec_sql_remove_table","text":"table exist, error raised. attempt remove view function may result error. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_remove_table — spec_sql_remove_table","text":"following arguments part dbRemoveTable() generic (improve compatibility across backends) part DBI specification: temporary (default: FALSE) fail_if_missing (default: TRUE) arguments must provided named arguments. temporary TRUE, call dbRemoveTable() consider temporary tables. backends support argument. particular, permanent tables name left untouched. fail_if_missing FALSE, call dbRemoveTable() succeeds table exist.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_remove_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_remove_table — spec_sql_remove_table","text":"table removed dbRemoveTable() appear list tables returned DBI::dbListTables(), DBI::dbExistsTable() returns FALSE. removal propagates immediately connections database. function can also used remove temporary table. name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbRemoveTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"spec_sql_unquote_identifier","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"dbUnquoteIdentifier() returns list objects length input. empty vector, function returns length-0 object. names input argument preserved output. x value returned dbUnquoteIdentifier(), calling dbUnquoteIdentifier(..., dbQuoteIdentifier(..., x)) returns list(x). x object class DBI::Id, calling dbUnquoteIdentifier(..., x) returns list(x). (backends may convenient return DBI::Id objects achieve behavior, required.) Plain character vectors can also passed dbUnquoteIdentifier().","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"error raised character vectors missing value passed x argument.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_unquote_identifier.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_unquote_identifier — spec_sql_unquote_identifier","text":"character vector length one, quoting (DBI::dbQuoteIdentifier()) unquoting quoting first element identical just quoting. also true strings contain special characters space, dot, comma, quotes used mark strings identifiers, database supports . Unquoting simple strings (consisting letters) wrapped DBI::SQL() quoting via DBI::dbQuoteIdentifier() gives result just quoting string. Similarly, unquoting expressions form SQL(\"schema.table\") quoting gives result quoting identifier constructed Id(\"schema\", \"table\").","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_sql_write_table — spec_sql_write_table","title":"spec_sql_write_table — spec_sql_write_table","text":"spec_sql_write_table","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_sql_write_table — spec_sql_write_table","text":"dbWriteTable() returns TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_sql_write_table — spec_sql_write_table","text":"table exists, append overwrite arguments unset, append = TRUE data frame new data different column names, error raised; remote table remains unchanged. error raised calling method closed invalid connection. error also raised name processed DBI::dbQuoteIdentifier() results non-scalar. Invalid values additional arguments row.names, overwrite, append, field.types, temporary (non-scalars, unsupported data types, NA, incompatible values, duplicate missing names, incompatible columns) also raise error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"additional-arguments","dir":"Reference","previous_headings":"","what":"Additional arguments","title":"spec_sql_write_table — spec_sql_write_table","text":"following arguments part dbWriteTable() generic (improve compatibility across backends) part DBI specification: row.names (default: FALSE) overwrite (default: FALSE) append (default: FALSE) field.types (default: NULL) temporary (default: FALSE) must provided named arguments. See \"Specification\" \"Value\" sections details usage.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_sql_write_table.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_sql_write_table — spec_sql_write_table","text":"name argument processed follows, support databases allow non-syntactic names objects: unquoted table name string: dbWriteTable() quoting, perhaps calling dbQuoteIdentifier(conn, x = name) result call DBI::dbQuoteIdentifier(): quoting done value argument must data frame subset columns existing table append = TRUE. order columns matter append = TRUE. overwrite argument TRUE, existing table name overwritten. argument change behavior table exist yet. append argument TRUE, rows existing table preserved, new data appended. table exist yet, created. temporary argument TRUE, table available second connection gone reconnecting. backends support argument. regular, non-temporary table visible second connection, pre-existing connection, reconnecting database. SQL keywords can used freely table names, column names, data. Quotes, commas, spaces, special characters newlines tabs, can also used data, , database supports non-syntactic identifiers, also table names column names. following data types must supported least, read identically DBI::dbReadTable(): integer numeric (behavior Inf NaN specified) logical NA NULL 64-bit values (using \"bigint\" field type); result can converted numeric, may lose precision, converted character vector, gives full decimal representation written another table read unchanged character (UTF-8 native encodings), supporting empty strings non-empty string factor (returned character) list raw (supported database) objects type blob::blob (supported database) date (supported database; returned Date), also dates prior 1970 1900 2038 time (supported database; returned objects inherit difftime) timestamp (supported database; returned POSIXct respecting time zone necessarily preserving input time zone), also timestamps prior 1970 1900 2038 respecting time zone necessarily preserving input time zone) Mixing column types table supported. field.types argument must named character vector one entry column. indicates SQL data type used new column. column missed field.types, type inferred input data DBI::dbDataType(). interpretation rownames depends row.names argument, see DBI::sqlRownamesToColumn() details: FALSE NULL, row names ignored. TRUE, row names converted column named \"row_names\", even input data frame natural row names 1 nrow(...). NA, column named \"row_names\" created data custom row names, extra column created case natural row names. string, specifies name column remote table contains row names, even input data frame natural row names. default row.names = FALSE.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"spec_transaction_begin_commit_rollback","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"dbBegin(), dbCommit() dbRollback() return TRUE, invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"implementations expected raise error case failure, tested. way, generics throw error closed invalid connection. addition, call dbCommit() dbRollback() without prior call dbBegin() raises error. Nested transactions supported DBI, attempt call dbBegin() twice yields error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_begin_commit_rollback.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_transaction_begin_commit_rollback — spec_transaction_begin_commit_rollback","text":"Actual support transactions may vary backends. transaction initiated call dbBegin() committed call dbCommit(). Data written transaction must persist transaction committed. example, record missing transaction started created transaction must exist transaction, also new connection. transaction can also aborted dbRollback(). data written transaction must removed transaction rolled back. example, record missing transaction started created transaction must exist anymore rollback. Disconnection connection open transaction effectively rolls back transaction. data written transaction must removed transaction rolled back. behavior specified arguments passed functions. particular, RSQLite issues named transactions support nesting name argument set. transaction isolation level specified DBI.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":null,"dir":"Reference","previous_headings":"","what":"spec_transaction_with_transaction — spec_transaction_with_transaction","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"spec_transaction_with_transaction","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"dbWithTransaction() returns value executed code.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"Failure initiate transaction (e.g., connection closed invalid DBI::dbBegin() called already) gives error.","code":""},{"path":"https://dbitest.r-dbi.org/reference/spec_transaction_with_transaction.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"spec_transaction_with_transaction — spec_transaction_with_transaction","text":"dbWithTransaction() initiates transaction dbBegin(), executes code given code argument, commits transaction DBI::dbCommit(). code raises error, transaction instead aborted DBI::dbRollback(), error propagated. code calls dbBreak(), execution code stops transaction silently aborted. side effects caused code (creation new variables) propagate calling environment.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":null,"dir":"Reference","previous_headings":"","what":"Run all tests — test_all","title":"Run all tests — test_all","text":"test_all() calls tests defined package (see section \"Tests\" ). function supports running one test setting environment variable, e.g., set DBITEST_ONLY_RESULT nonempty value run test_result(). test_some() allows testing one tests.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run all tests — test_all","text":"","code":"test_all(skip = NULL, run_only = NULL, ctx = get_default_context()) test_some(test, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run all tests — test_all","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context(). test [character] character vector regular expressions describing tests run. regular expressions matched entire test name.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run all tests — test_all","text":"Internally ^ $ used prefix suffix around regular expressions passed skip run_only arguments.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_all.html","id":"tests","dir":"Reference","previous_headings":"","what":"Tests","title":"Run all tests — test_all","text":"function runs following tests, except stress tests: test_getting_started(): Getting started testing test_driver(): Test \"Driver\" class test_connection(): Test \"Connection\" class test_result(): Test \"Result\" class test_sql(): Test SQL methods test_meta(): Test metadata functions test_transaction(): Test transaction functions test_arrow(): Test Arrow methods test_compliance(): Test full compliance DBI test_stress(): Stress tests (tested test_all)","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_arrow.html","id":null,"dir":"Reference","previous_headings":"","what":"Test Arrow methods — test_arrow","title":"Test Arrow methods — test_arrow","text":"Test Arrow methods","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_arrow.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test Arrow methods — test_arrow","text":"","code":"test_arrow(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_arrow.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test Arrow methods — test_arrow","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_compliance.html","id":null,"dir":"Reference","previous_headings":"","what":"Test full compliance to DBI — test_compliance","title":"Test full compliance to DBI — test_compliance","text":"Test full compliance DBI","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_compliance.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test full compliance to DBI — test_compliance","text":"","code":"test_compliance(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_compliance.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test full compliance to DBI — test_compliance","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_connection.html","id":null,"dir":"Reference","previous_headings":"","what":"Test the ","title":"Test the ","text":"Test \"Connection\" class","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_connection.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test the ","text":"","code":"test_connection(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_connection.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test the ","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":null,"dir":"Reference","previous_headings":"","what":"test_data_type — test_data_type","title":"test_data_type — test_data_type","text":"test_data_type","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"test_data_type — test_data_type","text":"","code":"test_data_type(ctx, dbObj)"},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"test_data_type — test_data_type","text":"ctx, dbObj Arguments internal test function","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"test_data_type — test_data_type","text":"dbDataType() returns SQL type corresponds obj argument non-empty character string. data frames, character vector one element per column returned.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"failure-modes","dir":"Reference","previous_headings":"","what":"Failure modes","title":"test_data_type — test_data_type","text":"error raised invalid values obj argument NULL value.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_data_type.html","id":"specification","dir":"Reference","previous_headings":"","what":"Specification","title":"test_data_type — test_data_type","text":"backend can override DBI::dbDataType() generic driver class. generic expects arbitrary object second argument. query values returned default implementation, run example(dbDataType, package = \"DBI\"). backend needs override generic, must accept basic R data types second argument, namely logical, integer, numeric, character, dates (see Dates), date-time (see DateTimeClasses), difftime. database supports blobs, method also must accept lists raw vectors, blob::blob objects. -objects (.e., wrapped ()) must supported return results unwrapped counterparts. SQL data type factor ordered character. behavior object types specified.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_driver.html","id":null,"dir":"Reference","previous_headings":"","what":"Test the ","title":"Test the ","text":"Test \"Driver\" class","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_driver.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test the ","text":"","code":"test_driver(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_driver.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test the ","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_getting_started.html","id":null,"dir":"Reference","previous_headings":"","what":"Getting started with testing — test_getting_started","title":"Getting started with testing — test_getting_started","text":"Tests basic features DBI driver package, support testing test-first development right start.","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_getting_started.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Getting started with testing — test_getting_started","text":"","code":"test_getting_started(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_getting_started.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Getting started with testing — test_getting_started","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_meta.html","id":null,"dir":"Reference","previous_headings":"","what":"Test metadata functions — test_meta","title":"Test metadata functions — test_meta","text":"Test metadata functions","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_meta.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test metadata functions — test_meta","text":"","code":"test_meta(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_meta.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test metadata functions — test_meta","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_result.html","id":null,"dir":"Reference","previous_headings":"","what":"Test the ","title":"Test the ","text":"Test \"Result\" class","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_result.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test the ","text":"","code":"test_result(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_result.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test the ","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_sql.html","id":null,"dir":"Reference","previous_headings":"","what":"Test SQL methods — test_sql","title":"Test SQL methods — test_sql","text":"Test SQL methods","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_sql.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test SQL methods — test_sql","text":"","code":"test_sql(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_sql.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test SQL methods — test_sql","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_stress.html","id":null,"dir":"Reference","previous_headings":"","what":"Stress tests — test_stress","title":"Stress tests — test_stress","text":"Stress tests","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_stress.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stress tests — test_stress","text":"","code":"test_stress(skip = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_stress.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stress tests — test_stress","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/test_transaction.html","id":null,"dir":"Reference","previous_headings":"","what":"Test transaction functions — test_transaction","title":"Test transaction functions — test_transaction","text":"Test transaction functions","code":""},{"path":"https://dbitest.r-dbi.org/reference/test_transaction.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test transaction functions — test_transaction","text":"","code":"test_transaction(skip = NULL, run_only = NULL, ctx = get_default_context())"},{"path":"https://dbitest.r-dbi.org/reference/test_transaction.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test transaction functions — test_transaction","text":"skip [character()] vector regular expressions match test names; skip test matching . regular expressions matched entire test name minus possible suffix _N N number. example, skip = \"exists_table\" skip \"exists_table_1\" \"exists_table_2\". run_only [character()] vector regular expressions match test names; run tests. regular expressions matched entire test name. ctx [DBItest_context] test context created make_context().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":null,"dir":"Reference","previous_headings":"","what":"Tweaks for DBI tests — tweaks","title":"Tweaks for DBI tests — tweaks","text":"tweaks way control behavior certain tests. Currently, need search DBItest source code understand tests affected tweaks. function usually called set tweaks argument make_context() call.","code":""},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tweaks for DBI tests — tweaks","text":"","code":"tweaks( ..., constructor_name = NULL, constructor_relax_args = FALSE, strict_identifier = FALSE, omit_blob_tests = FALSE, current_needs_parens = FALSE, union = function(x) paste(x, collapse = \" UNION \"), placeholder_pattern = NULL, logical_return = identity, date_cast = function(x) paste0(\"date('\", x, \"')\"), time_cast = function(x) paste0(\"time('\", x, \"')\"), timestamp_cast = function(x) paste0(\"timestamp('\", x, \"')\"), blob_cast = identity, date_typed = TRUE, time_typed = TRUE, timestamp_typed = TRUE, temporary_tables = TRUE, list_temporary_tables = TRUE, allow_na_rows_affected = FALSE, is_null_check = function(x) paste0(\"(\", x, \" IS NULL)\"), create_table_as = function(table_name, query) paste0(\"CREATE TABLE \", table_name, \" AS \", query), dbitest_version = \"1.7.1\" )"},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tweaks for DBI tests — tweaks","text":"... [] Unknown tweaks accepted, warning. ellipsis also makes sure can pass named arguments. constructor_name [character(1)] Name function constructs Driver object. constructor_relax_args [logical(1)] TRUE, allow driver constructor default values arguments; otherwise, require constructor empty argument list (default). strict_identifier [logical(1)] Set TRUE DBMS support arbitrarily-named identifiers even quoting used. omit_blob_tests [logical(1)] Set TRUE DBMS support BLOB data type. current_needs_parens [logical(1)] Set TRUE SQL functions current_date, current_time, current_timestamp require parentheses. union [function(character)] Function combines several subqueries one resulting query returns concatenated results subqueries placeholder_pattern [character] pattern placeholders used DBI::dbBind(), e.g., \"?\", \"$1\", \":name\". See make_placeholder_fun() details. logical_return [function(logical)] vectorized function converts logical values data type returned DBI backend. date_cast [function(character)] vectorized function creates SQL expression coercing string date value. time_cast [function(character)] vectorized function creates SQL expression coercing string time value. timestamp_cast [function(character)] vectorized function creates SQL expression coercing string timestamp value. blob_cast [function(character)] vectorized function creates SQL expression coercing string blob value. date_typed [logical(1L)] Set FALSE DBMS support dedicated type dates. time_typed [logical(1L)] Set FALSE DBMS support dedicated type times. timestamp_typed [logical(1L)] Set FALSE DBMS support dedicated type timestamps. temporary_tables [logical(1L)] Set FALSE DBMS support temporary tables. list_temporary_tables [logical(1L)] Set FALSE DBMS support listing temporary tables. allow_na_rows_affected [logical(1L)] Set TRUE allow DBI::dbGetRowsAffected() return NA. is_null_check [function(character)] vectorized function creates SQL expression checking value NULL. create_table_as [function(character(1), character(1))] function creates SQL expression creating table SQL expression. dbitest_version [character(1)] Compatible DBItest version, default: \"1.7.1\".","code":""},{"path":"https://dbitest.r-dbi.org/reference/tweaks.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tweaks for DBI tests — tweaks","text":"","code":"if (FALSE) { # \\dontrun{ make_context(..., tweaks = tweaks(strict_identifier = TRUE)) } # }"},{"path":"https://dbitest.r-dbi.org/security.html","id":null,"dir":"","previous_headings":"","what":"Process for reporting security vulnerabilities","title":"Process for reporting security vulnerabilities","text":"reporting security vulnerability, please e-mail package maintainer krlmlr+r@mailbox.org instructions. include confidential information e-mail.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-8-2","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.8.2 (2024-12-07)","text":"explicit message constructive errors. Bump DBI dependency.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-8-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.8.2 (2024-12-07)","text":"Set BS version explicitly now (@maelle, #370). Add package \\link{} targets.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"testing-1-8-2","dir":"Changelog","previous_headings":"","what":"Testing","title":"DBItest 1.8.2 (2024-12-07)","text":"Adapt tests updates constructive package.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-8-1","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.8.1 (2024-03-31)","text":"Allow multiple warnings disconnect tests (#363). Fix specification Arrow tests (#357). Show DBItest function backtrace (#349, #354). Specify value argument dbCreateTable() dbCreateTableArrow() (#345). Enable two tests dbGetQueryArrow() (#342). Relax dbListObjects() spec (#339, #341).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-8-1","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.8.1 (2024-03-31)","text":"Avoid dplyr (#364). Remove .dots argument test_select_with_null() (#362). Prefer map() lapply() (#361) map_*() vapply() (#356). Bump DBI dependency fix tests (#359). Document sources autogenerated files (#353), add comments generated code (#358). Make test names unique, numeric suffix (#355). Align RSQLite (#351). Replace unconditional skip versioned skip (#347). Consistent use skip_if_not_dbitest() (#346).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"continuous-integration-1-8-1","dir":"Changelog","previous_headings":"","what":"Continuous integration","title":"DBItest 1.8.1 (2024-03-31)","text":"Modernize backends checks.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-8-1","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.8.1 (2024-03-31)","text":"Use dbitemplate (@maelle, #360). Mention dbBindArrow() documentation (#350). Minor specification fixes (#344).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-8-0","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.8.0 (2023-12-21)","text":"Fix create_roundtrip_keywords create_roundtrip_quotes tests (#283).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-8-0","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.8.0 (2023-12-21)","text":"Relax specification dbUnquoteIdentifier(), character vectors now allowed . Specify dbFetchChunk() (#331), dbFetchArrowChunk() (#301) dbBindArrow() (#328). Inline tests dbBind() (#326). Require support dbFetch(n = NA) (#296, #316). New allow_na_rows_affected tweak support NA values returned dbGetRowsAffected() (#297, #312). Switch nanoarrow (#291). Basic tests new db*Arrow() interface (#287). New skip_if_not_dbitest() (#289). reexport test uses interface dev DBI backend compatible DBItest > 1.7.3. Slightly better code generated tweaks() (#313). Remove interface dblog CRAN version.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"cicd-1-8-0","dir":"Changelog","previous_headings":"","what":"CI/CD","title":"DBItest 1.8.0 (2023-12-21)","text":"Add adbi check matrix (#314). Reenable ODBC MySQL tests (#288). Tweak read_table_missing test (#285).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-8-0","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.8.0 (2023-12-21)","text":"Remove rlang qualification (#332). longer need .data.frame() twice Arrow (#302, #330). Consistent use skip_if_not_dbitest() (#317). Disable Arrow skips (#303). Modernize sql_union() (#304). Make better use trivial_df() (#284).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-8-0","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.8.0 (2023-12-21)","text":"Avoid error RSQLite installed.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"testing-1-8-0","dir":"Changelog","previous_headings":"","what":"Testing","title":"DBItest 1.8.0 (2023-12-21)","text":"Run DBItest SQLite part checks (#318). Enable remaining Arrow tests (#307). Fix checks without suggested packages (#300).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-7-3","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.7.3 (2022-10-18)","text":"Use enable compatibility testthat edition 3 (#263, #268). Complete removal expect_is() (@MichaelChirico, #257). Adapt new Arrow DBI generics (#265). Better stack traces visibility tests. dbQuoteIdentifier() roundtrip tested tables (@dpprdan, #256). test_some() also tests test normally skipped.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"chore-1-7-3","dir":"Changelog","previous_headings":"","what":"Chore","title":"DBItest 1.7.3 (2022-10-18)","text":"Bump minimum DBI version 1.1.3. Refactor DBI tests preparation inlining .","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-7-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.7.3 (2022-10-18)","text":"Correct cleanup even dbIsValid() implemented.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-7-2","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.7.2 (2021-12-17)","text":"tweaks() gains dbitest_version argument support targeting specific version DBItest package. default 1.7.1 (#236). Reuse database connection tests (#245). New roundtrip_date_extended, roundtrip_timestamp_extended, append_roundtrip_date_extended append_roundtrip_timestamp_extended test dates 1800 2999 (#148, #249). New quote_literal_empty test (#248). New bind_character_escape test binding special characters (#242). New bind_time_minutes_integer test integer durations.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-7-2","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.7.2 (2021-12-17)","text":"column names specified using lowercase input, compatibility Redshift (#234). column_info_consistent longer tests mangling column names (#181). spec_sql_append_table test: Remove bad argument.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"documentation-1-7-2","dir":"Changelog","previous_headings":"","what":"Documentation","title":"DBItest 1.7.2 (2021-12-17)","text":"Improve documentation: list spec_ objects pkgdown help index, add cross references (#128). Add specification value argument DBI::dbWriteTable() (#235).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-7-2","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.7.2 (2021-12-17)","text":"Replace internal with_result(), with_remove_test_tables() with_rollback_on_error() better error traces (#184, #250, #251, #253). Use palmerpenguins::penguins instead iris (#241). Fix MySQL ODBC test GitHub Actions (#237). Improve testthat 3e compatibility: remove testthat::expect_is() testthat::expect_that() tests (#231, @michaelquinn32). Decompose query used testing dbBind().","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-7-1","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.7.1 (2021-07-30)","text":"Many tests now emit simpler stack traces, connection opened test driver test (#187). Reduce usage with_remove_test_table() better stack traces error (#196). Remove with_*connection() (#193). test_some() shows DBI code via dblog (#217) dblog = TRUE (#226). New \"bind_date_integer\", \"bind_time_seconds\" \"bind_time_hours\" tests (#218). New create_table_as tweak (#131). \"roundtrip_time\" \"append_roundtrip_time\" tests now also test values class \"difftime\" units \"secs\" (#199). tables created tests \"dbit\" prefix. Almost tests now use random table names avoid collisions unrelated test failures (#197). \"roundtrip_timestamp\" tests now accept time zone set database backend (#178, #198). Support one class type DBI backend packages.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-7-1","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.7.1 (2021-07-30)","text":"Fix input dataset \"overwrite_table_missing\" test (#210, @martinstuder). Use original test name decide test skipped (#225). Fix reexport test: skip package installed, remove checks deprecated functions functions reexported (#203).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-7-1","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.7.1 (2021-07-30)","text":"Requires DBI 1.1.1. Test odbc part backend tests (#228). Dynamic build matrix backends (#221). Compatibility testthat 3.0.0 (#207). Switch GitHub Actions (#201).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"specifications-1-7-0","dir":"Changelog","previous_headings":"","what":"Specifications","title":"DBItest 1.7.0 (2019-12-16)","text":"Specify tests dbGetInfo(). Specify immediate argument (r-dbi/DBI#268). Specify dbCreateTable() dbAppendTable() (#169). New unquote_identifier_table_schema test: Identifiers form table.schema can processed dbUnquoteIdentifier(). Fix has_completed_statement test (#176).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"testing-infrastructure-1-7-0","dir":"Changelog","previous_headings":"","what":"Testing infrastructure","title":"DBItest 1.7.0 (2019-12-16)","text":"Document run tests externally debug tests (#165). test_*() gain new run_only = NULL argument allow restricting tests run positive match. test_some() uses run_only instead constructing regular expression negative lookahead. helps troubleshooting single test testthat::set_reporter(DebugReporter$new()) . make_context() gains default_skip argument uses DBIConnector class. Support NULL default value driver constructor (#171).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-7-0","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.7.0 (2019-12-16)","text":"Fulfill CII badge requirements (#179, @TSchiefer). Use debugme. Require R 3.2. Avoid subsetting vectors bounds, consistency vctrs.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"new-checks-1-6-0","dir":"Changelog","previous_headings":"","what":"New checks","title":"DBItest 1.6.0 (2018-05-03)","text":"Now checking Id() reexported. Support temporary argument dbRemoveTable() (default: FALSE) (r-dbi/DBI#141). Added specification behavior case duplicate column names (#137). bigint argument dbConnect() now specified. Accepts \"integer64\", \"integer\", \"numeric\" \"character\", large integers returned values type (#133). Add specification partially filled field.types argument. Specify dbRemoveTable(fail_if_missing = FALSE) (r-dbi/DBI#197). Add specification dbColumnInfo() (r-dbi/DBI#75). Add specification dbListFields() (r-dbi/DBI#75). Test named parameters actually matched name dbBind(), shuffling (#138). Explicitly specify default row.names = FALSE dbReadTable() dbWriteTable() (#139). Add specification writing 64-bit values, backends must support roundtripping values returned database (#146). Add specification params argument dbGetQuery(), dbSendQuery(), dbExecute() dbSendStatement() (#159). Add test dbQuoteIdentifier(): “names input argument preserved output” (r-lib/DBI#173). Blob tests now also read write zero bytes (). Add string encoded Latin-1 character tests. Added test dbIsValid() stale connections.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"removed-checks-1-6-0","dir":"Changelog","previous_headings":"","what":"Removed checks","title":"DBItest 1.6.0 (2018-05-03)","text":"Don’t test selecting untyped NULL anymore. Full interface compliance doesn’t require method dbGetInfo(DBIDriver) now. Remove \"cannot_forget_disconnect\" test fails R-devel (#150). Methods without db prefix checked ellipsis signature anymore. Don’t specify Inf NaN lack consistent support across DBMS (#142).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"updatedcorrected-checks-1-6-0","dir":"Changelog","previous_headings":"","what":"Updated/corrected checks","title":"DBItest 1.6.0 (2018-05-03)","text":"Fix query supposed generate syntax error. Fix typo (#147, @jonmcalder). Implement POSIXlt bind test correctly. Improve error detection dbBind(). Redesign tests dbBind(), now queries form SELECT CASE (? = ?) (? NULL) 1.5 ELSE 2.5 issued. original tests inappropriate RMariaDB, untyped placeholder returned blob. Transaction tests now use dbWriteTable() instead dbCreateTable(), DBMS don’t support transactions DML. Fix timestamp tests RMariaDB. Fix string constants. \"roundtrip_timestamp\" test now correctly handles timezone information. output timezone ignored. Clear result spec_meta_get_info_result (#143). Use named argument n dbGetQuery() call. Minor fixes.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"tweaks-1-6-0","dir":"Changelog","previous_headings":"","what":"Tweaks","title":"DBItest 1.6.0 (2018-05-03)","text":"New tweak blob_cast allows specifying conversion function BLOB data type. New is_null_check tweak allows specifying function used checking values NULL. Required RPostgres. New list_temporary_tables tweak can enabled independently temporary_tables indicate DBMS support listing temporary tables.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"infrastructure-1-6-0","dir":"Changelog","previous_headings":"","what":"Infrastructure","title":"DBItest 1.6.0 (2018-05-03)","text":"Allow running subset tests test_all() specifying environment variable. test_all() test_some() return NULL invisibly.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internals-1-6-0","dir":"Changelog","previous_headings":"","what":"Internals","title":"DBItest 1.6.0 (2018-05-03)","text":"Compatibility code DBI::dbQuoteLiteral() unavailable. New trivial_query() replaces many hard-coded queries uses non-integer values better compatibility RMariaDB. Convert factor character iris data (#141).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-15-2-2018-01-26","dir":"Changelog","previous_headings":"","what":"DBItest 1.5-2 (2018-01-26)","title":"DBItest 1.5-2 (2018-01-26)","text":"Fix test fails “noLD”. Fix NOTEs R-devel.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-15-1-2017-12-10","dir":"Changelog","previous_headings":"","what":"DBItest 1.5-1 (2017-12-10)","title":"DBItest 1.5-1 (2017-12-10)","text":"Remove \"cannot_forget_disconnect\" test fails R-devel (#150).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-15-2017-06-18","dir":"Changelog","previous_headings":"","what":"DBItest 1.5 (2017-06-18)","title":"DBItest 1.5 (2017-06-18)","text":"Finalize specification. tests now come corresponding prose, behavior finally decided don’t prose version yet (#88).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"new-tests-1-5","dir":"Changelog","previous_headings":"","what":"New tests","title":"DBItest 1.5 (2017-06-18)","text":"Test behavior methods presence placeholders (#120). Test column name mismatch behavior appending tables (#93). Test dbBind() factor works raises warning (#91). Test roundtrip alternating empty non-empty strings (#42). Test multiple columns different types one statement table (#35). Test field.types argument dbWriteTable() (#12). Added tests invalid closed connection argument methods expect connection first argument (#117). Enabled test tests missing dbDisconnect(). Add test unambiguous escaping identifiers (rstats-db/RSQLite#123). Reenable tests visibility (#89). Fix specify 64-bit roundtrip test. 64-bit integers need coercible numeric character (#74). Added roundtrip test time values (#14). Added tweaks handling date, time, timestamp, … (#53, #76). Test dbFetch() update-query returns warning (#66).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"adapted-tests-1-5","dir":"Changelog","previous_headings":"","what":"Adapted tests","title":"DBItest 1.5 (2017-06-18)","text":"NULL valid value row.names argument, FALSE. column named row_names receives special handling (#54). warning (error anymore) expected calling dbDisconnect() closed invalid connection. row.names = FALSE now default methods read write tables. Add NA beginning end columns table roundtrip tests (#24). Stricter tests confusion named unnamed SQL parameters placeholders (#107). Also check names returned data frames. return value calls dbGetQuery(), dbFetch(), dbReadTable() now checked consistency (columns length, length matches number rows) (#126). Removed stress tests start new session. Allow hms (subclasses difftime) returned time class (#135, @jimhester). Test dates type numeric (#99, @jimhester). Replace POSIXlt POSIXct (#100, @jimhester). Use \"PST8PDT\" instead \"PST\" time zone (#110, @thrasibule). Added tests support blob objects (input output), backends required return blob objects (#98). logical_return, date_typed timestamp_typed tweaks respected bind tests. Fixed tests involving time comparison; now uses UTC timezone compares difftime. Tests roundtrip character values now includes tabs, addition many special characters (#85). Make sure least one table exists dbListTables() test. Fix roundtrip tests raw columns: now expecting NULL NA entries SQL NULL values. Fix expect_equal_df() list columns. Testing warning given user forgets call dbDisconnect() dbClearResult() (#103). Numeric roundtrip accepts conversion NaN NA (#79).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-5","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.5 (2017-06-18)","text":"Fix R CMD check errors. Internal consistency checks (#114). Skip patterns don’t match tests now raise warning (#84). New test_some() test individual tests (#136). Use desc instead devtools (#40). unexpected warnings now reported test failures (#113). DBItest_tweaks class gains $ method, accessing undefined tweak now raises error. arguments tweaks() function now default values describe intended usage. New with_closed_connection(ctx = ctx, ), with_invalid_connection(ctx = ctx, ), with_result() with_remove_test_table() helpers, expect_visible(), expect_inbisible_true(), expect_equal_df() expectations concise tests.","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbi-specification-1-4","dir":"Changelog","previous_headings":"","what":"DBI specification","title":"DBItest 1.4 (2016-12-02)","text":"Use markdown documentation. Description parametrized queries statements (#88). New hidden DBIspec-wip page work--progress documentation. Get rid “Format” “Usage” sections, aliases, specs.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"tests-1-4","dir":"Changelog","previous_headings":"","what":"Tests","title":"DBItest 1.4 (2016-12-02)","text":"testing presence max.connections element dbGetInfo(Driver) (rstats-db/DBI#56). Test multi-row binding queries statements (#96). New ellipsis check verifies implemented DBI methods contain ... formals. excludes show() methods defined packages. Refactored bind_ tests use new parameter_pattern tweak (#95). Rough draft transaction tests (#36). New fetch_zero_rows test, split fetch_premature_close. “compliance” test tests backend package exports exactly one subclass DBI virtual class. Document enhance test dbDataType(\"DBIDriver\", \"\") (#88). Minor corrections “bind” tests.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-4","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.4 (2016-12-02)","text":"Isolate stress tests main test suite (#92). Refactor test specification smaller modules, isolated actual test execution (#81). breaks documentation tests, substituted DBI specification prose. Align description binding code. Refactor tests dbBind(), test run BindTester class, behavior specified members instances new BindTesterExtra class. skip argument test_() functions evaluated perl = TRUE support negative lookaheads (#33). Use dbSendStatement() dbExecute() appropriate. Avoid empty subsections Rd documentation satisfy R CMD check (#81).","code":""},{"path":[]},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"bug-fixes-1-3","dir":"Changelog","previous_headings":"","what":"Bug fixes","title":"DBItest 1.3 (2016-07-07)","text":"Fix read_table test backend actually returns data different order.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"new-tests-1-3","dir":"Changelog","previous_headings":"","what":"New tests","title":"DBItest 1.3 (2016-07-07)","text":"Test dbDataType() connections (#69, #75, @imanuelcostigan). Check returned strings UTF-8 encoding (#72). Repeated dbBind() + dbFetch() result set (#51).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"features-1-3","dir":"Changelog","previous_headings":"","what":"Features","title":"DBItest 1.3 (2016-07-07)","text":"tweaks() gains ... first argument support future/deprecated tweaks (warning), also avoid unnamed arguments (#83). testthat now shows accurate location source errors, failures, skips (#78). Aggregate skipped tests, one skip() call per test function. Indicate tests optional documentation (#15).","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"internal-1-3","dir":"Changelog","previous_headings":"","what":"Internal","title":"DBItest 1.3 (2016-07-07)","text":"New constructor_relax_args tweak, currently queried. ctx argument now explicit test functions. Change underscores dashes file names. Remove testthat compatibility hack. New all_have_utf8_or_ascii_encoding() vectorizes has_utf8_or_ascii_encoding(). Test AppVeyor (#73). Work around regression R 3.3.0 (fix scheduled R 3.3.1) affected stress tests.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"dbitest-12-2016-05-21","dir":"Changelog","previous_headings":"","what":"DBItest 1.2 (2016-05-21)","title":"DBItest 1.2 (2016-05-21)","text":"Support names contexts (@hoesler, #67). skip argument test functions now treated Perl regular expression allow negative lookahead. Use skip = \"(?!test_regex).*\" choose single test run (#33). Added encoding arguments non-ASCII string constants (#60, @hoesler). simultaneous_connections test always closes connections exit (@hoesler, #68). generic compliance check (@hoesler, #61). Update documentation reflect test condition (@imanuelcostigan, #70). Import testthat avoid R CMD check warnings. Compatibility dev version testthat (#62). Use container-based builds Travis. Install RPostgres RMySQL rstats-db. Install DBI testthat GitHub.","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-11-2016-02-12","dir":"Changelog","previous_headings":"","what":"Version 1.1 (2016-02-12)","title":"Version 1.1 (2016-02-12)","text":"New argument tweaks make_context() (#49). New tweaks(), essentially constructs named list tweaks predefined documented argument names. constructor_name, respected constructor.* tests. strict_identifier, TRUE identifier must syntactic names even quoted. quoting test now split, part ignored conditional tweak. roundtrip_quotes tests also respects tweak. omit_blob_tests DBMS don’t BLOB data type. current_needs_parens – SQL dialects (e.g., BigQuery) require parentheses functions current_date, current_time current_timestamp. union, specifying nonstandard way combining queries. union queries now name column subquery (required bigrquery). dbGetInfo(Result) (rstats-db/DBI#55). dbListFields() (#26). New package_name test test_getting_started(). Stress test now installs package temporary library (loading DBI) using R CMD INSTALL loading DBI (rstats-db/RSQLite#128, #48). Row count now tested equality identity, backends can return numeric value > 2^31 discretion. Call dbRemoveTable() instead issuing DROP requests, latter might unsupported. Use subqueries queries use . Test dbClearResult() closed result set raises warning. Expect warning instead error double disconnect (#50). Move connection test requires dbFetch() test_result(). Split can_connect_and_disconnect test. Expect DBI Imports, Depends. Remove test dbGetException() (rstats-db/DBI#51). Fix broken tests quoting. Test RPostgres, RMySQL, RSQLite RKazam part Travis-CI tests (#52). Travis CI now installs rstats-db/DBI, updated namespace imports (dbiCheckCompliance(), dbListResults()). Use fork testthat. Return test results named array logical. Requires hadley/testthat#360, gracefully degrades CRAN version. Refactored get_info_() tests use vector names. Use versioned dependency DBI Use unqualified calls dbBind() ","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-10-2015-12-17","dir":"Changelog","previous_headings":"","what":"Version 1.0 (2015-12-17)","title":"Version 1.0 (2015-12-17)","text":"Eliminate errors win-builder Satisfy R CMD check Use LGPL-2 license Add RStudio copyright holder Move devtools package “Imports” “Suggests”","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-03-2015-11-15","dir":"Changelog","previous_headings":"","what":"Version 0.3 (2015-11-15)","title":"Version 0.3 (2015-11-15)","text":"Feature-complete, ready review Add missing methods compliance check Add simple read-test (#27) Add stress tests repeated load/unload (without connecting) new R session (#2), Migrate tests existing backends (#28) Refactor data_ tests use worker function test_select() Test tables NA values non-NA value data_ tests Test return values error conditions dbBind() dbClearResult() (#31) Test vectorization dbQuoteString() dbQuoteIdentifier() (#18) Test dates integer underlying data type (#9) Roundtrip tests sort output table sure (#32) Test NA NULL conversion dbQuoteString(), false friends (#23) Enhance test dbQuoteIdentifier() (#30) Avoid using data.frame() date time columns (#10) Use expect_identical() instead expect_equal() many places (#13) Catch errors .exit() handlers via expect_error() (#20). Combine “meta” tests new test_meta() (#37) New “test” vignette (#16) Add package documentation (#38) 0.2-5","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-02-2015-11-11","dir":"Changelog","previous_headings":"","what":"Version 0.2 (2015-11-11)","title":"Version 0.2 (2015-11-11)","text":"SQL Metadata DBI compliance (testing read-yet) Migrate tests RMySQL Test BLOB data type (#17) Check actual availability type returned dbDataType() (#19) Disambiguate test names (#21) Use regex matching deciding skipped tests, skip regex must match entire test name Document tests test function using new inline documentation feature roxygen2 Improve documentation test_all(): Tests listed new “Tests” section Add brief instructions README Move repository rstats-db namespace 0.1-6","code":""},{"path":"https://dbitest.r-dbi.org/news/index.html","id":"version-01-2015-10-11","dir":"Changelog","previous_headings":"","what":"Version 0.1 (2015-10-11)","title":"Version 0.1 (2015-10-11)","text":"First GitHub release Builds successfully Travis Test context Skipped tests call skip() Function test_all() runs tests Getting started Driver Connection Results Code formatting checked lintr 0.0-5","code":""}]