Add an example for r2dbc connection URL
See original GitHub issueit was really difficult to figure out proper H2 r2dbc URL for a “file” database.
Eventually it worked as follows:
r2dbc:h2:file://././build/h2db/db/dbname;DB_CLOSE_DELAY=-1;USER=username
can we add a section on this, because I could not find this information anywhere and had to debug ConnectionFactoryProvider
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to set up database connection in r2dbc? - Stack Overflow
I found the problem. It's Lombok library, I didn't install it in eclipse. When I created the getter and setter method manually it...
Read more >Introduce R2DBC Connection URLs · Issue #37 - GitHub
So, driver only knows options. Add SUB_SCHEMA to option; Delegating driver(tc, proxy) will responsible for updating DRIVER and SUB_SCHEMA.
Read more >R2DBC – Reactive Relational Database Connectivity | Baeldung
Using R2DBC in a project requires that we add dependencies to the core API and a ... Here's an example of a typical...
Read more >Introduction to R2dbc | Spring R2dbc by Examples - Hantsy Bai
The following is an example of obtaining a H2 specific ConnectionFactory from URL, it will connect to an embedded H2 database. ConnectionFactories.get("r2dbc:h2 ...
Read more >Accessing RDBMS with Spring Data R2dbc - Hantsy - Medium
Let's add a r2dbc driver for the specific database you are using. Use H2 as an example, add the following dependency. Other drivers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
R2DBC H2 is basically a wrapper for H2 that attempts to bridge what H2 provides into the R2DBC world. The H2 documentation is really only a first starting point but it cannot cover how R2DBC URL’s get built.
You might be interested in the general URL scheme: https://r2dbc.io/spec/0.8.1.RELEASE/spec/html/#overview.connection.url
Basically, URL’s can contain the host part (“authority”) (
r2dbc:h2:tcp://remote-host/database
) or they can be built without (r2dbc:h2:file:///absolute/file/path
) depending on what you’re trying to express. Getting feedback on the documentation and the idea how you approach configuration helps us to learn which aspects we can improve.thanks, Mark! so basically my problem was that I was trying to refer to “relative” file path, and a leading “.” was parsed as a “host”, which lead to problems later.
So I had to begin the path with that “././” thing. It might even be a defect, not just a documentation missing… I am not sure