max-melentyev commented on PR #1959:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1959#issuecomment-4712618190

   I'm not sure if any sort of memory pooling make sense, as internalQuery and 
queryOptions are instantiated on every request. Caching pre-configured query 
probably still make sense, as it allows to skip a bunch of builder methods.
   
   Something like this:
   ```go
   query := gocql.NewQuery("SELECT ...").Idempotent()...
   iter1 := session.BindValues(query, arg1, arg2, ...).Iter(ctx)
   iter2 := session.Bind(query, binding).Iter(ctx)
   
   // Where
   (*Session) Bind(Query, args...) BoundQuery
   type BoundQuery struct {
     query *Query
     values []any
   }
   // and it's immutable and only has values to execute it.
   ```


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