private String render(String sql, Map<String, Object> attributes) { attributes.forEach((key, value) -> when(ctx.getAttribute(key)).thenReturn(value)); return templateEngine.render(sql, ctx); }
String text = t.getText(); String key = text.substring(1, text.length() - 1); Object value = ctx.getAttribute(key); if (value == null) { throw new UnableToCreateStatementException("Undefined attribute for token '" + text + "'", ctx);
String text = t.getText(); String key = text.substring(1, text.length() - 1); Object value = ctx.getAttribute(key); if (value == null) { throw new UnableToCreateStatementException("Undefined attribute for token '" + text + "'", ctx);