-
Notifications
You must be signed in to change notification settings - Fork 872
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
SQL batch-command does not return correct values for DELETE #3537
Comments
yes.. it's doesn't return correct value if you have exapnd function in any select query. as for example below. it return the invalid result for user and payment, but except account. BEGIN [ |
look forward anyone to solve this issue as soon as possible |
DELETE command, by default, returns the number of deleted records. If you need the deleted record, append "RETURN BEFORE" to the command. |
@lvca: I am sorry, I do not agree with you. Your response is inaccurate at least in the following two ways:
A mere |
@mamobyz You're right: |
Implemented. |
As described here: https://github.com/orientechnologies/orientdb/wiki/SQL-batch, it should be possible to get all responses of the statements in a batch back as an array for further evaluations. This works well for Insert/Create, which suggests the feature is supported by OrientDB v2.0, which I am using. But it seems not working for Delete statements.
It is not possible to execute LET command in OrientoDB console, nor in the Web Studio (BTW: also in this regard, I am not sure, whether it is an issue or LET is intentionally not supported in both tools?). Thus, I can only demonstrate the issue with a node.js program. In the code, the line
q1.commit().return(['$c1', '$c2', '$c3'])
works well, contrary to the lineq2.commit().return(['$d1', '$d2'])
for deletion. For deletion, only a single value can be returned, withreturn('$d?')
, but not multiple values.The text was updated successfully, but these errors were encountered: