orientdb
orientdb copied to clipboard
whitespace problem in transactions / let OSQL statements
Hi OrientDB team,
I need to insert strings that contain whitespace \n in transactions with LET, e.g.,
script sql
begin
LET a=insert into V set greeting="hello\norientdb"
commit
end
however, this throws (2.1-rc4):
Error: com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing.
Error: com.orientechnologies.orient.core.sql.parser.TokenMgrError: Lexical error at line 1, column 34. Encountered: "\n" (10), after : "\"hello"
Is it possible to insert strings with \n into OrientDB using transactions?
Hi @ycxq
to insert backslash character you have to quote it (double backslash), eg.
script sql
begin
LET a=insert into V set greeting="hello\\norientdb"
commit
end