Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.values() method #2945

Closed
merrihew opened this issue Aug 21, 2014 · 9 comments
Closed

.values() method #2945

merrihew opened this issue Aug 21, 2014 · 9 comments

Comments

@merrihew
Copy link

I'd like to suggest implementing the reverse of the .keys() method for retrieving an array of the values from an object. I have not been able to find an easier method then .coerceTo().map() and its functionality I use often. Thanks!

@coffeemug coffeemug added this to the subsequent milestone Aug 21, 2014
@coffeemug
Copy link
Contributor

@merrihew -- thanks for suggesting, I'll try to schedule it during a ReQL discussion period.

@danielmewes danielmewes modified the milestones: 2.1, subsequent, 2.1-polish Mar 23, 2015
@mlucy
Copy link
Member

mlucy commented Apr 22, 2015

This sounds good to me as described.

@danielmewes
Copy link
Member

Sounds good. We should guarantee that the ordering of values in the result array corresponds to the ordering in the result of keys.
I don't think we need to make any more specific guarantees about it.

@danielmewes
Copy link
Member

Marking settled as described.

@marshall007
Copy link
Contributor

We should guarantee that the ordering of values in the result array corresponds to the ordering in the result of keys.

@danielmewes does .keys() give you the keys sorted lexicographically right now? I think it does but it's important for #3761 (comment) that r.object('0', 1, '1', 2).values() returns [1, 2].

@danielmewes
Copy link
Member

@marshall007 Yes it does, though we don't really guarantee it.
Actually I didn't think about that properly when I suggested using values in #3761. If you have more than 10 groups in a match the ordering of values will be off.

@encryptio
Copy link
Contributor

Working on this, code review 3196 on my ckastorff_2945_values branch is out.

@coffeemug
Copy link
Contributor

Whooo, first commit! 🍰 🎆 👏

@encryptio
Copy link
Contributor

Fixed in 69461f6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants