public sealed class KeyRange
Reference documentation and code samples for the Google.Cloud.Spanner.Data class KeyRange.
Immutable class that defines a range of keys to select from a table or index.
Namespace
Google.Cloud.Spanner.DataAssembly
Google.Cloud.Spanner.Data.dll
Properties
BeginAt
public Key BeginAt { get; }
The start of the key range. It can be inclusive or exclusive, depending on the value of BeginInclusive.
Property Value | |
---|---|
Type | Description |
Key |
BeginInclusive
public bool BeginInclusive { get; }
True if the start of the key range is inclusive, and false otherwise.
Property Value | |
---|---|
Type | Description |
Boolean |
End
public Key End { get; }
The end of the key range. It can be inclusive or exclusive, depending on the value of EndInclusive.
Property Value | |
---|---|
Type | Description |
Key |
EndInclusive
public bool EndInclusive { get; }
True if the end of the key range is inclusive, and false if the end is exclusive.
Property Value | |
---|---|
Type | Description |
Boolean |
Methods
ClosedClosed(Key, Key)
public static KeyRange ClosedClosed(Key begin, Key end)
Creates a new KeyRange with an inclusive begin and inclusive end.
Parameters | |
---|---|
Name | Description |
begin | Key The begin of the key range (inclusive) |
end | Key The end of the key range (inclusive) |
Returns | |
---|---|
Type | Description |
KeyRange | A new KeyRange for the keys [begin, end] |
ClosedOpen(Key, Key)
public static KeyRange ClosedOpen(Key begin, Key end)
Creates a new KeyRange with an inclusive begin and exclusive end.
Parameters | |
---|---|
Name | Description |
begin | Key The begin of the key range (inclusive) |
end | Key The end of the key range (exclusive) |
Returns | |
---|---|
Type | Description |
KeyRange | A new KeyRange for the keys [begin, end) |
OpenClosed(Key, Key)
public static KeyRange OpenClosed(Key begin, Key end)
Creates a new KeyRange with an exclusive begin and inclusive end.
Parameters | |
---|---|
Name | Description |
begin | Key The begin of the key range (exclusive) |
end | Key The end of the key range (inclusive) |
Returns | |
---|---|
Type | Description |
KeyRange | A new KeyRange for the keys (begin, end] |
OpenOpen(Key, Key)
public static KeyRange OpenOpen(Key begin, Key end)
Creates a new KeyRange with an exclusive begin and exclusive end.
Parameters | |
---|---|
Name | Description |
begin | Key The begin of the key range (exclusive) |
end | Key The end of the key range (exclusive) |
Returns | |
---|---|
Type | Description |
KeyRange | A new KeyRange for the keys (begin, end) |
ToString(SpannerConnectionStringBuilder)
public string ToString(SpannerConnectionStringBuilder builder)
Returns the string representation of this KeyRange using the type conversion options specified in SpannerConnectionStringBuilder. The string representation is only for diagnostic purposes and the implementation may change over time.
Parameter | |
---|---|
Name | Description |
builder | SpannerConnectionStringBuilder The SpannerConnectionStringBuilder instance. |
Returns | |
---|---|
Type | Description |
String | A string that represents the current KeyRange. |