question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add an example for r2dbc connection URL

See original GitHub issue

it 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mp911decommented, Feb 28, 2020

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.

0reactions
62mkvcommented, Feb 28, 2020

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found