Driver help - prepared vs parameterized queries

Skip to first unread message

Michael Peterson

May 18, 2015, 8:59:38 PM5/18/15

I am reposting this question since I never got a reply to it.  Hopefully someone who has worked on another driver or OrientDB internals can give a quick response.

I am continuing work on a Go (golang) driver using the network binary protocol.  I currently have *parameterized* SQL queries and commands working, such as "select from Cat where name = ?", which I send using the REQUEST_COMMAND (41) database operation type.

What is unclear to me is whether I need to do anything from the driver side to "prepare" the statement - besides serializing it as an EMBEDDEDMAP with the key "params" - I have that part working.  Beyond that, is there is call to the OrientDB server that will *prepare* (optimize and cache) the query or command on the server side?  I walked through the Java client code with a debugger that does parameterized queries and I didn't see any special handling besides serializing the params as an EMBEDDEDMAP.

In some databases, the typical flow is that the client sends a SQL statement with placeholders to the server for preparation, the server responds with a statement ID, and then the client executes the statement by sending its ID and parameters.

Is there anything like that in OrientDB?

Thanks for your help,

Luigi Dell'Aquila

May 19, 2015, 2:09:53 AM5/19/15
Hi Michael,

no, at this time there is nothing like that, you just have to send the query together with the parameters.
Full prepared statement management is in the roadmap for 3.0



You received this message because you are subscribed to the Google Groups "OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Michael Peterson

May 19, 2015, 8:53:22 PM5/19/15
Thanks very much!  Appreciate the help and the note that it is coming in the future.
Reply all
Reply to author
0 new messages