Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to escape quotes in gremlin queries

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?

like image 574
Laith Ekermawi Avatar asked Jun 11 '17 11:06

Laith Ekermawi


1 Answers

Escape the apostrophe using \

So your Gremlin becomes:

:> g.addV('person')
    .property('firstName', 'Anthony O\'Neil')
    .property('lastName', 'Andersen')
    .property('age', 44)
like image 190
Syrus Avatar answered Sep 20 '22 23:09

Syrus