martin-sucha commented on issue #1759:
URL: 
https://github.com/apache/cassandra-gocql-driver/issues/1759#issuecomment-2499967470

   There are also other options how to achieve testability of 
HostSelectionPolicy implementations outside of the gocql package.
   
   If this gets changed in a major version, the `HostSelectionPolicy.Pick` 
could take another type instead of `ExecutableQuery`. Which information is 
actually useful for the `HostSelectionPolicy` implementation? For example 
`SetConsistency(c Consistency)` isn't necessary, while `Attempts()` is racy. 
   
   Also, passing a struct instead of interface would allow for new fields to be 
added in backwards compatible way without the users needing to type-check 
everything. By the way, is it possible to type cast the `ExecutableQuery` to 
`*Query` or `*Batch` now in the `HostSelectionPolicy` implementation?
   
   Another option would be to provide a mock `ExecutableQuery` implementation 
directly in the `gocql` package.


-- 
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