@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() > 1) { throw new IllegalArgumentException("The VIEW_ROOT macro allows maximally one argument: <expression>!"); } context.addChunk("NULL"); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The second function needs exactly one argument <datetime>! args=" + context); } renderDiff(context); }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 2) { throw new RuntimeException("The " + functionName + " function needs exactly two arguments <start_datetime> and <end_datetime>! args=" + context); } renderDiff(context); }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() > 1) { throw new IllegalArgumentException("The EMBEDDING_VIEW macro allows maximally one argument: <expression>!"); } context.addChunk("NULL"); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() > 1) { throw new IllegalArgumentException("The EMBEDDING_VIEW macro allows maximally one argument: <expression>!"); } if (viewRootJpqlMacro.usesViewMacro()) { throw new UnsupportedOperationException("It's not yet supported to use the EMBEDDING_VIEW macro along with the VIEW_ROOT macro in correlations!"); } super.render(context); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The day function needs exactly one argument <datetime>! args=" + context); } renderer.start(context).addArgument(0).build(); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 2) { throw new IllegalArgumentException("The prefix macro requires exactly two arguments: <prefix> and <expression>!"); } context.addArgument(0); context.addChunk("."); context.addArgument(1); }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The year function needs exactly one argument <datetime>! args=" + context); } renderer.start(context).addArgument(0).build(); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The month function needs exactly one argument <datetime>! args=" + context); } renderer.start(context).addArgument(0).build(); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 2) { throw new IllegalArgumentException("The prefix macro requires exactly two arguments: <prefix> and <expression>!"); } context.addArgument(0); context.addChunk("."); context.addArgument(1); }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The second function needs exactly one argument <datetime>! args=" + context); } renderer.start(context).addArgument(0).build(); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The hour function needs exactly one argument <datetime>! args=" + context); } renderer.start(context).addArgument(0).build(); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The minute function needs exactly one argument <datetime>! args=" + context); } renderer.start(context).addArgument(0).build(); } }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 1) { throw new RuntimeException("The " + functionName + " function needs exactly one argument <expression>! args=" + context); } renderer.start(context).addArgument(0).build(); }
@Override public void render(FunctionRenderContext context) { if (context.getArgumentsSize() != 2) { throw new RuntimeException("The " + FUNCTION_NAME + " function needs exactly two argument!"); } renderer.start(context).addArgument(0).addArgument(1).build(); } }
@Override public void render(FunctionRenderContext context) { int size = context.getArgumentsSize(); if (size < 2) { throw new RuntimeException("The " + FUNCTION_NAME + " function needs at least two argument!"); } context.addChunk("greatest("); context.addArgument(0); for (int i = 1; i < size; i++) { context.addChunk(","); context.addArgument(i); } context.addChunk(")"); } }
@Override public void render(FunctionRenderContext context) { int size = context.getArgumentsSize(); if (size < 2) { throw new RuntimeException("The " + FUNCTION_NAME + " function needs at least two argument!"); } context.addChunk("min("); context.addArgument(0); for (int i = 1; i < size; i++) { context.addChunk(", "); context.addArgument(i); } context.addChunk(")"); }
@Override public void render(FunctionRenderContext context) { int size = context.getArgumentsSize(); if (size < 2) { throw new RuntimeException("The " + FUNCTION_NAME + " function needs at least two argument!"); } context.addChunk("(select max(c) from (select "); context.addArgument(0); context.addChunk(" as c"); for (int i = 1; i < size; i++) { context.addChunk(" union all select "); context.addArgument(i); } context.addChunk(") T)"); }
@Override public void render(FunctionRenderContext context) { context.addChunk("concat("); context.addArgument(0); for (int i = 1; i < context.getArgumentsSize(); i++) { context.addChunk(","); context.addArgument(i); } context.addChunk(")"); }
@Override public void render(FunctionRenderContext context) { context.addChunk("concat("); context.addArgument(0); for (int i = 1; i < context.getArgumentsSize(); i++) { context.addChunk(","); context.addArgument(i); } context.addChunk(")"); }