You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "joao-r-reis (via GitHub)" <gi...@apache.org> on 2025/07/01 20:25:46 UTC

[PR] CASSGO-80 Update examples for 2.0 [cassandra-gocql-driver]

joao-r-reis opened a new pull request, #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897

   (no comment)


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "lukasz-antoniak (via GitHub)" <gi...@apache.org>.
lukasz-antoniak commented on code in PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#discussion_r2324149180


##########
example_batch_test.go:
##########


Review Comment:
   What do you think about removing `ProtoVersion` assignment from examples to prevent users hardcoding it in their applications?



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "joao-r-reis (via GitHub)" <gi...@apache.org>.
joao-r-reis commented on code in PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#discussion_r2382762876


##########
example_lwt_batch_test.go:
##########
@@ -72,7 +72,7 @@ func ExampleSession_MapExecuteBatchCAS() {
 			Args: []interface{}{"B", "pk1", "ck2", ck2Version},
 		})
 		m := make(map[string]interface{})
-		applied, iter, err := b.WithContext(ctx).MapExecCAS(m)
+		applied, iter, err := b.MapExecCAS(m)

Review Comment:
   done



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "joao-r-reis (via GitHub)" <gi...@apache.org>.
joao-r-reis merged PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "lukasz-antoniak (via GitHub)" <gi...@apache.org>.
lukasz-antoniak commented on PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#issuecomment-3258354193

   LGTM


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "joao-r-reis (via GitHub)" <gi...@apache.org>.
joao-r-reis commented on code in PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#discussion_r2325083052


##########
example_batch_test.go:
##########


Review Comment:
   Honestly I think it might be better to keep that for now until we have a chance to properly rework the protocol version negotiation to what other drivers do...



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "joao-r-reis (via GitHub)" <gi...@apache.org>.
joao-r-reis commented on PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#issuecomment-3258345807

   > Shall we also add an example for types registration (like [here](https://github.com/apache/cassandra-gocql-driver/pull/1855))?
   
   The current state of that feature is probably only useful for users that are using a different DB other than Cassandra like yugabyte. That example is for a yugabyte type that Cassandra itself doesn't support. Eventually we should add proper custom and udt type support to this API and at that point I think it will become useful to the common user and at that point I think it definitely deserves an example. As it stands I don't even have a way to verify that the jsonb example works because it requires a yugabyte db so I'd say we don't add one for now.


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "lukasz-antoniak (via GitHub)" <gi...@apache.org>.
lukasz-antoniak commented on code in PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#discussion_r2324149180


##########
example_batch_test.go:
##########


Review Comment:
   What do you think about removing `ProtoVersion` assignment from examples to prevent users hardcoding 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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "worryg0d (via GitHub)" <gi...@apache.org>.
worryg0d commented on code in PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#discussion_r2339538074


##########
example_lwt_batch_test.go:
##########
@@ -72,7 +72,7 @@ func ExampleSession_MapExecuteBatchCAS() {
 			Args: []interface{}{"B", "pk1", "ck2", ck2Version},
 		})
 		m := make(map[string]interface{})
-		applied, iter, err := b.WithContext(ctx).MapExecCAS(m)
+		applied, iter, err := b.MapExecCAS(m)

Review Comment:
   nit: I think here should be shown an example context api as in other examples.
   
   `applied, iter, err := b.MapExecCASContext(ctx, m)`



-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org


Re: [PR] CASSGO-80 Update example and test code for 2.0 [cassandra-gocql-driver]

Posted by "lukasz-antoniak (via GitHub)" <gi...@apache.org>.
lukasz-antoniak commented on PR #1897:
URL: https://github.com/apache/cassandra-gocql-driver/pull/1897#issuecomment-3257364105

   Shall we also add an example for types registration (like [here](https://github.com/apache/cassandra-gocql-driver/pull/1855))?


-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org