Mallard
Search Results for

    Show / Hide Table of Contents

    Class DuckDbEnumDictionary

    Retrieves the names of the members in a DuckDB enumeration.

    Inheritance
    object
    DuckDbEnumDictionary
    Implements
    IReadOnlyDictionary<uint, string>
    IReadOnlyCollection<KeyValuePair<uint, string>>
    IEnumerable<KeyValuePair<uint, string>>
    IEnumerable
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Mallard
    Assembly: Mallard.dll
    Syntax
    public sealed class DuckDbEnumDictionary : IReadOnlyDictionary<uint, string>, IReadOnlyCollection<KeyValuePair<uint, string>>, IEnumerable<KeyValuePair<uint, string>>, IEnumerable, IDisposable
    Remarks

    The names may be retrieved on-demand from DuckDB, since the enumeration may be quite large yet most of its members may not be used in a particular query's results. Thus this class holds a native resource (handle to a DuckDB logical type) and is disposable.

    Properties

    | Edit this page View Source

    Count

    Gets the number of elements in the collection.

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    int

    The number of elements in the collection.

    | Edit this page View Source

    this[uint]

    Get the string corresponding to an enumeration value.

    Declaration
    public string this[uint key] { get; }
    Parameters
    Type Name Description
    uint key

    The enumeration value.

    Property Value
    Type Description
    string

    The string associated to the enumeration value when the enumeration was defined in DuckDB.

    | Edit this page View Source

    Keys

    Gets an enumerable collection that contains the keys in the read-only dictionary.

    Declaration
    public IEnumerable<uint> Keys { get; }
    Property Value
    Type Description
    IEnumerable<uint>

    An enumerable collection that contains the keys in the read-only dictionary.

    | Edit this page View Source

    Values

    Gets an enumerable collection that contains the values in the read-only dictionary.

    Declaration
    public IEnumerable<string> Values { get; }
    Property Value
    Type Description
    IEnumerable<string>

    An enumerable collection that contains the values in the read-only dictionary.

    Methods

    | Edit this page View Source

    ContainsKey(uint)

    Determines whether the read-only dictionary contains an element that has the specified key.

    Declaration
    public bool ContainsKey(uint key)
    Parameters
    Type Name Description
    uint key

    The key to locate.

    Returns
    Type Description
    bool

    true if the read-only dictionary contains an element that has the specified key; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    | Edit this page View Source

    Dispose()

    Disposes the resource held from the natice DuckDB library, if any exists currently, used to query the enumeration members.

    Declaration
    public void Dispose()
    Remarks

    After calling this method, this instance should not be used again.

    | Edit this page View Source

    ~DuckDbEnumDictionary()

    Declaration
    protected ~DuckDbEnumDictionary()
    | Edit this page View Source

    GetEnumerator()

    Returns an enumerator that iterates through the collection.

    Declaration
    public IEnumerator<KeyValuePair<uint, string>> GetEnumerator()
    Returns
    Type Description
    IEnumerator<KeyValuePair<uint, string>>

    An enumerator that can be used to iterate through the collection.

    | Edit this page View Source

    TryGetValue(uint, out string)

    Gets the value that is associated with the specified key.

    Declaration
    public bool TryGetValue(uint key, out string value)
    Parameters
    Type Name Description
    uint key

    The key to locate.

    string value

    When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the object that implements the IReadOnlyDictionary<TKey, TValue> interface contains an element that has the specified key; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    Implements

    IReadOnlyDictionary<TKey, TValue>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IEnumerable
    IDisposable
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX