Error Parsing UPDATE Query

Hello All,

I am new to OrientDB so excuse me if this is trivial but I am attempting to run an update function for an object in my db. my SQL query is as follows :

String updateWatchlistByIdQuery = "UPDATE Watchlist CONTENT = ? WHERE uuid = ?";

It is being used in the following method:

OResultSet rs = db.command(updateWatchlistByIdQuery, jsonValue, Object.getUuid()))

where jsonVlaue is the CONTENT.

I receive the following error when attempting to call my update function:

Encountered " <UPDATE> "UPDATE "" at line 1, column 1. Was expecting one of: <SELECT> ... <TRAVERSE> ... <MATCH> ... <INSERT> ... <RETURN> ... <FIND> ... <REBUILD> ... <OPTIMIZE> ... <GRANT> ... <REVOKE> ... <BEGIN> ... <COMMIT> ... <ROLLBACK> ... <IF> ... <SLEEP> <CONSOLE <MOVE> ... <SELECT> ... <SELECT> ... <TRAVERSE> ... <MATCH> ... <FIND> ... <INSERT>
I notice UPDATE is not in these sets of calls. Am I completely missing something?

All help greatly appreciated!

Thanks,

Sam

Hi @samd

I’m afraid CONTENT with parameters is not supported as of now.
I’d suggest to open an issue on GitHub https://github.com/orientechnologies/orientdb/issues , we can definitely consider it as a future enhancement

Thanks

Luigi