How do you create a sql query of dynamic fields using a final string in VoltDB?

StackOverflow https://stackoverflow.com/questions/8426411

  •  29-10-2019
  •  | 
  •  

سؤال

I want to create a sql query of dynamic fields that are decided at runtime, such as:

SELECT some, random, field FROM table WHERE id = ?

Because there is a restriction that you must declare an instance variable SQLStmt:

public final SQLStmt sql = new SQLStmt("SELECT field0, field1 FROM table WHERE id = ?");

Since all fields are hard-coded or else VoltDB will not compile, I cannot set the fields I want to read.

So, How do you create a sql query of dynamic fields using a final string in VoltDB?

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top