I have a simple question about the PreparedStatement on Oracle NoSql Java SDK:
What is the issue with this code? What is the right query to bind the runtime param from PreparedStatement?
String sql = "SELECT * FROM property WHERE id= ?";
QueryRequest qr = new QueryRequest();
PrepareRequest prepareRequest = new PrepareRequest().setStatement(sql);
PrepareResult prepareResult = getHandler().prepare(prepareRequest);
PreparedStatement preparedStatement = prepareResult.getPreparedStatement();
preparedStatement.setVariable(1, new StringValue("1971ba5d8babbd167448fba5f70584f1"));
My understanding is that the "?" syntax is not yet supported.
You need to declare the query as follows
and then set the variable using the name and not the position