public sealed 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) |
GetHashCode()
public override int GetHashCode()
Returns | |
---|---|
Type | Description |
Int32 |
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()
public override string ToString()
Returns | |
---|---|
Type | Description |
String |