Package org.jdbi.v3.core.statement
Class DefinedAttributeTemplateEngine
- java.lang.Object
-
- org.jdbi.v3.core.statement.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 (_).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jdbi.v3.core.statement.TemplateEngine
TemplateEngine.Parsing
-
-
Field Summary
-
Fields inherited from interface org.jdbi.v3.core.statement.TemplateEngine
NOP
-
-
Constructor Summary
Constructors Constructor Description DefinedAttributeTemplateEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.util.function.Function<StatementContext,java.lang.String>>parse(java.lang.String template, ConfigRegistry config)Parse a SQL template and return a parsed representation ready to apply to a statement.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jdbi.v3.core.statement.TemplateEngine.Parsing
render
-
-
-
-
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:TemplateEngineParse 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:
parsein interfaceTemplateEngine- Specified by:
parsein interfaceTemplateEngine.Parsing- Parameters:
template- the sql template to parseconfig- the Jdbi configuration at prepare time- Returns:
- a parsed representation, if available
-
-