BAMQuery.execute(sql,inParameters)

Runs a SELECT sql query on the bam database. Uses the execute method to run the sql statement. Only "SELECT" statements are allowed. It is hardly recommended to use always the inParameters and not hardcode the right operands within the sql string. Send the values for your query in the inParameters in the same order the sql requires them and complete the sql string with the '?' wildcard. Using parameters ('?') improves performance since it only openes one cursor on database side and it is cached so the same statement is executed with different arguments. For Example: String queryString = "SELECT v_businessString AS businessString, tasktime, label " + "FROM BAM_PROCESSES, BAM_PROCESSPERFORMANCE " + "WHERE BAM_PROCESSES.processin = BAM_PROCESSPERFORMANCE.processin " + " AND BAM_PROCESSES.label = ?"; foreach (row in BAMQuery.execute(sql: queryString, inParameters: {"Test Process"})) { double taskTime = (double)row["tasktime"]; String businessString = (String)row["businessString"]; String label = (String)row["label"]; Where the '?' in the queryString variable, will be replaced by the "Test Process" value in send by parameter in the execute method.

Arguments:

Name Type Description Mode
sql String Sql query to execute. in
inParameters Any[] A mapping of parameter index and objects to bound (default: an empty map). in