Class SqlMetaIf

    • Field Detail

      • logger

        final org.slf4j.Logger logger
        The internal slf4j logger.
      • elements

        List<SqlMetaIfItem> elements
        The list of maximum 2 sub-elements based on ANTLR grammar.
      • expression

        SqlMetaLogExpr expression
        The logical expression. Based on the value of this expression the first or the second sub-element will become a part of the final ANSI SQL.
    • Constructor Detail

      • SqlMetaIf

        SqlMetaIf()
        Creates a new instance. It's used from inside ANTLR parser.
    • Method Detail

      • addElement

        void addElement​(SqlMetaIfItem element)
        Adds a new sub-element. It's used from inside ANTLR parser.
        Parameters:
        element - new sub-element, based on ANTLR grammar
      • setExpression

        void setExpression​(SqlMetaLogExpr expression)
        Sets a logical expression. It's used from inside ANTLR parser. Based on the value of this expression the first or the second sub-element will become a part of the final ANSI SQL.
        Parameters:
        expression - the new value of logical expression
      • process

        public SqlProcessResult process​(SqlProcessContext ctx)
        The main contract for a dynamic ANSI SQL Query generation. Also known as a META SQL processing. The composite pattern main contract. All ANTLR grammar based elements must implement this contract.
        Specified by:
        process in interface SqlMetaElement
        Parameters:
        ctx - the crate for all input parameters and the context of processing