March 14, 2019 Tuple!(string, int))[] field_orders | ||||
---|---|---|---|---|
| ||||
Hi In vibe.d / data / mongo / collection I found the function * ensureIndex(Tuple!(string, int))[] field_orders) What could be the right way to use "Tuple!(string, int))[] field_orders"? I tried different ways like [Tuple!("a", 1), Tuple!("b", 2)]", but compiler said "No" Any hint? Thanks & Regards, Ozan |
March 14, 2019 Re: Tuple!(string, int))[] field_orders | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ozan | On Thursday, 14 March 2019 at 15:29:28 UTC, Ozan wrote:
> Hi
> In vibe.d / data / mongo / collection I found the function
> * ensureIndex(Tuple!(string, int))[] field_orders)
>
> What could be the right way to use "Tuple!(string, int))[] field_orders"?
> I tried different ways like [Tuple!("a", 1), Tuple!("b", 2)]", but compiler said "No"
>
> Any hint?
>
> Thanks & Regards,
> Ozan
field_orders' type: Tuple!(string, int)[]
So you have to use [Tuple!(string, int)("b",2), ...] or (shortcut) [tuple("b", 2), ...]
Andrea
|
Copyright © 1999-2021 by the D Language Foundation