Class CommandPartition
Represents a partition of data upon which a SpannerCommand will execute. Partitions are useful for parallelizing large operations across several tasks or processes.
Implements
Namespace: Google.Cloud.Spanner.Data
Assembly: Google.Cloud.Spanner.Data.dll
Syntax
public sealed class CommandPartition : IEquatable<CommandPartition>
Properties
PartitionId
The Id for the set of data to be included when the SpannerCommand executes.
Declaration
public string PartitionId { get; }
Property Value
Type | Description |
---|---|
string |
Methods
FromBase64String(string)
Creates a new CommandPartition based on the text returned by a previous call to ToBase64String().
Declaration
public static CommandPartition FromBase64String(string base64String)
Parameters
Type | Name | Description |
---|---|---|
string | base64String | The base64 representation of the command partition. Must not be null. |
Returns
Type | Description |
---|---|
CommandPartition | The CommandPartition representation of the partition. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |
Overrides
ToBase64String()
Serializes this command partition as base64 text.
Declaration
public string ToBase64String()
Returns
Type | Description |
---|---|
string | The base64 representation of this partition. |
Remarks
After partitioning a query, the partitions can be serialized using this method, then deserialized with FromBase64String(string) on multiple machines, allowing parallel processing.