toptobes commented on code in PR #1943:
URL:
https://github.com/apache/cassandra-gocql-driver/pull/1943#discussion_r3607104683
##########
query_executor.go:
##########
@@ -69,16 +71,151 @@ type internalRequest interface {
}
type queryExecutor struct {
- pool *policyConnPool
- policy HostSelectionPolicy
+ pool *policyConnPool
+ policy HostSelectionPolicy
+ interceptor ExecAttemptInterceptor
}
-func (q *queryExecutor) attemptQuery(ctx context.Context, qry internalRequest,
conn *Conn) *Iter {
+type OpType int
+
+const (
+ OpQuery OpType = iota
+ OpBatch
+)
+
+type ImmutableQuery interface {
Review Comment:
Very subjective, but I honestly preferred the original `[Query|Batch]View`
names you suggested, they do a better job of representing exactly what's
happening here (+ it __technically__ isn't entirely immutable as the returned
slices can still be mutated, but I don't think it's worth creating defensive
copies)
--
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]