Class SelectStatement

    • Method Detail

      • isJoined

        public boolean isJoined()
      • markJoined

        public void markJoined()
      • addColumn

        public ColumnRef addColumn​(org.netbeans.modules.dbschema.ColumnElement columnElement,
                                   QueryTable queryTable)
      • copyColumns

        public void copyColumns​(SelectStatement sourceStatement)
      • isUpdateLockRequired

        protected boolean isUpdateLockRequired​(QueryTable table)
      • isColumnTypeDefinitionNeeded

        public boolean isColumnTypeDefinitionNeeded()
        Determines if Column Type definition is needed for this statement. Column Type definition is a performance optimization that allows defining Column Type for the resultset. If the query to be executed is counting pc instances, the column used inside COUNT() is one of the pk columns. If the pk column happens to be not convertable to an int (for example timestamp), database will throw an exception. To prevent this situation, column type definition should not be performed on such queries.
        Returns:
        true if column type definition is needed, false otherwise.
      • getQueryPlan

        public QueryPlan getQueryPlan()
        Description copied from class: Statement
        Get QueryPlan for this statement
        Specified by:
        getQueryPlan in class Statement
        Returns:
        QueryPlan for this statement
      • generateStatementText

        protected void generateStatementText()
        Description copied from class: Statement
        Generates the SQL text for the query described by this object.
        Specified by:
        generateStatementText in class Statement
      • generateColumnText

        protected StringBuilder generateColumnText()
      • getJoinOperator

        protected String getJoinOperator​(int operation)
        Returns join operator for specified operation.
        Parameters:
        operation - The join operation. Should be one of ActionDesc.OP_EQUIJOIN, ActionDesc.OP_LEFTJOIN or ActionDesc.OP_RIGHTJOIN.
        Returns:
        join operator for specified operation.
      • bindInputValues

        public void bindInputValues​(DBStatement s,
                                    ValueFetcher parameters)
                             throws SQLException
        Binds input valus corrsponding to this Statement object to database statement s.
        Parameters:
        s - The database statement.
        parameters - If an InputValue to be bound is a parameter, the actual value is contained in this.
        Throws:
        SQLException
      • getFormattedSQLText

        public String getFormattedSQLText​(ValueFetcher parameters)
        Gets formatted sql text corrsponding to this statement object. The text also contains values for input to the statement.
        Parameters:
        parameters - The input paramters to this statement.
        Returns:
        formatted sql text corrsponding to this statement object.