Skip to content

Commit

Permalink
fix: zonky fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Nolife999 committed Oct 27, 2023
1 parent 34115b0 commit 630c335
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,17 @@ private static Connection instanciateTestDatabase()
pg = EmbeddedPostgres.start();
connection = pg.getPostgresDatabase().getConnection();

String user = connection.getMetaData().getUserName();
String database = UtilitaireDao.get(0).getString(connection, new GenericPreparedStatementBuilder("select current_database()"));

System.out.println("§§§§§§§");
System.out.println(user);

UtilitaireDao.get(0).executeImmediate(connection, "GRANT CREATE ON DATABASE "+database+" TO "+user+";");
String version = UtilitaireDao.get(0).getString(connection, new GenericPreparedStatementBuilder("select version()"));
System.out.println("§§§§§");
System.out.println(version);




} catch (IOException | SQLException e) {
connection = null;
} catch (ArcException e) {
connection = null;

}
return connection;
}
Expand Down

0 comments on commit 630c335

Please sign in to comment.