IntelliJ IDEA H2 Support: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * IntelliJ * H2 =Overview= An external H2 instance must be running and exposing access over network. This article explains how to do th...")
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
=Overview=
=Overview=


An external H2 instance must be running and exposing access over network. This article explains how to do that: .
An external H2 instance must be running and exposing access over network. This article explains how to do that:  


\Right edge tabs -> Database -> + -> Driver -> PostgreSQL -> make sure it's downloaded and it is new enough.
{{Internal|H2#Accessing_an_H2_Instance_Embedded_within_a_Different_JVM|Accessing an H2 Instance Embedded within a Different JVM}}


Right edge tabs -> Database -> + -> Data Source -> PostgreSQL:
Right edge tabs -> Database -> + -> Driver -> H2 -> make sure it's downloaded and it is new enough.


Name: Docker Posgres
Right edge tabs -> Database -> + -> Data Source -> H2:


Host: localhost
Name: "H2 instance in another JVM"


Port: 5432
From the URL dropdown box, select "URL only" and use the following URL:


Database: postgres
jdbc:h2:tcp://localhost/mem:default;DB_CLOSE_DELAY=-1


User: admin
User: sa


Password: the password you used during the container configuration phase. Select "Remember password".
Password: leave it empty


Test Connection.
Test Connection.


Apply -> OK.
Apply -> OK.
For more details on this database mode, see: {{Internal|H2#Accessing_an_H2_Instance_Embedded_within_a_Different_JVM|Accessing an H2 Instance Embedded within a Different JVM}}

Latest revision as of 18:08, 31 October 2018

Internal

Overview

An external H2 instance must be running and exposing access over network. This article explains how to do that:

Accessing an H2 Instance Embedded within a Different JVM

Right edge tabs -> Database -> + -> Driver -> H2 -> make sure it's downloaded and it is new enough.

Right edge tabs -> Database -> + -> Data Source -> H2:

Name: "H2 instance in another JVM"

From the URL dropdown box, select "URL only" and use the following URL:

jdbc:h2:tcp://localhost/mem:default;DB_CLOSE_DELAY=-1

User: sa

Password: leave it empty

Test Connection.

Apply -> OK.

For more details on this database mode, see:

Accessing an H2 Instance Embedded within a Different JVM