Package org.jdbi.v3.stringtemplate4
Class StringTemplateEngine
- java.lang.Object
-
- org.jdbi.v3.stringtemplate4.StringTemplateEngine
-
- All Implemented Interfaces:
TemplateEngine
public class StringTemplateEngine extends java.lang.Object implements TemplateEngine
Rewrites a StringTemplate template, using the attributes on theStatementContextas template parameters. For configuration, seeStringTemplates.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classStringTemplateEngine.ErrorListener-
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 StringTemplateEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringrender(java.lang.String sql, StatementContext ctx)Renders an SQL statement from the given template, using the statement context as needed.-
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
parse
-
-
-
-
Method Detail
-
render
public java.lang.String render(java.lang.String sql, StatementContext ctx)Description copied from interface:TemplateEngineRenders an SQL statement from the given template, using the statement context as needed.- Specified by:
renderin interfaceTemplateEngine- Parameters:
sql- The SQL to rewritectx- 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
-
-