@@ -406,6 +406,57 @@ default int getMaxPartitionedParallelism() throws SQLException {
406406 throw new UnsupportedOperationException ();
407407 }
408408
409+ /**
410+ * Enables or disables automatic batching of DML statements. When enabled, DML statements that are
411+ * executed on this connection will be buffered in memory instead of actually being executed. The
412+ * buffered DML statements are flushed to Spanner when a statement that cannot be part of a DML
413+ * batch is executed on the connection. This can be a query, a DDL statement with a THEN RETURN
414+ * clause, or a Commit call. The update count that is returned for DML statements that are
415+ * buffered is determined by the value that has been set with {@link
416+ * #setAutoBatchDmlUpdateCount(long)}. The default is 1. The connection verifies that the update
417+ * counts that were returned while buffering DML statements match the actual update counts that
418+ * are returned by Spanner when the batch is executed. This verification can be disabled by
419+ * calling {@link #setAutoBatchDmlUpdateCountVerification(boolean)}.
420+ */
421+ default void setAutoBatchDml (boolean autoBatchDml ) throws SQLException {
422+ throw new UnsupportedOperationException ();
423+ }
424+
425+ /** Returns whether automatic DML batching is enabled on this connection. */
426+ default boolean isAutoBatchDml () throws SQLException {
427+ throw new UnsupportedOperationException ();
428+ }
429+
430+ /**
431+ * Sets the update count that is returned for DML statements that are buffered during an automatic
432+ * DML batch. This value is only used if {@link #isAutoBatchDml()} is enabled.
433+ */
434+ default void setAutoBatchDmlUpdateCount (long updateCount ) throws SQLException {
435+ throw new UnsupportedOperationException ();
436+ }
437+
438+ /**
439+ * Returns the update count that is returned for DML statements that are buffered during an
440+ * automatic DML batch.
441+ */
442+ default long getAutoBatchDmlUpdateCount () throws SQLException {
443+ throw new UnsupportedOperationException ();
444+ }
445+
446+ /**
447+ * Sets whether the update count that is returned by Spanner after executing an automatic DML
448+ * batch should be verified against the update counts that were returned during the buffering of
449+ * those statements.
450+ */
451+ default void setAutoBatchDmlUpdateCountVerification (boolean verification ) throws SQLException {
452+ throw new UnsupportedOperationException ();
453+ }
454+
455+ /** Indicates whether the update counts of automatic DML batches should be verified. */
456+ default boolean isAutoBatchDmlUpdateCountVerification () throws SQLException {
457+ throw new UnsupportedOperationException ();
458+ }
459+
409460 /**
410461 * @see
411462 * com.google.cloud.spanner.connection.Connection#addTransactionRetryListener(com.google.cloud.spanner.connection.TransactionRetryListener)
0 commit comments