About delete orientdb sql command and log of db operations

47 views
Skip to first unread message

Athanassios Hatzis

unread,
Jul 23, 2015, 2:37:27 PM7/23/15
to OrientDB
Hi, I am using OrientDB 2.1 rc5

When you execute an sql delete command on the OrientDB Studio,  such as

delete from CL where rid=12:2

and then

select from CL

You get back also the list of deleted records including the one currently deleted right ?

But there is not any indication that the record has been deleted.
In that case it is possible to confuse the deleted record with a newly created record that have the same fields completed.

Therefore you should either indicate that the record has been deleted and/or have an option to display deleted records.
e.g. with a METADATA field such as @deleted=TRUE/FALSE

If there is such functionality in the latest version please let me know, or make another suggestion

Thank you

PS: A more general comment would be to add some functionality that will allow the administrator to view the history of operations on a certain record.
Currently you can only view that the record has been modified @version times.....

Luigi Dell'Aquila

unread,
Jul 24, 2015, 1:26:03 AM7/24/15
to orient-...@googlegroups.com
Hi Athanassios,

I guess you are just not deleting anything with that statement ;-)
Try to add a @ in front of rid:

delete from CL where @rid = 12:2

or even better

delete from CL where @rid = #12:2

Luigi


--

---
You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Athanassios Hatzis

unread,
Aug 4, 2015, 11:27:33 AM8/4/15
to OrientDB
OK this works

delete from CL where @rid = #12:2

and this one too
truncate record #12:2

and this one
truncate record 12:2

but not this one
delete from CL where @rid = 12:2


Please note that it does not return any error but the record is not deleted !

tested on OrientDB Server v2.0.13


Reply all
Reply to author
Forward
0 new messages