Skip to content

Commit a8073d7

Browse files
committed
deprecate Context() methods
1 parent 28b5f48 commit a8073d7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

session.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,8 @@ func (q *Query) CustomPayload(customPayload map[string][]byte) *Query {
10731073
return q
10741074
}
10751075

1076+
// Deprecated: Context retrieval is deprecated. Pass context directly to execution methods
1077+
// like ExecContext or IterContext instead.
10761078
func (q *Query) Context() context.Context {
10771079
if q.context == nil {
10781080
return context.Background()
@@ -1888,6 +1890,8 @@ func (b *Batch) SetConsistency(c Consistency) {
18881890
b.Cons = c
18891891
}
18901892

1893+
// Deprecated: Context retrieval is deprecated. Pass context directly to execution methods
1894+
// like ExecContext or IterContext instead.
18911895
func (b *Batch) Context() context.Context {
18921896
if b.context == nil {
18931897
return context.Background()

0 commit comments

Comments
 (0)