{"id":15285390,"url":"https://github.com/r-dbi/rmariadb","last_synced_at":"2025-04-09T20:00:20.921Z","repository":{"id":39648800,"uuid":"96334875","full_name":"r-dbi/RMariaDB","owner":"r-dbi","description":"An R interface to MariaDB","archived":false,"fork":false,"pushed_at":"2025-02-26T02:08:56.000Z","size":14618,"stargazers_count":133,"open_issues_count":22,"forks_count":39,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-31T15:25:53.119Z","etag":null,"topics":["database","mariadb","r"],"latest_commit_sha":null,"homepage":"https://rmariadb.r-dbi.org","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r-dbi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/security.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-05T15:35:16.000Z","updated_at":"2025-03-05T02:59:57.000Z","dependencies_parsed_at":"2023-12-17T05:19:33.175Z","dependency_job_id":"38aecec4-2055-43b2-a111-1b3eaee901d8","html_url":"https://github.com/r-dbi/RMariaDB","commit_stats":null,"previous_names":["rstats-db/rmariadb"],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-dbi%2FRMariaDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-dbi%2FRMariaDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-dbi%2FRMariaDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r-dbi%2FRMariaDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r-dbi","download_url":"https://codeload.github.com/r-dbi/RMariaDB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103877,"owners_count":21048245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mariadb","r"],"created_at":"2024-09-30T15:04:31.403Z","updated_at":"2025-04-09T20:00:20.708Z","avatar_url":"https://github.com/r-dbi.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"RMariaDB\n======\n\n\u003c!-- badges: start --\u003e\n[![rcc](https://github.com/r-dbi/RMariaDB/workflows/rcc/badge.svg)](https://github.com/r-dbi/RMariaDB/actions)\n[![Codecov test coverage](https://codecov.io/gh/r-dbi/RMariaDB/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-dbi/RMariaDB?branch=main)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/RMariaDB)](https://cran.r-project.org/package=RMariaDB)\n[![CRAN RStudio mirror downloads](https://cranlogs.r-pkg.org/badges/RMariaDB)](https://cran.r-project.org/package=RMariaDB)\n\u003c!-- badges: end --\u003e\n\nRMariaDB is a database interface and MariaDB driver for R. This version is aimed at full compliance with the [DBI specification](https://cran.r-project.org/package=DBI/vignettes/spec.html), as a replacement for the old [RMySQL](https://cran.r-project.org/package=RMySQL) package.\n\n## Hello World\n\n```R\nlibrary(DBI)\n# Connect to my-db as defined in ~/.my.cnf\ncon \u003c- dbConnect(RMariaDB::MariaDB(), group = \"my-db\")\n\ndbListTables(con)\ndbWriteTable(con, \"mtcars\", mtcars)\ndbListTables(con)\n\ndbListFields(con, \"mtcars\")\ndbReadTable(con, \"mtcars\")\n\n# You can fetch all results:\nres \u003c- dbSendQuery(con, \"SELECT * FROM mtcars WHERE cyl = 4\")\ndbFetch(res)\ndbClearResult(res)\n\n# Or a chunk at a time\nres \u003c- dbSendQuery(con, \"SELECT * FROM mtcars WHERE cyl = 4\")\nwhile(!dbHasCompleted(res)){\n  chunk \u003c- dbFetch(res, n = 5)\n  print(nrow(chunk))\n}\n# Clear the result\ndbClearResult(res)\n\n# Disconnect from the database\ndbDisconnect(con)\n```\n\n## Installation\n\nBinary packages for __OS X__ or __Windows__ can be installed directly from CRAN:\n\n```r\ninstall.packages(\"RMariaDB\")\n```\n\nThe development version from github:\n\n```R\n# install.packages(\"devtools\")\ndevtools::install_github(\"r-dbi/DBI\")\ndevtools::install_github(\"r-dbi/RMariaDB\")\n```\n\nDiscussions associated with DBI and related database packages take place on [R-SIG-DB](https://stat.ethz.ch/mailman/listinfo/r-sig-db).\nThe website [Databases using R](https://db.rstudio.com/) describes the tools and best practices in this ecosystem.\n\nInstallation from source on Linux or OS X currently requires [`MariaDB Connector/C`](https://downloads.mariadb.org/connector-c/), preferably in version 2.3.4/3.0.3 or later.\nWith older versions, character and blob columns do not work reliably.\nAlternatively, Oracle's [libmysqlclient](https://packages.debian.org/buster/default-libmysqlclient-dev) can be used.\n\n\n### Connector/C\n\nOn recent __Debian__ or __Ubuntu__ install [libmariadb-dev](https://packages.debian.org/testing/libmariadb-dev).\n\n```\nsudo apt-get install -y libmariadb-dev\n```\n\nOn __Fedora__,  __CentOS__ or __RHEL__ we need [mariadb-devel](https://src.fedoraproject.org/rpms/mariadb):\n\n```\nsudo yum install mariadb-devel\n````\n\nOn __OS X__ use [mariadb-connector-c](https://github.com/Homebrew/homebrew-core/blob/master/Formula/m/mariadb-connector-c.rb) from Homebrew:\n\n```\nbrew install mariadb-connector-c\n```\n\n\n### MySQL client library\n\nOn recent __Debian__ or __Ubuntu__ install [libmysqlclient-dev](https://packages.debian.org/buster/default-libmysqlclient-dev).\n\n```\nsudo apt-get install -y libmysqlclient-dev\n```\n\nOn __Fedora__,  __CentOS__ or __RHEL__ we need mysql-devel, see https://apps.fedoraproject.org/packages/mysql-devel:\n\n```\nsudo yum install mysql-devel\n```\n\nFollow [instructions](https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/) to enable the MySQL yum repository if the above command attempts to install MariaDB files.\n\n\nOn __OS X__ use [mysql-connector-c](https://github.com/Homebrew/homebrew-core/blob/master/Formula/m/mysql-connector-c++.rb) from Homebrew:\n\n```\nbrew install mysql-connector-c++\n```\n\n\n## MariaDB configuration file\n\nInstead of specifying a username and password in calls to `dbConnect()`, it's better to set up a MariaDB configuration file that names the databases that you connect to most commonly. This file should live in `~/.my.cnf` and look like:\n\n```\n[database_name]\noption1=value1\noption2=value2\n```\n\nIf you want to run the examples, you'll need to set the proper options in the `[rs-dbi]` group of any MariaDB option file, such as /etc/my.cnf or the .my.cnf file in your home directory. For a default single user install of MariaDB, the following code should work:\n\n```\n[rs-dbi]\ndatabase=\"test\"\nuser=\"root\"\npassword=\"\"\n```\n\n## Acknowledgements\n\nMany thanks to Christoph M. Friedrich, John Heuer, Kurt Hornik, Torsten Hothorn, Saikat Debroy, Matthew Kelly, Brian D. Ripley, Mikhail Kondrin, Jake Luciani, Jens Nieschulze, Deepayan Sarkar, Louis Springer, Duncan Temple Lang, Luis Torgo, Arend P. van der Veen, Felix Weninger, J. T. Lindgren, Crespin Miller, and Michal Okonlewski, Seth Falcon and Paul Gilbert for comments, suggestions, bug reports, and patches to the original [RMySQL](https://cran.r-project.org/package=RMySQL) package, and to all contributors (of [code](https://github.com/r-dbi/RMariaDB/graphs/contributors) and discussions) to this package.\n\n---\n\nPlease note that the 'RMariaDB' project is released with a\n[Contributor Code of Conduct](https://rmariadb.r-dbi.org/CODE_OF_CONDUCT.html).\nBy contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-dbi%2Frmariadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr-dbi%2Frmariadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr-dbi%2Frmariadb/lists"}