Closed big213 closed 6 years ago
Also, I just wanted to know the use of session.query
versus session.command
. The 1st one only accepts idempotent queries, and the 2nd one accepts both idempotent and non-idempotent queries. I guess I don't understand what the point of the 1st one is then. Is it faster, or is it just to help the user separate the queries between idempotent and non-idempotent?
Hi @big213
i was not able to reproduce this issue. do you have a script to reproduce this?
About session.query
and command
apart from idempotent difference, the main difference is that query is really streamed, and the statement and execution plan are cached, meanwhile that could not be the same when using command to change things around. And also you can separate query from command (read from write ) :)
@wolf4ood Thanks for clarifying that question, the caching makes sense. I think it is best to use query when it is available, then.
As for the issue, I think it has to do with incoming or outgoing edges. Try this:
INSERT INTO V SET someField = 'foo', otherField = 'bar'
'#1:0'
INSERT INTO V SET id = 2
'#2:0'
CREATE EDGE E FROM #2:0 TO #1:0
SELECT *, otherField FROM #1:0
@big213
thanks, i've reproduced it. Let me try to fix it
Hi @big213
I've found the issue. Seems to be in OrientDB itself instead of OrientJS.
I've just pushed a fix and it will be available in 3.0.8 GA
Thanks
OrientJS Version: 3.0.0-beta3 OrientDB Version: 3.0.7
Steps to reproduce error:
INSERT INTO V SET someField = 'foo', otherField = 'bar'
SELECT *, otherField FROM #1:0
When I attempt to perform the 2nd
SELECT
, thesession.query(query, params)
gets stuck and does not return. The statement works fine on the OrientDB Studio.