TupleResult

open class TupleResult : OptionalRustObject

Wraps a Tuple result from a Mentat query. A Tuple result is a list of TypedValues. Individual values can be fetched as TypedValues or converted into a requested type.

Values can be fetched as one of the following types:

  • Return the TypedValue at the specified index. If the index is greater than the number of values then this function will crash.

    Declaration

    Swift

    open func get(index: Int) -> TypedValue

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The TypedValue at that index.

  • Return the Int64 at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Long then this function will crash.

    Declaration

    Swift

    open func asLong(index: Int) -> Int64

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The Int64 at that index.

  • Return the Entid at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Ref then this function will crash.

    Declaration

    Swift

    open func asEntid(index: Int) -> Entid

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The Entid at that index.

  • Return the keyword String at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Keyword then this function will crash.

    Declaration

    Swift

    open func asKeyword(index: Int) -> String

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The keyword String at that index.

  • Return the Bool at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Boolean then this function will crash.

    Declaration

    Swift

    open func asBool(index: Int) -> Bool

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The Bool at that index.

  • Return the Double at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Double then this function will crash.

    Declaration

    Swift

    open func asDouble(index: Int) -> Double

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The Double at that index.

  • Return the Date at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Instant then this function will crash.

    Declaration

    Swift

    open func asDate(index: Int) -> Date

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The Date at that index.

  • Return the String at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not String then this function will crash.

    Declaration

    Swift

    open func asString(index: Int) -> String

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The String at that index.

  • Return the UUID at the specified index. If the index is greater than the number of values then this function will crash. If the value type if the TypedValue at this index is not Uuid then this function will crash.

    Declaration

    Swift

    open func asUUID(index: Int) -> UUID?

    Parameters

    index

    The index of the value to fetch.

    Return Value

    The UUID at that index.

  • Undocumented

    Declaration

    Swift

    override open func cleanup(pointer: OpaquePointer)