Interface TemplateEngine.Parsing

    • Method Detail

      • render

        default java.lang.String render​(java.lang.String template,
                                        StatementContext ctx)
        Description copied from interface: TemplateEngine
        Renders an SQL statement from the given template, using the statement context as needed.
        Specified by:
        render in interface TemplateEngine
        Parameters:
        template - The SQL to rewrite
        ctx - The statement context for the statement being executed
        Returns:
        something which can provide the actual SQL to prepare a statement from and which can bind the correct arguments to that prepared statement
      • parse

        java.util.Optional<java.util.function.Function<StatementContext,​java.lang.String>> parse​(java.lang.String template,
                                                                                                       ConfigRegistry config)
        Description copied from interface: TemplateEngine
        Parse a SQL template and return a parsed representation ready to apply to a statement. This allows the parsed representation to be cached and reused.
        Specified by:
        parse in interface TemplateEngine
        Parameters:
        template - the sql template to parse
        config - the Jdbi configuration at prepare time
        Returns:
        a parsed representation, if available