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
r.between
returns the wrong type (table)
#1728
Comments
This is actually intended. If it didn't return a
|
Wait, that doesn't make sense. I can chain > r.table('foo').pluck('id').typeOf()
"STREAM"
> r.table('foo').pluck('id').typeOf().orderBy('id') // ok And arrays: > r.table('foo').pluck('id').typeOf().orderBy('id').typeOf()
"ARRAY"
> r.table('foo').pluck('id').typeOf().orderBy('id').orderBy('id') // ok And > r.table('foo').getAll("5516c933-1f22-4ea1-9aa9-37b9bad1bfb7").typeOf()
"SELECTION<ARRAY>"
> r.table('foo').getAll("5516c933-1f22-4ea1-9aa9-37b9bad1bfb7").orderBy('id') // ok And > r.table('foo').orderBy({index: 'id'}).typeOf()
"SELECTION<STREAM>"
> r.table('foo').orderBy({index: 'id'}).orderBy('id') // ok Why couldn't we do |
So, upon further reflection, the only thing I see that we can do by returning a table from r.table('foo').between('a', 'z').orderBy({index: 'id'}) // ok But I really don't think we should special case it like this for
|
Right it's only for indexed order_by that's an important one though I've Also what are these equally important cases where people want to use the On Saturday, November 30, 2013, coffeemug wrote:
|
The fact that In the short-term, another option here is to just add an optarg |
Also, moving this to 1.12 because it's a ReQL change rather than a bug-fix, and thus shouldn't go in a point release. |
Ah!
Never mind. I was thinking stuff like Which other ones are you thinking of?
Eh, that would pollute the API in a way that we can't easily undo later without breaking people's code. And it smells messy, like something The Other NoSQL Database Company (tm) would do :-D I'd prefer to wait until we do things right rather than add this hack.
What about these options:
|
Also, I don't think we should worry about this for 1.12. Moving to subsequent. |
The query now returns |
I'm ok with that. |
Meaning, I don't think there is more to do. |
I believe the type should be
SELECTION<STREAM>
. We had a similar issue before (#317) -- could we add a polyglot test for this?The text was updated successfully, but these errors were encountered: