Ver código fonte

Document unset value (#1060)

* document UnsetValue

* mention that UnsetValue only works with protocol v4
Vincent Rischmann 7 anos atrás
pai
commit
c79450b345
1 arquivos alterados com 7 adições e 0 exclusões
  1. 7 0
      frame.go

+ 7 - 0
frame.go

@@ -18,6 +18,13 @@ import (
 
 type unsetColumn struct{}
 
+// UnsetValue represents a value used in a query binding that will be ignored by Cassandra.
+//
+// By setting a field to the unset value Cassandra will ignore the write completely.
+// The main advantage is the ability to keep the same prepared statement even when you don't
+// want to update some fields, where before you needed to make another prepared statement.
+//
+// UnsetValue is only available when using the version 4 of the protocol.
 var UnsetValue = unsetColumn{}
 
 type namedValue struct {