3

While creating nodes, we have to give properties of node right, in that property I've quoted text and make it as gremlin query.

Gremlin query is not executing if we have quotes in between string like can't, don't and L'oreal.

Richard-Degenne
  • 2,892
  • 2
  • 26
  • 43
  • Possible duplicate of [how to escape quotes in gremlin queries](https://stackoverflow.com/questions/44483185/how-to-escape-quotes-in-gremlin-queries) – fjc Jul 02 '19 at 12:27

2 Answers2

1

You could replace can't with can\'t.

enter image description here

Jay Gong
  • 23,163
  • 2
  • 27
  • 32
1

Ran across this problem today. For those using Gremlin.Net and passing in a query string to g.SubmitAsync. If you are replacing any single quotes in a properties text using .Replace, include two slashes as c# removes the first one. So it will look something like;

$".property('height', '{account.Height.Replace( "'", "\\'" )}')"
Chris Parker
  • 206
  • 1
  • 9