Class DefinedAttributeTemplateEngine

  • All Implemented Interfaces:
    TemplateEngine, TemplateEngine.Parsing

    public class DefinedAttributeTemplateEngine
    extends java.lang.Object
    implements TemplateEngine.Parsing
    Template engine which replaces angle-bracketed tokens like <name> with the string value of the named attribute. Attribute names may contain letters (a-z, A-Z), digits (0-9), or underscores (_).
    • Constructor Detail

      • DefinedAttributeTemplateEngine

        public DefinedAttributeTemplateEngine()
    • Method Detail

      • parse

        public 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
        Specified by:
        parse in interface TemplateEngine.Parsing
        Parameters:
        template - the sql template to parse
        config - the Jdbi configuration at prepare time
        Returns:
        a parsed representation, if available