diff --git a/documentation/connection_properties.md b/documentation/connection_properties.md index abc908842..cedb01d04 100644 --- a/documentation/connection_properties.md +++ b/documentation/connection_properties.md @@ -10,7 +10,7 @@ The 'Context' value indicates whether the property can only be set when a connec | auto_batch_dml_update_count | DML statements that are executed when auto_batch_dml is set to true, are not directly sent to Spanner, but are buffered in the client until the batch is flushed. This property determines the update count that is returned for these DML statements. The default is 1, as that is the update count that is expected by most ORMs (e.g. Hibernate). | 1 | | USER | | auto_batch_dml_update_count_verification | The update count that is returned for DML statements that are buffered during an automatic DML batch is by default 1. This value can be changed by setting the connection variable auto_batch_dml_update_count. The update counts that are returned by Spanner when the DML statements are actually executed are verified against the update counts that were returned when they were buffered. If these do not match, a com.google.cloud.spanner.DmlBatchUpdateCountVerificationFailedException will be thrown. You can disable this verification by setting auto_batch_dml_update_count_verification to false. | true | true, false | USER | | autocommit | Should the connection start in autocommit (true/false) | true | true, false | USER | -| autocommit_dml_mode | Determines the transaction type that is used to execute DML statements when the connection is in auto-commit mode. | TRANSACTIONAL | TRANSACTIONAL, PARTITIONED_NON_ATOMIC, TRANSACTIONAL_WITH_FALLBACK_TO_PARTITIONED_NON_ATOMIC | USER | +| autocommit_dml_mode | Determines the transaction type that is used to execute DML statements when the connection is in auto-commit mode. | TRANSACTIONAL | TRANSACTIONAL, PARTITIONED_NON_ATOMIC, TRANSACTIONAL_WITH_FALLBACK_TO_PARTITIONED_NON_ATOMIC, null | USER | | autoconfigemulator | Automatically configure the connection to try to connect to the Cloud Spanner emulator (true/false). The instance and database in the connection string will automatically be created if these do not yet exist on the emulator. Add dialect=postgresql to the connection string to make sure that the database that is created uses the PostgreSQL dialect. | false | true, false | STARTUP | | autopartitionmode | Execute all queries on this connection as partitioned queries. Executing a query that cannot be partitioned will fail. Executing a query in a read/write transaction will also fail. | false | true, false | USER | | channelprovider | The name of the channel provider class. The name must reference an implementation of ExternalChannelProvider. If this property is not set, the connection will use the default grpc channel provider. | | | STARTUP | @@ -22,6 +22,7 @@ The 'Context' value indicates whether the property can only be set when a connec | databaserole | Sets the database role to use for this connection. The default is privileges assigned to IAM role | | | STARTUP | | databoostenabled | Enable data boost for all partitioned queries that are executed by this connection. This setting is only used for partitioned queries and is ignored by all other statements. | false | true, false | USER | | ddlintransactionmode | Determines how the connection should handle DDL statements in a read/write transaction. | ALLOW_IN_EMPTY_TRANSACTION | FAIL, ALLOW_IN_EMPTY_TRANSACTION, AUTO_COMMIT_TRANSACTION | USER | +| default_isolation_level | The transaction isolation level that is used by default for read/write transactions. The default is isolation_level_unspecified, which means that the connection will use the default isolation level of the database that it is connected to. | ISOLATION_LEVEL_UNSPECIFIED | ISOLATION_LEVEL_UNSPECIFIED, SERIALIZABLE, REPEATABLE_READ | USER | | defaultsequencekind | The default sequence kind that should be used for the database. This property is only used when a DDL statement that requires a default sequence kind is executed on this connection. | | | USER | | delaytransactionstartuntilfirstwrite | Enabling this option will delay the actual start of a read/write transaction until the first write operation is seen in that transaction. All reads that happen before the first write in a transaction will instead be executed as if the connection was in auto-commit mode. Enabling this option will make read/write transactions lose their SERIALIZABLE isolation level. Read operations that are executed after the first write operation in a read/write transaction will be executed using the read/write transaction. Enabling this mode can reduce locking and improve performance for applications that can handle the lower transaction isolation semantics. | false | true, false | USER | | dialect | Sets the dialect to use for new databases that are created by this connection. | GOOGLE_STANDARD_SQL | GOOGLE_STANDARD_SQL, POSTGRESQL | STARTUP | @@ -48,7 +49,7 @@ The 'Context' value indicates whether the property can only be set when a connec | retryabortsinternally | Should the connection automatically retry Aborted errors (true/false) | true | true, false | USER | | returncommitstats | Request that Spanner returns commit statistics for read/write transactions (true/false) | false | true, false | USER | | routetoleader | Should read/write transactions and partitioned DML be routed to leader region (true/false) | true | true, false | STARTUP | -| rpcpriority | Sets the priority for all RPC invocations from this connection (HIGH/MEDIUM/LOW). The default is HIGH. | | LOW, MEDIUM, HIGH, UNSPECIFIED | USER | +| rpcpriority | Sets the priority for all RPC invocations from this connection (HIGH/MEDIUM/LOW). The default is HIGH. | | LOW, MEDIUM, HIGH, UNSPECIFIED, null | USER | | savepoint_support | Determines the behavior of the connection when savepoints are used. | FAIL_AFTER_ROLLBACK | ENABLED, FAIL_AFTER_ROLLBACK, DISABLED | USER | | tracing_prefix | The prefix that will be prepended to all OpenTelemetry traces that are generated by a Connection. | CloudSpanner | | STARTUP | | trackconnectionleaks | Capture the call stack of the thread that created a connection. This will pre-create a LeakedConnectionException already when a connection is created. This can be disabled, for example if a monitoring system logs the pre-created exception. If disabled, the LeakedConnectionException will only be created when an actual connection leak is detected. The stack trace of the exception will in that case not contain the call stack of when the connection was created. | true | true, false | STARTUP | diff --git a/pom.xml b/pom.xml index 999527f09..66429c409 100644 --- a/pom.xml +++ b/pom.xml @@ -61,7 +61,7 @@ com.google.cloud google-cloud-spanner-bom - 6.89.0 + 6.90.0 pom import diff --git a/samples/spring-data-jdbc/pom.xml b/samples/spring-data-jdbc/pom.xml index 4bf54fdb3..2a29fa1c0 100644 --- a/samples/spring-data-jdbc/pom.xml +++ b/samples/spring-data-jdbc/pom.xml @@ -30,7 +30,7 @@ com.google.cloud google-cloud-spanner-bom - 6.89.0 + 6.90.0 import pom diff --git a/src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java b/src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java index 7e64b8f11..cde651e02 100644 --- a/src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java +++ b/src/main/java/com/google/cloud/spanner/connection/ConnectionPropertiesHelper.java @@ -21,6 +21,7 @@ import java.sql.DriverPropertyInfo; import java.util.Arrays; import java.util.Comparator; +import java.util.Objects; import java.util.regex.Matcher; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -50,7 +51,7 @@ public static DriverPropertyInfo toDriverPropertyInfo( connectionProperty.getValidValues() == null ? null : Arrays.stream(connectionProperty.getValidValues()) - .map(Object::toString) + .map(Objects::toString) .toArray(String[]::new); return result; } diff --git a/src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java b/src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java index fe8dd9c96..4307fbcb0 100644 --- a/src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java +++ b/src/test/java/com/google/cloud/spanner/connection/ConnectionPropertiesFileGenerator.java @@ -20,6 +20,7 @@ import java.io.FileWriter; import java.io.IOException; import java.util.Arrays; +import java.util.Objects; import java.util.stream.Collectors; /** Generator for the documentation/connection_properties.md file. */ @@ -65,7 +66,7 @@ static String getValidValues(ConnectionProperty connectionProperty) { return connectionProperty.getValidValues() == null ? "" : Arrays.stream(connectionProperty.getValidValues()) - .map(Object::toString) + .map(Objects::toString) .collect(Collectors.joining(", ")); } } diff --git a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcPreparedStatementTest.java b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcPreparedStatementTest.java index 60698799f..99ee00165 100644 --- a/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcPreparedStatementTest.java +++ b/src/test/java/com/google/cloud/spanner/jdbc/it/ITJdbcPreparedStatementTest.java @@ -745,7 +745,8 @@ public void test04_Timestamps() throws SQLException { // Then get it in the test timezone. if (testCalendar != null && !System.getProperty("java.vm.name", "").toLowerCase().contains("graalvm") - && !System.getProperty("java.vendor", "").toLowerCase().contains("graalvm")) { + && !System.getProperty("java.vendor", "").toLowerCase().contains("graalvm") + && !System.getProperty("java.vendor", "").toLowerCase().contains("oracle")) { Timestamp inOtherTZ = rs.getTimestamp(4, testCalendar); assertEquals( "Timezone: " @@ -768,7 +769,8 @@ public void test04_Timestamps() throws SQLException { if (testCalendar == null) { assertEquals(testTimestamp.getTime(), inDefaultTZ.getTime()); } else if (!System.getProperty("java.vm.name", "").toLowerCase().contains("graalvm") - && !System.getProperty("java.vendor", "").toLowerCase().contains("graalvm")) { + && !System.getProperty("java.vendor", "").toLowerCase().contains("graalvm") + && !System.getProperty("java.vendor", "").toLowerCase().contains("oracle")) { assertEquals( "Timezone: " + testCalendar diff --git a/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-spanner-jdbc/native-image.properties b/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-spanner-jdbc/native-image.properties new file mode 100644 index 000000000..714d90fb1 --- /dev/null +++ b/src/test/resources/META-INF/native-image/com.google.cloud/google-cloud-spanner-jdbc/native-image.properties @@ -0,0 +1 @@ +Args=--strict-image-heap