IndexedDBKeyPath Class

A key path (https://w3c.github.io/IndexedDB/#key-path-construct): a string (identifiers separated by periods, or the empty string) or a list of strings.

public sealed class IndexedDBKeyPath : IEquatable<IndexedDBKeyPath>
Implements

Properties

NameDescription
IsListGets whether the key path is a list.
PathGets the string key path, or null when the key path is a list.
PathsGets the strings of a list key path, or null when the key path is a string.

Gets whether the key path is a list.

public bool IsList { get; }

Property value

bool

Gets the string key path, or null when the key path is a list.

public string? Path { get; }

Property value

string?

Gets the strings of a list key path, or null when the key path is a string.

public IReadOnlyList<string>? Paths { get; }

Methods

NameDescription
Equals(IndexedDBKeyPath?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
FromList(IEnumerable<string>)Creates a list key path.
FromString(string)Creates a string key path.
GetHashCode()Serves as the default hash function.
ToString()Returns the string key path, or the strings of the list separated by commas in brackets.

Equals overloads

Equals(IndexedDBKeyPath?)

IndexedDBBackend.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(IndexedDBKeyPath? other)
Parameters
other IndexedDBKeyPath?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

IndexedDBBackend.cs

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current object.
Returns

bool true if the specified object is equal to the current object; otherwise, false.

FromList(IEnumerable<string>)

IndexedDBBackend.cs

Creates a list key path.

public static IndexedDBKeyPath FromList(IEnumerable<string> paths)

FromString(string)

IndexedDBBackend.cs

Creates a string key path.

public static IndexedDBKeyPath FromString(string path)

Parameters

path string

Returns

IndexedDBKeyPath

GetHashCode()

IndexedDBBackend.cs

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Returns the string key path, or the strings of the list separated by commas in brackets.

public override string ToString()

Returns

string