Skip to content
Advertisement

Tag: database

How to create hibernate request with localdate

I have a user who has an expiration date (dateTime), I need to display all users who have not expired yet. Tried different options with DATA (), or as an example – but it doesn’t output anything. But when asked in MySQL – SELECT * FROM user where user.date> NOW () displays everything as it should. Tell me how to

Java H2 Mixed mode (embedded and server) external connection

I am trying to convert my existing embedded H2 database and enable external connections to it. Currently my properties are For a local connection to my db in this mode I seem to be able to connect to “jdbc:h2:file:./db;AUTO_SERVER=TRUE;AUTO_SERVER_PORT=9090” through my intellej IDE. If this database is hosted on a external server how do i connect to it? I have

How close possibility to add new data in H2?

I have a problem. After adding some data to database, I need to set read-only mode for whole DB. What is the easiest way to do that using h2 embedded DB with driver manager (jdbc)? Answer You can open the whole database in read-only mode by appending ;ACCESS_MODE_DATA=r to the JDBC URL (“jdbc:h2:” + “./” + dbName + “;ACCESS_MODE_DATA=r” in

Advertisement