private boolean dialectIsPostgres()

in google-cloud-spanner-hibernate-tools/src/main/java/com/google/cloud/spanner/hibernate/AbstractTransactionTagInterceptor.java [72:87]


  private boolean dialectIsPostgres(Session session) {
    if (this.dialectIsPostgres == null) {
      synchronized (this) {
        if (this.dialectIsPostgres == null) {
          SessionFactory factory = session.getSessionFactory();
          if (factory instanceof SessionFactoryImpl) {
            Dialect dialect = ((SessionFactoryImpl) factory).getJdbcServices().getDialect();
            this.dialectIsPostgres = dialect.openQuote() == '"';
          } else {
            this.dialectIsPostgres = false;
          }
        }
      }
    }
    return this.dialectIsPostgres;
  }