blob: be6cd4b27b55fcf447d3308b54b912ec1ab84151 [file] [log] [blame]
[{"path":"/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"Apache License","title":"Apache License","text":"Version 2.0, January 2004 <http://www.apache.org/licenses/>","code":""},{"path":[]},{"path":"/LICENSE.html","id":"id_1-definitions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"1. Definitions","title":"Apache License","text":"“License” shall mean terms conditions use, reproduction, distribution defined Sections 1 9 document. “Licensor” shall mean copyright owner entity authorized copyright owner granting License. “Legal Entity” shall mean union acting entity entities control, controlled , common control entity. purposes definition, “control” means () power, direct indirect, cause direction management entity, whether contract otherwise, (ii) ownership fifty percent (50%) outstanding shares, (iii) beneficial ownership entity. “” (“”) shall mean individual Legal Entity exercising permissions granted License. “Source” form shall mean preferred form making modifications, including limited software source code, documentation source, configuration files. “Object” form shall mean form resulting mechanical transformation translation Source form, including limited compiled object code, generated documentation, conversions media types. “Work” shall mean work authorship, whether Source Object form, made available License, indicated copyright notice included attached work (example provided Appendix ). “Derivative Works” shall mean work, whether Source Object form, based (derived ) Work editorial revisions, annotations, elaborations, modifications represent, whole, original work authorship. purposes License, Derivative Works shall include works remain separable , merely link (bind name) interfaces , Work Derivative Works thereof. “Contribution” shall mean work authorship, including original version Work modifications additions Work Derivative Works thereof, intentionally submitted Licensor inclusion Work copyright owner individual Legal Entity authorized submit behalf copyright owner. purposes definition, “submitted” means form electronic, verbal, written communication sent Licensor representatives, including limited communication electronic mailing lists, source code control systems, issue tracking systems managed , behalf , Licensor purpose discussing improving Work, excluding communication conspicuously marked otherwise designated writing copyright owner “Contribution.” “Contributor” shall mean Licensor individual Legal Entity behalf Contribution received Licensor subsequently incorporated within Work.","code":""},{"path":"/LICENSE.html","id":"id_2-grant-of-copyright-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"2. Grant of Copyright License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable copyright license reproduce, prepare Derivative Works , publicly display, publicly perform, sublicense, distribute Work Derivative Works Source Object form.","code":""},{"path":"/LICENSE.html","id":"id_3-grant-of-patent-license","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"3. Grant of Patent License","title":"Apache License","text":"Subject terms conditions License, Contributor hereby grants perpetual, worldwide, non-exclusive, -charge, royalty-free, irrevocable (except stated section) patent license make, made, use, offer sell, sell, import, otherwise transfer Work, license applies patent claims licensable Contributor necessarily infringed Contribution(s) alone combination Contribution(s) Work Contribution(s) submitted. institute patent litigation entity (including cross-claim counterclaim lawsuit) alleging Work Contribution incorporated within Work constitutes direct contributory patent infringement, patent licenses granted License Work shall terminate date litigation filed.","code":""},{"path":"/LICENSE.html","id":"id_4-redistribution","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"4. Redistribution","title":"Apache License","text":"may reproduce distribute copies Work Derivative Works thereof medium, without modifications, Source Object form, provided meet following conditions: () must give recipients Work Derivative Works copy License; (b) must cause modified files carry prominent notices stating changed files; (c) must retain, Source form Derivative Works distribute, copyright, patent, trademark, attribution notices Source form Work, excluding notices pertain part Derivative Works; (d) Work includes “NOTICE” text file part distribution, Derivative Works distribute must include readable copy attribution notices contained within NOTICE file, excluding notices pertain part Derivative Works, least one following places: within NOTICE text file distributed part Derivative Works; within Source form documentation, provided along Derivative Works; , within display generated Derivative Works, wherever third-party notices normally appear. contents NOTICE file informational purposes modify License. may add attribution notices within Derivative Works distribute, alongside addendum NOTICE text Work, provided additional attribution notices construed modifying License. may add copyright statement modifications may provide additional different license terms conditions use, reproduction, distribution modifications, Derivative Works whole, provided use, reproduction, distribution Work otherwise complies conditions stated License.","code":""},{"path":"/LICENSE.html","id":"id_5-submission-of-contributions","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"5. Submission of Contributions","title":"Apache License","text":"Unless explicitly state otherwise, Contribution intentionally submitted inclusion Work Licensor shall terms conditions License, without additional terms conditions. Notwithstanding , nothing herein shall supersede modify terms separate license agreement may executed Licensor regarding Contributions.","code":""},{"path":"/LICENSE.html","id":"id_6-trademarks","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"6. Trademarks","title":"Apache License","text":"License grant permission use trade names, trademarks, service marks, product names Licensor, except required reasonable customary use describing origin Work reproducing content NOTICE file.","code":""},{"path":"/LICENSE.html","id":"id_7-disclaimer-of-warranty","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"7. Disclaimer of Warranty","title":"Apache License","text":"Unless required applicable law agreed writing, Licensor provides Work (Contributor provides Contributions) “” BASIS, WITHOUT WARRANTIES CONDITIONS KIND, either express implied, including, without limitation, warranties conditions TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS PARTICULAR PURPOSE. solely responsible determining appropriateness using redistributing Work assume risks associated exercise permissions License.","code":""},{"path":"/LICENSE.html","id":"id_8-limitation-of-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"8. Limitation of Liability","title":"Apache License","text":"event legal theory, whether tort (including negligence), contract, otherwise, unless required applicable law (deliberate grossly negligent acts) agreed writing, shall Contributor liable damages, including direct, indirect, special, incidental, consequential damages character arising result License use inability use Work (including limited damages loss goodwill, work stoppage, computer failure malfunction, commercial damages losses), even Contributor advised possibility damages.","code":""},{"path":"/LICENSE.html","id":"id_9-accepting-warranty-or-additional-liability","dir":"","previous_headings":"Terms and Conditions for use, reproduction, and distribution","what":"9. Accepting Warranty or Additional Liability","title":"Apache License","text":"redistributing Work Derivative Works thereof, may choose offer, charge fee , acceptance support, warranty, indemnity, liability obligations /rights consistent License. However, accepting obligations, may act behalf sole responsibility, behalf Contributor, agree indemnify, defend, hold Contributor harmless liability incurred , claims asserted , Contributor reason accepting warranty additional liability. END TERMS CONDITIONS","code":""},{"path":"/LICENSE.html","id":"appendix-how-to-apply-the-apache-license-to-your-work","dir":"","previous_headings":"","what":"APPENDIX: How to apply the Apache License to your work","title":"Apache License","text":"apply Apache License work, attach following boilerplate notice, fields enclosed brackets [] replaced identifying information. (Don’t include brackets!) text enclosed appropriate comment syntax file format. also recommend file class name description purpose included “printed page” copyright notice easier identification within third-party archives.","code":"Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."},{"path":"/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Dewey Dunnington. Author, maintainer. Apache Arrow. Author, copyright holder. Apache Software Foundation. Copyright holder.","code":""},{"path":"/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Dunnington D, Apache Arrow (2024). adbcdrivermanager: 'Arrow' Database Connectivity ('ADBC') Driver Manager. R package version 0.11.0.9000, https://arrow.apache.org/adbc/current/r/adbcdrivermanager/, https://github.com/apache/arrow-adbc.","code":"@Manual{, title = {adbcdrivermanager: 'Arrow' Database Connectivity ('ADBC') Driver Manager}, author = {Dewey Dunnington and {Apache Arrow}}, year = {2024}, note = {R package version 0.11.0.9000, https://arrow.apache.org/adbc/current/r/adbcdrivermanager/}, url = {https://github.com/apache/arrow-adbc}, }"},{"path":"/index.html","id":"adbcdrivermanager","dir":"","previous_headings":"","what":"Arrow Database Connectivity (ADBC) Driver Manager","title":"Arrow Database Connectivity (ADBC) Driver Manager","text":"goal adbcdrivermanager provide low-level developer-facing interface Arrow Database Connectivity (ADBC) purposes driver development, testing, support user-facing packages rely ADBC drivers.","code":""},{"path":"/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Arrow Database Connectivity (ADBC) Driver Manager","text":"can install released version adbcdrivermanager CRAN : can install development version adbcdrivermanager GitHub : ADBC drivers R use relatively new feature pkgbuild enable installation GitHub via pak. Depending installed pak, may need update internal version pkgbuild.","code":"install.packages(\"adbcdrivermanager\") # install.packages(\"pak\") pak::pak(\"apache/arrow-adbc/r/adbcdrivermanager\") install.packages(\"pkgbuild\", pak:::private_lib_dir()) pak::cache_clean()"},{"path":"/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"Arrow Database Connectivity (ADBC) Driver Manager","text":"basic example shows solve common problem: One can also interact driver manager lower level using adbc_connection_*() adbc_statement_*() functions (see reference documentation details).","code":"library(adbcdrivermanager) # Get a reference to a database using a driver. The adbcdrivermanager package # contains a few drivers useful for illustration and testing. db <- adbc_database_init(adbcsqlite::adbcsqlite()) # Open a new connection to a database con <- adbc_connection_init(db) # Write a table nycflights13::flights |> write_adbc(con, \"flights\") # Issue a query con |> read_adbc(\"SELECT * from flights\") |> tibble::as_tibble() #> # A tibble: 336,776 × 19 #> year month day dep_time sched_dep_time dep_delay arr_time sched_arr_time #> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 2013 1 1 517 515 2 830 819 #> 2 2013 1 1 533 529 4 850 830 #> 3 2013 1 1 542 540 2 923 850 #> 4 2013 1 1 544 545 -1 1004 1022 #> 5 2013 1 1 554 600 -6 812 837 #> 6 2013 1 1 554 558 -4 740 728 #> 7 2013 1 1 555 600 -5 913 854 #> 8 2013 1 1 557 600 -3 709 723 #> 9 2013 1 1 557 600 -3 838 846 #> 10 2013 1 1 558 600 -2 753 745 #> # ℹ 336,766 more rows #> # ℹ 11 more variables: arr_delay <dbl>, carrier <chr>, flight <dbl>, #> # tailnum <chr>, origin <chr>, dest <chr>, air_time <dbl>, distance <dbl>, #> # hour <dbl>, minute <dbl>, time_hour <chr> # Clean up! adbc_connection_release(con) adbc_database_release(db)"},{"path":"/reference/adbc_connection_get_info.html","id":null,"dir":"Reference","previous_headings":"","what":"Connection methods — adbc_connection_get_info","title":"Connection methods — adbc_connection_get_info","text":"Connection methods","code":""},{"path":"/reference/adbc_connection_get_info.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connection methods — adbc_connection_get_info","text":"","code":"adbc_connection_get_info(connection, info_codes = NULL) adbc_connection_get_objects( connection, depth = 0L, catalog = NULL, db_schema = NULL, table_name = NULL, table_type = NULL, column_name = NULL ) adbc_connection_get_table_schema(connection, catalog, db_schema, table_name) adbc_connection_get_table_types(connection) adbc_connection_read_partition(connection, serialized_partition) adbc_connection_commit(connection) adbc_connection_rollback(connection) adbc_connection_cancel(connection) adbc_connection_get_statistic_names(connection) adbc_connection_get_statistics( connection, catalog, db_schema, table_name, approximate = FALSE ) adbc_connection_quote_identifier(connection, value, ...) adbc_connection_quote_string(connection, value, ...)"},{"path":"/reference/adbc_connection_get_info.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connection methods — adbc_connection_get_info","text":"connection adbc_connection info_codes list metadata codes fetch, NULL fetch . Valid values documented adbc.h header. depth level nesting display. 0, display levels. 1, display catalogs (.e., catalog_schemas null). 2, display catalogs schemas (.e., db_schema_tables null). 3, display catalogs, schemas, tables. catalog show tables given catalog. NULL, filter catalog. empty string, show tables without catalog. May search pattern. db_schema show tables given database schema. NULL, filter database schema. empty string, show tables without database schema. May search pattern. table_name Constrain object statistics query specific table. NULL, filter name. May search pattern. table_type show tables matching one given table types. NULL, show tables type. Valid table types can fetched GetTableTypes. Terminate list NULL entry. column_name show columns given name. NULL, filter name. May search pattern. serialized_partition partition descriptor. approximate FALSE, request exact values statistics, else allow best-effort, approximate, cached values. database may return approximate values regardless, indicated result. Requesting exact values may expensive unsupported. value string identifier. ... Driver-specific options. default method, named values converted strings.","code":""},{"path":"/reference/adbc_connection_get_info.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Connection methods — adbc_connection_get_info","text":"adbc_connection_get_info(), adbc_connection_get_objects(), adbc_connection_get_table_types(), adbc_connection_read_partition() return nanoarrow_array_stream. adbc_connection_get_table_schema() returns nanoarrow_schena adbc_connection_commit() adbc_connection_rollback() return connection, invisibly.","code":""},{"path":"/reference/adbc_connection_get_info.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Connection methods — adbc_connection_get_info","text":"","code":"db <- adbc_database_init(adbc_driver_void()) con <- adbc_connection_init(db) # (not implemented by the void driver) try(adbc_connection_get_info(con, 0)) #> Error in adbc_connection_get_info(con, 0) : NOT_IMPLEMENTED"},{"path":"/reference/adbc_connection_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Connections — adbc_connection_init","title":"Connections — adbc_connection_init","text":"Connections","code":""},{"path":"/reference/adbc_connection_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Connections — adbc_connection_init","text":"","code":"adbc_connection_init(database, ...) adbc_connection_init_default(database, options = NULL, subclass = character()) adbc_connection_release(connection) adbc_connection_set_options(connection, options) adbc_connection_get_option(connection, option) adbc_connection_get_option_bytes(connection, option) adbc_connection_get_option_int(connection, option) adbc_connection_get_option_double(connection, option)"},{"path":"/reference/adbc_connection_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Connections — adbc_connection_init","text":"database adbc_database. ... Driver-specific options. default method, named values converted strings. options named character() list() whose values converted strings. subclass extended class object drivers can specify finer-grained control behaviour R level. connection adbc_connection option specific option name","code":""},{"path":"/reference/adbc_connection_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Connections — adbc_connection_init","text":"object class 'adbc_connection'","code":""},{"path":"/reference/adbc_connection_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Connections — adbc_connection_init","text":"","code":"db <- adbc_database_init(adbc_driver_void()) adbc_connection_init(db) #> <adbc_connection at 0x56156dfea940> #> List of 1 #> $ database:<adbc_database at 0x5615711e1fc0> #> List of 1 #> ..$ driver:<adbc_driver_void> List of 2 #> .. ..$ driver_init_func:Class 'adbc_driver_init_func' <externalptr> #> .. ..$ .child_count : int 0"},{"path":"/reference/adbc_connection_join.html","id":null,"dir":"Reference","previous_headings":"","what":"Join the lifecycle of a unique parent to its child — adbc_connection_join","title":"Join the lifecycle of a unique parent to its child — adbc_connection_join","text":"occasionally useful return connection, statement, stream function created unique parent. helpers tie lifecycle unique parent object child parent object released predictably immediately child. functions invalidate references previous R object.","code":""},{"path":"/reference/adbc_connection_join.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join the lifecycle of a unique parent to its child — adbc_connection_join","text":"","code":"adbc_connection_join(connection, database) adbc_statement_join(statement, connection)"},{"path":"/reference/adbc_connection_join.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join the lifecycle of a unique parent to its child — adbc_connection_join","text":"connection connection created adbc_connection_init() database database created adbc_database_init() statement statement created adbc_statement_init()","code":""},{"path":"/reference/adbc_connection_join.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join the lifecycle of a unique parent to its child — adbc_connection_join","text":"input, invisibly.","code":""},{"path":"/reference/adbc_connection_join.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Join the lifecycle of a unique parent to its child — adbc_connection_join","text":"","code":"# Use local_adbc to ensure prompt cleanup on error; # use join functions to return a single object that manages # the lifecycle of all three. stmt <- local({ db <- local_adbc(adbc_database_init(adbc_driver_log())) con <- local_adbc(adbc_connection_init(db)) adbc_connection_join(con, db) stmt <- local_adbc(adbc_statement_init(con)) adbc_statement_join(stmt, con) adbc_xptr_move(stmt) }) #> LogDatabaseNew() #> LogDatabaseInit() #> LogConnectionNew() #> LogConnectionInit() #> LogStatementNew() # Everything is released immediately when the last object is released adbc_statement_release(stmt) #> LogStatementRelease() #> LogConnectionRelease() #> LogDatabaseRelease()"},{"path":"/reference/adbc_database_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Databases — adbc_database_init","title":"Databases — adbc_database_init","text":"Databases","code":""},{"path":"/reference/adbc_database_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Databases — adbc_database_init","text":"","code":"adbc_database_init(driver, ...) adbc_database_init_default(driver, options = NULL, subclass = character()) adbc_database_release(database) adbc_database_set_options(database, options) adbc_database_get_option(database, option) adbc_database_get_option_bytes(database, option) adbc_database_get_option_int(database, option) adbc_database_get_option_double(database, option)"},{"path":"/reference/adbc_database_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Databases — adbc_database_init","text":"driver adbc_driver(). ... Driver-specific options. default method, named values converted strings. options named character() list() whose values converted strings. subclass extended class object drivers can specify finer-grained control behaviour R level. database adbc_database. option specific option name","code":""},{"path":"/reference/adbc_database_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Databases — adbc_database_init","text":"object class adbc_database","code":""},{"path":"/reference/adbc_database_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Databases — adbc_database_init","text":"","code":"adbc_database_init(adbc_driver_void()) #> <adbc_database at 0x561570258080> #> List of 1 #> $ driver:<adbc_driver_void> List of 2 #> ..$ driver_init_func:Class 'adbc_driver_init_func' <externalptr> #> ..$ .child_count : int 0"},{"path":"/reference/adbc_driver_log.html","id":null,"dir":"Reference","previous_headings":"","what":"Log calls to another driver — adbc_driver_log","title":"Log calls to another driver — adbc_driver_log","text":"Useful debugging ensuring certain calls occur initialization /cleanup. current logging output considered stable may change future releases.","code":""},{"path":"/reference/adbc_driver_log.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Log calls to another driver — adbc_driver_log","text":"","code":"adbc_driver_log()"},{"path":"/reference/adbc_driver_log.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Log calls to another driver — adbc_driver_log","text":"object class 'adbc_driver_log'","code":""},{"path":"/reference/adbc_driver_log.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Log calls to another driver — adbc_driver_log","text":"","code":"drv <- adbc_driver_log() db <- adbc_database_init(drv, key = \"value\") #> LogDatabaseNew() #> LogDatabaseSetOption() #> LogDatabaseInit() con <- adbc_connection_init(db, key = \"value\") #> LogConnectionNew() #> LogConnectionSetOption() #> LogConnectionInit() stmt <- adbc_statement_init(con, key = \"value\") #> LogStatementNew() #> LogStatementSetOption() try(adbc_statement_execute_query(stmt)) #> LogStatementExecuteQuery() #> Error in adbc_statement_execute_query(stmt) : NOT_IMPLEMENTED adbc_statement_release(stmt) #> LogStatementRelease() adbc_connection_release(con) #> LogConnectionRelease() adbc_database_release(db) #> LogDatabaseRelease()"},{"path":"/reference/adbc_driver_monkey.html","id":null,"dir":"Reference","previous_headings":"","what":"Monkey see, monkey do! — adbc_driver_monkey","title":"Monkey see, monkey do! — adbc_driver_monkey","text":"driver whose query results set advance.","code":""},{"path":"/reference/adbc_driver_monkey.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Monkey see, monkey do! — adbc_driver_monkey","text":"","code":"adbc_driver_monkey()"},{"path":"/reference/adbc_driver_monkey.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Monkey see, monkey do! — adbc_driver_monkey","text":"object class 'adbc_driver_monkey'","code":""},{"path":"/reference/adbc_driver_monkey.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Monkey see, monkey do! — adbc_driver_monkey","text":"","code":"db <- adbc_database_init(adbc_driver_monkey()) con <- adbc_connection_init(db) stmt <- adbc_statement_init(con, mtcars) stream <- nanoarrow::nanoarrow_allocate_array_stream() adbc_statement_execute_query(stmt, stream) #> [1] -1 as.data.frame(stream$get_next()) #> mpg cyl disp hp drat wt qsec vs am gear carb #> 1 21.0 6 160.0 110 3.90 2.620 16.46 0 1 4 4 #> 2 21.0 6 160.0 110 3.90 2.875 17.02 0 1 4 4 #> 3 22.8 4 108.0 93 3.85 2.320 18.61 1 1 4 1 #> 4 21.4 6 258.0 110 3.08 3.215 19.44 1 0 3 1 #> 5 18.7 8 360.0 175 3.15 3.440 17.02 0 0 3 2 #> 6 18.1 6 225.0 105 2.76 3.460 20.22 1 0 3 1 #> 7 14.3 8 360.0 245 3.21 3.570 15.84 0 0 3 4 #> 8 24.4 4 146.7 62 3.69 3.190 20.00 1 0 4 2 #> 9 22.8 4 140.8 95 3.92 3.150 22.90 1 0 4 2 #> 10 19.2 6 167.6 123 3.92 3.440 18.30 1 0 4 4 #> 11 17.8 6 167.6 123 3.92 3.440 18.90 1 0 4 4 #> 12 16.4 8 275.8 180 3.07 4.070 17.40 0 0 3 3 #> 13 17.3 8 275.8 180 3.07 3.730 17.60 0 0 3 3 #> 14 15.2 8 275.8 180 3.07 3.780 18.00 0 0 3 3 #> 15 10.4 8 472.0 205 2.93 5.250 17.98 0 0 3 4 #> 16 10.4 8 460.0 215 3.00 5.424 17.82 0 0 3 4 #> 17 14.7 8 440.0 230 3.23 5.345 17.42 0 0 3 4 #> 18 32.4 4 78.7 66 4.08 2.200 19.47 1 1 4 1 #> 19 30.4 4 75.7 52 4.93 1.615 18.52 1 1 4 2 #> 20 33.9 4 71.1 65 4.22 1.835 19.90 1 1 4 1 #> 21 21.5 4 120.1 97 3.70 2.465 20.01 1 0 3 1 #> 22 15.5 8 318.0 150 2.76 3.520 16.87 0 0 3 2 #> 23 15.2 8 304.0 150 3.15 3.435 17.30 0 0 3 2 #> 24 13.3 8 350.0 245 3.73 3.840 15.41 0 0 3 4 #> 25 19.2 8 400.0 175 3.08 3.845 17.05 0 0 3 2 #> 26 27.3 4 79.0 66 4.08 1.935 18.90 1 1 4 1 #> 27 26.0 4 120.3 91 4.43 2.140 16.70 0 1 5 2 #> 28 30.4 4 95.1 113 3.77 1.513 16.90 1 1 5 2 #> 29 15.8 8 351.0 264 4.22 3.170 14.50 0 1 5 4 #> 30 19.7 6 145.0 175 3.62 2.770 15.50 0 1 5 6 #> 31 15.0 8 301.0 335 3.54 3.570 14.60 0 1 5 8 #> 32 21.4 4 121.0 109 4.11 2.780 18.60 1 1 4 2"},{"path":"/reference/adbc_driver_void.html","id":null,"dir":"Reference","previous_headings":"","what":"Create ADBC drivers — adbc_driver_void","title":"Create ADBC drivers — adbc_driver_void","text":"Creates R object representation ADBC driver, consists name initializer function optional subclass control finer-grained behaviour R level.","code":""},{"path":"/reference/adbc_driver_void.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create ADBC drivers — adbc_driver_void","text":"","code":"adbc_driver_void() adbc_driver(x, entrypoint = NULL, ..., subclass = character())"},{"path":"/reference/adbc_driver_void.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create ADBC drivers — adbc_driver_void","text":"x, entrypoint ADBC driver may defined either init function identifier entrypoint name. driver init func must external pointer DL_FUNC type AdbcDriverInitFunc specified adbc.h header. ... key/value parameters store (R-level) driver object. subclass optional subclass finer-grained control behaviour R level.","code":""},{"path":"/reference/adbc_driver_void.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create ADBC drivers — adbc_driver_void","text":"object class 'adbc_driver'","code":""},{"path":"/reference/adbc_driver_void.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create ADBC drivers — adbc_driver_void","text":"","code":"adbc_driver_void() #> <adbc_driver_void> List of 2 #> $ driver_init_func:Class 'adbc_driver_init_func' <externalptr> #> $ .child_count : int 0"},{"path":"/reference/adbc_error_from_array_stream.html","id":null,"dir":"Reference","previous_headings":"","what":"Get extended error information from an array stream — adbc_error_from_array_stream","title":"Get extended error information from an array stream — adbc_error_from_array_stream","text":"Get extended error information array stream","code":""},{"path":"/reference/adbc_error_from_array_stream.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get extended error information from an array stream — adbc_error_from_array_stream","text":"","code":"adbc_error_from_array_stream(stream)"},{"path":"/reference/adbc_error_from_array_stream.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get extended error information from an array stream — adbc_error_from_array_stream","text":"stream nanoarrow_array_stream","code":""},{"path":"/reference/adbc_error_from_array_stream.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get extended error information from an array stream — adbc_error_from_array_stream","text":"NULL stream created driver supports extended error information list whose first element status code second element adbc_error object. acbc_error must accessed stream explicitly released.","code":""},{"path":"/reference/adbc_error_from_array_stream.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get extended error information from an array stream — adbc_error_from_array_stream","text":"","code":"db <- adbc_database_init(adbc_driver_monkey()) con <- adbc_connection_init(db) stmt <- adbc_statement_init(con, mtcars) stream <- nanoarrow::nanoarrow_allocate_array_stream() adbc_statement_execute_query(stmt, stream) #> [1] -1 adbc_error_from_array_stream(stream) #> NULL"},{"path":"/reference/adbc_statement_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Statements — adbc_statement_init","title":"Statements — adbc_statement_init","text":"Statements","code":""},{"path":"/reference/adbc_statement_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statements — adbc_statement_init","text":"","code":"adbc_statement_init(connection, ...) adbc_statement_init_default(connection, options = NULL, subclass = character()) adbc_statement_release(statement) adbc_statement_set_options(statement, options) adbc_statement_get_option(statement, option) adbc_statement_get_option_bytes(statement, option) adbc_statement_get_option_int(statement, option) adbc_statement_get_option_double(statement, option)"},{"path":"/reference/adbc_statement_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statements — adbc_statement_init","text":"connection adbc_connection ... Driver-specific options. default method, named values converted strings. options named character() list() whose values converted strings. subclass extended class object drivers can specify finer-grained control behaviour R level. statement adbc_statement option specific option name","code":""},{"path":"/reference/adbc_statement_init.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statements — adbc_statement_init","text":"object class 'adbc_statement'","code":""},{"path":"/reference/adbc_statement_init.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Statements — adbc_statement_init","text":"","code":"db <- adbc_database_init(adbc_driver_void()) con <- adbc_connection_init(db) adbc_statement_init(con) #> <adbc_statement at 0x56157061c710> #> List of 1 #> $ connection:<adbc_connection at 0x56157092f720> #> List of 1 #> ..$ database:<adbc_database at 0x5615703b50f0> #> List of 1 #> .. ..$ driver:<adbc_driver_void> List of 2 #> .. .. ..$ driver_init_func:Class 'adbc_driver_init_func' <externalptr> #> .. .. ..$ .child_count : int 0"},{"path":"/reference/adbc_statement_set_sql_query.html","id":null,"dir":"Reference","previous_headings":"","what":"Statement methods — adbc_statement_set_sql_query","title":"Statement methods — adbc_statement_set_sql_query","text":"Statement methods","code":""},{"path":"/reference/adbc_statement_set_sql_query.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Statement methods — adbc_statement_set_sql_query","text":"","code":"adbc_statement_set_sql_query(statement, query) adbc_statement_set_substrait_plan(statement, plan) adbc_statement_prepare(statement) adbc_statement_get_parameter_schema(statement) adbc_statement_bind(statement, values, schema = NULL) adbc_statement_bind_stream(statement, stream, schema = NULL) adbc_statement_execute_query( statement, stream = NULL, stream_join_parent = FALSE ) adbc_statement_execute_schema(statement) adbc_statement_cancel(statement)"},{"path":"/reference/adbc_statement_set_sql_query.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Statement methods — adbc_statement_set_sql_query","text":"statement adbc_statement query SQL query string plan raw vector representation serialized Substrait plan. values nanoarrow_array object can coerced one. schema nanoarrow_schema object can coerced one. stream nanoarrow_array_stream object can coerced one. stream_join_parent Use TRUE invalidate statement tie lifecycle stream.","code":""},{"path":"/reference/adbc_statement_set_sql_query.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Statement methods — adbc_statement_set_sql_query","text":"adbc_statement_set_sql_query(), adbc_statement_set_substrait_plan(), adbc_statement_prepare(), adbc_statement_bind(), adbc_statement_bind_stream(), adbc_statement_execute_query() return statement, invisibly. adbc_statement_get_parameter_schema() returns nanoarrow_schema.","code":""},{"path":"/reference/adbc_statement_set_sql_query.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Statement methods — adbc_statement_set_sql_query","text":"","code":"db <- adbc_database_init(adbc_driver_void()) con <- adbc_connection_init(db) stmt <- adbc_statement_init(con) # (not implemented by the void driver) try(adbc_statement_set_sql_query(stmt, \"some query\")) #> Error in adbc_statement_set_sql_query(stmt, \"some query\") : #> NOT_IMPLEMENTED"},{"path":"/reference/adbc_xptr_move.html","id":null,"dir":"Reference","previous_headings":"","what":"Low-level pointer details — adbc_xptr_move","title":"Low-level pointer details — adbc_xptr_move","text":"adbc_xptr_move() allocates fresh R object moves values pointed x . original R object invalidated zeroing content. useful returning function lifecycle helpers used manage original object. adbc_xptr_is_valid() provides means test invalidated pointer.","code":""},{"path":"/reference/adbc_xptr_move.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Low-level pointer details — adbc_xptr_move","text":"","code":"adbc_xptr_move(x, check_child_count = TRUE) adbc_xptr_is_valid(x)"},{"path":"/reference/adbc_xptr_move.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Low-level pointer details — adbc_xptr_move","text":"x 'adbc_database', 'adbc_connection', 'adbc_statement', 'nanoarrow_array_stream' check_child_count Ensures x zero child count performing move. almost always TRUE.","code":""},{"path":"/reference/adbc_xptr_move.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Low-level pointer details — adbc_xptr_move","text":"adbc_xptr_move(): freshly-allocated R object identical x adbc_xptr_is_valid(): Returns FALSE ADBC object pointed x invalidated.","code":""},{"path":"/reference/adbc_xptr_move.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Low-level pointer details — adbc_xptr_move","text":"","code":"db <- adbc_database_init(adbc_driver_void()) adbc_xptr_is_valid(db) #> [1] TRUE db_new <- adbc_xptr_move(db) adbc_xptr_is_valid(db) #> [1] FALSE adbc_xptr_is_valid(db_new) #> [1] TRUE"},{"path":"/reference/adbcdrivermanager-package.html","id":null,"dir":"Reference","previous_headings":"","what":"adbcdrivermanager: 'Arrow' Database Connectivity ('ADBC') Driver Manager — adbcdrivermanager-package","title":"adbcdrivermanager: 'Arrow' Database Connectivity ('ADBC') Driver Manager — adbcdrivermanager-package","text":"Provides developer-facing interface 'Arrow' Database Connectivity ('ADBC') purposes driver development, driver testing, building high-level database interfaces users. 'ADBC' https://arrow.apache.org/adbc/ API standard database access libraries uses 'Arrow' result sets query parameters.","code":""},{"path":[]},{"path":"/reference/adbcdrivermanager-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"adbcdrivermanager: 'Arrow' Database Connectivity ('ADBC') Driver Manager — adbcdrivermanager-package","text":"Maintainer: Dewey Dunnington dewey@dunnington.ca (ORCID) Authors: Apache Arrow dev@arrow.apache.org [copyright holder] contributors: Apache Software Foundation dev@arrow.apache.org [copyright holder]","code":""},{"path":"/reference/read_adbc.html","id":null,"dir":"Reference","previous_headings":"","what":"Read, write, and execute on ADBC connections — read_adbc","title":"Read, write, and execute on ADBC connections — read_adbc","text":"convenience methods useful testing connections. Note S3 dispatch always db_or_con (.e., drivers may provide implementations).","code":""},{"path":"/reference/read_adbc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read, write, and execute on ADBC connections — read_adbc","text":"","code":"read_adbc(db_or_con, query, ..., bind = NULL) execute_adbc(db_or_con, query, ..., bind = NULL) write_adbc( tbl, db_or_con, target_table, ..., mode = c(\"default\", \"create\", \"append\"), temporary = FALSE )"},{"path":"/reference/read_adbc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read, write, and execute on ADBC connections — read_adbc","text":"db_or_con adbc_database adbc_connection. database, connection opened. read_adbc(), connection closed resulting stream released. query SQL query ... Passed S3 methods. bind data.frame, nanoarrow_array, nanoarrow_array_stream bind parameters NULL skip bind/prepare step. tbl data.frame, nanoarrow_array, nanoarrow_array_stream. target_table target table name tbl written. mode One \"create\", \"append\", \"default\" (error schema compatible append otherwise). temporary Use TRUE create table temporary table.","code":""},{"path":"/reference/read_adbc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read, write, and execute on ADBC connections — read_adbc","text":"read_adbc(): nanoarrow_array_stream execute_adbc(): db_or_con, invisibly. write_adbc(): tbl, invisibly.","code":""},{"path":"/reference/read_adbc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read, write, and execute on ADBC connections — read_adbc","text":"","code":"# On a database, connections are opened and closed db <- adbc_database_init(adbc_driver_log()) #> LogDatabaseNew() #> LogDatabaseInit() try(read_adbc(db, \"some sql\")) #> LogConnectionNew() #> LogConnectionInit() #> LogStatementNew() #> LogStatementSetSqlQuery() #> LogStatementRelease() #> LogConnectionRelease() #> Error in adbc_statement_set_sql_query(stmt, query) : NOT_IMPLEMENTED try(execute_adbc(db, \"some sql\")) #> LogConnectionNew() #> LogConnectionInit() #> LogStatementNew() #> LogStatementSetSqlQuery() #> LogStatementRelease() #> LogConnectionRelease() #> Error in adbc_statement_set_sql_query(stmt, query) : NOT_IMPLEMENTED try(write_adbc(mtcars, db, \"some_table\")) #> LogConnectionNew() #> LogConnectionInit() #> LogStatementNew() #> LogStatementSetOption() #> LogStatementBindStream() #> LogStatementRelease() #> LogConnectionRelease() #> Error in adbc_statement_bind_stream(stmt, tbl) : NOT_IMPLEMENTED # Also works on a connection con <- adbc_connection_init(db) #> LogConnectionNew() #> LogConnectionInit() try(read_adbc(con, \"some sql\")) #> LogStatementNew() #> LogStatementSetSqlQuery() #> LogStatementRelease() #> Error in adbc_statement_set_sql_query(stmt, query) : NOT_IMPLEMENTED try(execute_adbc(con, \"some sql\")) #> LogStatementNew() #> LogStatementSetSqlQuery() #> LogStatementRelease() #> Error in adbc_statement_set_sql_query(stmt, query) : NOT_IMPLEMENTED try(write_adbc(mtcars, con, \"some_table\")) #> LogStatementNew() #> LogStatementSetOption() #> LogStatementBindStream() #> LogStatementRelease() #> Error in adbc_statement_bind_stream(stmt, tbl) : NOT_IMPLEMENTED"},{"path":"/reference/with_adbc.html","id":null,"dir":"Reference","previous_headings":"","what":"Cleanup helpers — with_adbc","title":"Cleanup helpers — with_adbc","text":"Managing lifecycle databases, connections, statements can complex error-prone. R objects wrap underlying ADBC pointers perform cleanup correct order rely garbage collection (.e., nothing let objects go scope); however good practice explicitly clean objects. helpers designed make explicit predictable cleanup easy accomplish.","code":""},{"path":"/reference/with_adbc.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cleanup helpers — with_adbc","text":"","code":"with_adbc(x, code) local_adbc(x, .local_envir = parent.frame())"},{"path":"/reference/with_adbc.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cleanup helpers — with_adbc","text":"x ADBC database, ADBC connection, ADBC statement, nanoarrow_array_stream returned calls ADBC function. code Code execute cleaning input. .local_envir execution environment whose scope tied input.","code":""},{"path":"/reference/with_adbc.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cleanup helpers — with_adbc","text":"with_adbc() returns result code local_adbc() returns input, invisibly.","code":""},{"path":"/reference/with_adbc.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cleanup helpers — with_adbc","text":"Note can use adbc_connection_join() adbc_statement_join() tie lifecycle parent object child object. functions mark previous references parent object released can still use local helpers manage parent object joined. Use stream_join_parent = TRUE adbc_statement_execute_query() tie lifecycle statement output stream.","code":""},{"path":"/reference/with_adbc.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Cleanup helpers — with_adbc","text":"","code":"# Using with_adbc(): with_adbc(db <- adbc_database_init(adbc_driver_void()), { with_adbc(con <- adbc_connection_init(db), { with_adbc(stmt <- adbc_statement_init(con), { # adbc_statement_set_sql_query(stmt, \"SELECT * FROM foofy\") # adbc_statement_execute_query(stmt) \"some result\" }) }) }) #> [1] \"some result\" # Using local_adbc_*() (works best within a function, test, or local()) local({ db <- local_adbc(adbc_database_init(adbc_driver_void())) con <- local_adbc(adbc_connection_init(db)) stmt <- local_adbc(adbc_statement_init(con)) # adbc_statement_set_sql_query(stmt, \"SELECT * FROM foofy\") # adbc_statement_execute_query(stmt) \"some result\" }) #> [1] \"some result\""}]