Class QoQSelectExecution

java.lang.Object
ortus.boxlang.runtime.jdbc.qoq.QoQSelectExecution

public class QoQSelectExecution extends Object
A wrapper class to hold together both the SQL AST being executed as well as the runtime values for a given execution of the query
  • Field Details

  • Method Details

    • of

      public static QoQSelectExecution of(SQLSelect select, Map<SQLTable,Query> tableLookup)
      Factory method
      Parameters:
      select - select AST node
      tableLookup - table lookup
      Returns:
      new QoQSelectExecution instance
    • getSelect

      public SQLSelect getSelect()
      Get the select node
    • getTableLookup

      public Map<SQLTable,Query> getTableLookup()
      Get the table lookup
      Returns:
      table lookup
    • getResultColumns

      public Map<Key,QoQExecutionService.TypedResultColumn> getResultColumns()
      Get the result columns
      Returns:
      result columns
    • setResultColumns

      public void setResultColumns(Map<Key,QoQExecutionService.TypedResultColumn> resultColumns)
      Set the result columns
      Parameters:
      resultColumns - result columns
    • getSelectStatementExecution

      public QoQSelectStatementExecution getSelectStatementExecution()
      Get the select statement execution
      Returns:
      select statement execution
    • setQoQSelectStatementExecution

      public void setQoQSelectStatementExecution(QoQSelectStatementExecution selectStatementExecution)
      Set the select statement execution
      Parameters:
      selectStatementExecution - select statement execution
    • calculateResultColumns

      public Map<Key,QoQExecutionService.TypedResultColumn> calculateResultColumns(boolean firstSelect)
      Calculate the result columns
      Parameters:
      firstSelect - whether this is the first select
      Returns:
      result columns
    • calculateOrderBys

      public void calculateOrderBys()
      Calculate the order by columns
    • getIndepententSubQuery

      public Query getIndepententSubQuery(SQLSelectStatement subquery)
      Indepenant sub queries are not based on the context of the outer query and can be cached here.
      Parameters:
      subquery -
      Returns:
    • addPartition

      public void addPartition(String partitionName, int[] partition)
      Add a partition
      Parameters:
      partitionName - Name of the partition
      partition - The partition
    • getPartition

      public List<int[]> getPartition(String partitionName)
      Get a partition
      Parameters:
      partitionName - Name of the partition
      Returns:
      The partition
    • getPartitions

      public Map<String,List<int[]>> getPartitions()
      Get all partitions
      Returns:
      All partitions