@Override final Field<String> getFunction0(Configuration configuration) { switch (configuration.dialect()) { case MARIADB: case MYSQL: default: return DSL.field("{md5}({0})", VARCHAR, argument); } } }
private Table<?> pivot(Configuration configuration) { switch (configuration.dialect()) { // Some other dialects can emulate it. This implementation is // EXPERIMENTAL and not officially supported default: { return new DefaultPivotTable(); } } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { default: return new Native(); } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { default: return new Native(); } }
@Override final Field<String> getFunction0(Configuration configuration) { switch (configuration.dialect()) { case FIREBIRD: return field("{trim}({trailing} {from} {0})", SQLDataType.VARCHAR, argument); default: return function("rtrim", SQLDataType.VARCHAR, argument); } } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxxxx xxx xxxxxxxxx xx [/pro] */ default: return new Native(); } }
@Override final BigInteger get0(BindingGetResultSetContext<U> ctx) throws SQLException { // The SQLite JDBC driver doesn't support BigDecimals if (ctx.configuration().dialect() == SQLDialect.SQLITE) return Convert.convert(ctx.resultSet().getString(ctx.index()), BigInteger.class); BigDecimal b = ctx.resultSet().getBigDecimal(ctx.index()); return (b == null ? null : b.toBigInteger()); }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { default: return DSL.field("{nullif}({0}, {1})", getDataType(), arg1, arg2); } } }
public ForceInlineSignal() { if (log.isDebugEnabled()) log.debug("Re-render query", "Forcing bind variable inlining as " + configuration().dialect() + " does not support " + params + " bind variables (or more) in a single query"); } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { default: return DSL.field("{atan}({0})", getDataType(), arg); } } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxx xxxxx xx [/pro] */ default: return field("{atan}({0})", getDataType(), arg); } } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { default: return DSL.field("{asin}({0})", getDataType(), arg); } } }
private final void toSQLAssign(RenderContext context) { switch (context.configuration().dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxxxxxxxxxxxx xx xxx xxxxxx xx [/pro] */ default: context.sql("? = "); break; } }
public ForceInlineSignal() { if (log.isDebugEnabled()) log.debug("Re-render query", "Forcing bind variable inlining as " + configuration().dialect() + " does not support " + params + " bind variables (or more) in a single query"); } }
@Override final QueryPart getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { /* [pro] xx xxxx xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxxx x xxxx xxxxx xxxxxx xxxxxxxxxxxxxx xxxxx xxxxxx xx [/pro] */ default: return DSL.field("{nullif}({0}, {1})", getDataType(), arg1, arg2); } } }
@Override public final void bind(BindContext ctx) { if (ctx.declareWindows()) { ctx.visit(name).visit(window); } else if (asList(ctx.configuration().dialect()).contains(POSTGRES)) { ctx.visit(name); } else { ctx.visit(window); } }
@Override final Field<T> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { case SQLITE: return new Expression<T>(MODULO, arg1, arg2); } return function("mod", getDataType(), arg1, arg2); } }
@Override final Field<T> getFunction0(Configuration configuration) { switch (configuration.dialect().family()) { case H2: case HSQLDB: return DSL.field("{nvl2}({0}, {1}, {2})", getDataType(), arg1, arg2, arg3); default: return DSL.when(arg1.isNotNull(), arg2).otherwise(arg3); } } }
final void toSQLFunctionName(Context<?> ctx) { if (name != null) ctx.visit(name); else if (term != null) ctx.sql(term.translate(ctx.configuration().dialect())); else ctx.sql(getName()); }
private final void toSQLFunctionName(RenderContext ctx) { if (name != null) { ctx.visit(name); } else if (term != null) { ctx.sql(term.translate(ctx.configuration().dialect())); } else { ctx.sql(getName()); } }