6

I have this query and as you firstName contains single quote Anthony O'Neil

:> g.addV('person')
    .property('firstName', 'Anthony O'Neil')
    .property('lastName', 'Andersen')
    .property('age', 44)

Any Ideas how to escape it?

Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107

1 Answers1

10

Escape the apostrophe using \

So your Gremlin becomes:

:> g.addV('person')
    .property('firstName', 'Anthony O\'Neil')
    .property('lastName', 'Andersen')
    .property('age', 44)
Syrus
  • 116
  • 1
  • 4