@@ -491,7 +491,7 @@ func TestConnection_Reset(t *testing.T) {
491491 state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {
492492 propertyCommitResponse .Key (): propertyCommitResponse .CreateTypedInitialValue (nil ),
493493 }),
494- batch : & batch {tp : dml },
494+ batch : & batch {tp : parser . BatchTypeDml },
495495 tx : & readOnlyTransaction {
496496 logger : noopLogger ,
497497 close : func (_ txResult ) {
@@ -569,11 +569,11 @@ func TestConn_StartBatchDdl(t *testing.T) {
569569 wantErr bool
570570 }{
571571 {"Default" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, false },
572- {"In DDL batch" , & conn {logger : noopLogger , batch : & batch {tp : ddl }, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
573- {"In DML batch" , & conn {logger : noopLogger , batch : & batch {tp : dml }, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
572+ {"In DDL batch" , & conn {logger : noopLogger , batch : & batch {tp : parser . BatchTypeDdl }, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
573+ {"In DML batch" , & conn {logger : noopLogger , batch : & batch {tp : parser . BatchTypeDml }, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
574574 {"In read/write transaction" , & conn {logger : noopLogger , tx : & readWriteTransaction {}, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
575575 {"In read-only transaction" , & conn {logger : noopLogger , tx : & readOnlyTransaction {}, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
576- {"In read/write transaction with a DML batch" , & conn {logger : noopLogger , tx : & readWriteTransaction {batch : & batch {tp : dml }}, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
576+ {"In read/write transaction with a DML batch" , & conn {logger : noopLogger , tx : & readWriteTransaction {batch : & batch {tp : parser . BatchTypeDml }}, state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, true },
577577 } {
578578 err := test .c .StartBatchDDL ()
579579 if test .wantErr {
@@ -598,11 +598,11 @@ func TestConn_StartBatchDml(t *testing.T) {
598598 wantErr bool
599599 }{
600600 {"Default" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {})}, false },
601- {"In DDL batch" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), batch : & batch {tp : ddl }}, true },
602- {"In DML batch" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), batch : & batch {tp : dml }}, true },
601+ {"In DDL batch" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), batch : & batch {tp : parser . BatchTypeDdl }}, true },
602+ {"In DML batch" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), batch : & batch {tp : parser . BatchTypeDml }}, true },
603603 {"In read/write transaction" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), tx : & readWriteTransaction {logger : noopLogger }}, false },
604604 {"In read-only transaction" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), tx : & readOnlyTransaction {logger : noopLogger }}, true },
605- {"In read/write transaction with a DML batch" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), tx : & readWriteTransaction {logger : noopLogger , batch : & batch {tp : dml }}}, true },
605+ {"In read/write transaction with a DML batch" , & conn {logger : noopLogger , state : createInitialConnectionState (connectionstate .TypeTransactional , map [string ]connectionstate.ConnectionPropertyValue {}), tx : & readWriteTransaction {logger : noopLogger , batch : & batch {tp : parser . BatchTypeDml }}}, true },
606606 } {
607607 err := test .c .StartBatchDML ()
608608 if test .wantErr {
@@ -629,7 +629,7 @@ func TestConn_NonDdlStatementsInDdlBatch(t *testing.T) {
629629 parser : p ,
630630 logger : noopLogger ,
631631 state : createInitialConnectionState (connectionstate .TypeNonTransactional , map [string ]connectionstate.ConnectionPropertyValue {}),
632- batch : & batch {tp : ddl },
632+ batch : & batch {tp : parser . BatchTypeDdl },
633633 execSingleQuery : func (ctx context.Context , c * spanner.Client , statement spanner.Statement , tb spanner.TimestampBound , options * ExecOptions ) * spanner.RowIterator {
634634 return & spanner.RowIterator {}
635635 },
@@ -669,7 +669,7 @@ func TestConn_NonDmlStatementsInDmlBatch(t *testing.T) {
669669 parser : p ,
670670 logger : noopLogger ,
671671 state : createInitialConnectionState (connectionstate .TypeNonTransactional , map [string ]connectionstate.ConnectionPropertyValue {}),
672- batch : & batch {tp : dml },
672+ batch : & batch {tp : parser . BatchTypeDml },
673673 execSingleQuery : func (ctx context.Context , c * spanner.Client , statement spanner.Statement , tb spanner.TimestampBound , options * ExecOptions ) * spanner.RowIterator {
674674 return & spanner.RowIterator {}
675675 },
0 commit comments