From 5c778b2c786f3849555aa4e37450876194f498e9 Mon Sep 17 00:00:00 2001 From: Sri Harsha CH <57220027+harshachinta@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:49:41 +0530 Subject: [PATCH] feat(spanner): add method (#8945) Co-authored-by: rahul2393 --- spanner/batch.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spanner/batch.go b/spanner/batch.go index e1ed21f23cbc..87696c2e2bbf 100644 --- a/spanner/batch.go +++ b/spanner/batch.go @@ -449,3 +449,11 @@ func (p *Partition) UnmarshalBinary(data []byte) error { } return err } + +// GetPartitionToken returns partition token +func (p *Partition) GetPartitionToken() []byte { + if p != nil { + return p.pt + } + return nil +}