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:
TypedValueInt64EntidKeywordBoolDoubleDateStringUUID.
-
Return the
TypedValueat 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) -> TypedValueParameters
indexThe index of the value to fetch.
Return Value
The
TypedValueat that index. -
Return the
Int64at the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notLongthen this function will crash.Declaration
Swift
open func asLong(index: Int) -> Int64Parameters
indexThe index of the value to fetch.
Return Value
The
Int64at that index. -
Return the
Entidat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notRefthen this function will crash.Declaration
Swift
open func asEntid(index: Int) -> EntidParameters
indexThe index of the value to fetch.
Return Value
The
Entidat that index. -
Return the keyword
Stringat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notKeywordthen this function will crash.Declaration
Swift
open func asKeyword(index: Int) -> StringParameters
indexThe index of the value to fetch.
Return Value
The keyword
Stringat that index. -
Return the
Boolat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notBooleanthen this function will crash.Declaration
Swift
open func asBool(index: Int) -> BoolParameters
indexThe index of the value to fetch.
Return Value
The
Boolat that index. -
Return the
Doubleat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notDoublethen this function will crash.Declaration
Swift
open func asDouble(index: Int) -> DoubleParameters
indexThe index of the value to fetch.
Return Value
The
Doubleat that index. -
Return the
Dateat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notInstantthen this function will crash.Declaration
Swift
open func asDate(index: Int) -> DateParameters
indexThe index of the value to fetch.
Return Value
The
Dateat that index. -
Return the
Stringat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notStringthen this function will crash.Declaration
Swift
open func asString(index: Int) -> StringParameters
indexThe index of the value to fetch.
Return Value
The
Stringat that index. -
Return the
UUIDat the specified index. If the index is greater than the number of values then this function will crash. If the value type if theTypedValueat this index is notUuidthen this function will crash.Declaration
Swift
open func asUUID(index: Int) -> UUID?Parameters
indexThe index of the value to fetch.
Return Value
The
UUIDat that index. -
Undocumented
Declaration
Swift
override open func cleanup(pointer: OpaquePointer)
TupleResult Class Reference