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:
TypedValue
Int64
Entid
Keyword
Bool
Double
Date
String
UUID
.
-
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 theTypedValue
at this index is notLong
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 theTypedValue
at this index is notRef
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 theTypedValue
at this index is notKeyword
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 theTypedValue
at this index is notBoolean
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 theTypedValue
at this index is notDouble
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 theTypedValue
at this index is notInstant
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 theTypedValue
at this index is notString
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 theTypedValue
at this index is notUuid
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)