Replace value_at_index functions to be get(index) -> TypedValue for Tuple, Rel and Coll results on iOS. #216

Open
opened 2020-08-06 16:56:48 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:56:48 +00:00 (Migrated from github.com)

Currently we have the ability to say: x(atIndex:) on iOS, which calles the value_at_index_as_x ffi functions. These should be removed so that RelResult, CollResult and TupleResult only have get(index:) which calls value_at_index and returns a TypedValue, allowing the called then to do the conversion directly on the TypedValue.

Turns

let name = tuple.asString(index: 0)

into

let name = tuple.get(index: 0)?.asString()
Currently we have the ability to say: x(atIndex:) on iOS, which calles the `value_at_index_as_x` ffi functions. These should be removed so that RelResult, CollResult and TupleResult only have `get(index:)` which calls `value_at_index` and returns a `TypedValue`, allowing the called then to do the conversion directly on the `TypedValue`. Turns ``` let name = tuple.asString(index: 0) ``` into ``` let name = tuple.get(index: 0)?.asString() ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#216
No description provided.