question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UPDATE EDGE statement [moved]

See original GitHub issue

This is Issue 1114 moved from a Google Code project. Added by 2012-10-14T22:09:41.000Z by infected…@gmail.com. Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Enhancement, Priority-Low, v2.1.0

Original description

Having an UPDATE EDGE statement would be nice because there is less overhead then deleting and recreating the edge.

Discussion here: https://groups.google.com/forum/#!topic/orient-database/Z5ZElaxVSZ0

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:29 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
matanshukrycommented, Nov 13, 2015

As far as I can tell, update works (including in/out):

UPDATE FRIEND SET in=#11:5 WHERE in.name="Samantha" and out.name="Mat"

Although, using a query inside the set clause for in/out will cause it to return array, which is not the desired behavior. Example:

UPDATE Friend SET in=(SELECT FROM User WHERE name="Jason") WHERE in.name="Samantha" and out.name="Mat"

When later querying the table Friend, we can see column “in” will contain [#11:4], emphasis on the brackets [], which means an array.

Upsert also works, although when creating a new vertex it doesn’t set the in/out properties. You could set the in/out properties your self, like this:

UPDATE Friend SET comment="Wazzzaup", in=#11:5, out=#11:6 UPSERT WHERE in.name="Jason" AND out.name="Mat"

It will result in a longer query when using sub-query for in= and out=, but at least it works (sub-query has same problem as above).

To summarize, the only problem I can see is using a sub-query for in/out. So:

  1. Is there any other feature required here? If not, can we agree the UPDATE command is suffice and there is no need for an UPDATE EDGE command?
  2. Is there anyway to set the in/out properties, perhaps one that I missed?
0reactions
luigidellaquilacommented, Nov 26, 2015

Yes, you are right, thank you for the pointer!

Luigi

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft Edge update settings
If the About page shows To finish updating, restart Microsoft Edge., select Restart. The update is already downloaded and all you need to...
Read more >
Microsoft updates Edge Dev with new features before moving ...
What is new in Edge Dev 103.0.1264.2? New features and capabilities: Added features to drag the create tab group feature by default.
Read more >
milConnect
Updating DEERS: How do I remove my Federal Employee Health Benefits Program (FEHBP) ... The Joint Qualification System (JQS) has moved to a...
Read more >
The future of Internet Explorer on Windows 10 is in Microsoft ...
We've also aimed to make the upgrade to Microsoft Edge simple. Once you've opted in to moving to Microsoft Edge, it's easy to...
Read more >
Microsoft starts automatically redirecting Internet Explorer ...
Microsoft is starting to redirect Internet Explorer users to Edge. ... to issue an update that will disable the aging browser in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found