-
Notifications
You must be signed in to change notification settings - Fork 9
R: Extend example to demonstrate both RPostgres and RPostgreSQL #1163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughTwo new PostgreSQL example scripts are added to the R directory demonstrating connections via RPostgres and RPostgreSQL drivers. The Makefile is updated to execute all three R scripts in the test target. Documentation in README is revised to reference both driver examples. Changes
Sequence DiagramsequenceDiagram
participant Script as R Script
participant DBI as DBI/Driver
participant DB as PostgreSQL
rect rgb(200, 220, 255)
Note over Script,DB: RPostgres Flow
Script->>Script: Conditionally install RPostgres
Script->>DBI: Load DBI & RPostgres
Script->>DBI: dbDriver("postgres")
DBI-->>Script: Driver
end
Script->>DB: Connect to localhost:5432
DB-->>Script: Connection object
rect rgb(220, 200, 255)
Note over Script,DB: Query & Operations
Script->>DB: SELECT from sys.summits
DB-->>Script: Results
Script->>DB: CREATE TABLE r if not exists
Script->>DB: INSERT row
Script->>DB: SELECT from r
DB-->>Script: Results
end
Script->>DB: Disconnect (on.exit)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
by-language/r/basic_rpostgres.r
Outdated
| # Delete testdrive table when needed. | ||
| # FIXME: https://github.com/crate/crate/issues/18528 | ||
| #if (dbExistsTable(conn, "r")) { | ||
| # dbRemoveTable(conn, "r") | ||
| #} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-enable this with CrateDB 6.2.0. Will also available per nightly release starting this night.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This spot started working with CrateDB Nightly today, covering it successfuly also with the RPostgres driver now. Thank you for the quick turnaround, @mfussenegger.
About
We found out that RPostgres is the canonical driver, while RPostgreSQL is becoming more and more outdated.
References