joao-r-reis commented on code in PR #1924:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1924#discussion_r2747010794


##########
session.go:
##########
@@ -2079,6 +2085,12 @@ func (b *Batch) SerialConsistency(cons Consistency) 
*Batch {
        return b
 }
 
+// GetSerialConsistency returns the currently configured serial consistency 
level for
+// the batch.
+func (b *Batch) GetSerialConsistency() Consistency {
+       return b.serialCons

Review Comment:
   If serial consistency was never set then this will actually be an invalid 
value (ANY) and if a user tries to use this value to set the serial consistency 
of another query the driver will panic. We can return *Consistency so that we 
can return nil in case it wasn't set and document it on the function's godoc



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to