Class KeyRange (3.13.0)

public sealed class KeyRange

Immutable class that defines a range of keys to select from a table or index.

Inheritance

Object > KeyRange

Namespace

Google.Cloud.Spanner.Data

Assembly

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
TypeDescription
Key

BeginInclusive

public bool BeginInclusive { get; }

True if the start of the key range is inclusive, and false otherwise.

Property Value
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
beginKey

The begin of the key range (inclusive)

endKey

The end of the key range (inclusive)

Returns
TypeDescription
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
NameDescription
beginKey

The begin of the key range (inclusive)

endKey

The end of the key range (exclusive)

Returns
TypeDescription
KeyRange

A new KeyRange for the keys [begin, end)

GetHashCode()

public override int GetHashCode()
Returns
TypeDescription
Int32
Overrides

OpenClosed(Key, Key)

public static KeyRange OpenClosed(Key begin, Key end)

Creates a new KeyRange with an exclusive begin and inclusive end.

Parameters
NameDescription
beginKey

The begin of the key range (exclusive)

endKey

The end of the key range (inclusive)

Returns
TypeDescription
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
NameDescription
beginKey

The begin of the key range (exclusive)

endKey

The end of the key range (exclusive)

Returns
TypeDescription
KeyRange

A new KeyRange for the keys (begin, end)

ToString()

public override string ToString()
Returns
TypeDescription
String
Overrides