Hello!

Recent versions of H2 fully support identity columns from the SQL Standard 
and their retrieving functionality from the JDBC specification.

What exactly doesn't work for you? How these columns are defined? How rows 
are inserted? How exactly LibreOffice tries to read generated values with 
your driver?

For example, an application that uses own driver of H2 should execute 
commands like these:

Statement stat = connection.createStatement();
stat.execute("CREATE TABLE TEST(ID BIGINT GENERATED BY DEFAULT AS IDENTITY 
PRIMARY KEY, V INTEGER)");
PreparedStatement prep = connection.prepareStatement("INSERT INTO TEST(V) 
VALUES (?)",
        Statement.RETURN_GENERATED_KEYS);
prep.setInt(1, 10);
prep.executeUpdate();
try (ResultSet rs = prep.getGeneratedKeys()) {
    rs.next();
    System.out.println(rs.getLong("ID"));
}

Actually you can run into some unrelated issue of LibreOffice that most 
likely is not going to be fixed, because they don't really want to spend 
time on additional database systems.
For example, there is a problem with tables from JDBC metadata:
https://bugs.documentfoundation.org/show_bug.cgi?id=146673

I also don't understand why you need to create an alternative driver, but 
you may have own reasons.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/b5f23edf-1645-4c07-9fa7-931048354825n%40googlegroups.com.

Reply via email to