How Configure database connections for R2DBC - H2DB?

Answered

Hello, 

How Can I "Configure database connections" for the reactive driver R2DBC? I am trying to configure R2DBC however, seems like Intellij only have JDBC drivers. I am trying connect R2dbc/H2db.

Thanks

0
5 comments

As it said in the documentation,

> Spring Data R2DBC allows a functional approach to interact with your database providing DatabaseClient as the entry point for applications.

So, the database here is a standard relational database like Postgres, H2, or Microsoft SQL Server

Feel free to use any of these drivers to configure database connections. I suppose, you need to connect H2: https://i.imgur.com/vPz7OlC.png

0

Thanks for the answer; however, the Intellij "Configure Database Connections" are not allowing the URL: 

r2dbc:h2:mem:///testdb  (documentation: https://github.com/r2dbc/r2dbc-h2 ).

 

The database H2 Instance  works in memory (I can vefiry that in PostMan), but when I am try configure this in the "Configure Database Connections", only accept the H2 JDBC URL(jdbc:h2:mem:///testdb), when I try use H2 R2DBC URL(r2dbc:h2:mem:///testdb), Intellij does not allow that.

 

Ho to make URL field, in "Configure Database Connections", accept R2DBC?

 

0

Just use JDBC. R2DBC is for accessing from Spring. 

0

Thx a lot, another fast question.. How Can I see my MemoryDB be updated in the "Intellij Database"?, because seems like IntelliJ does not update this int "Configure Database Connections" when I am using H2 in Memory.

0

What database type did you define in IntelliJ? Try to create a remote H2 data source. You may have to explicitly press the Synchronize button in the IntelliJ Database window to get the database tables to show up.

0

Please sign in to leave a comment.