public Decode(Field<T> field, Field<T> search, Field<Z> result, Field<?>[] more) { super("decode", result.getDataType(), Tools.combine(field, search, result, more)); this.field = field; this.search = search; this.result = result; this.more = more; }
@Override @Deprecated public final Field<String> concat(Field<?>... fields) { return DSL.concat(Tools.combine(this, fields)); }
@Override @Deprecated public final Field<T> coalesce(Field<T> option, Field<?>... options) { return DSL.coalesce(this, Tools.combine(option, options)); } }
@Override @Deprecated public final Field<String> concat(String... values) { return DSL.concat(Tools.combine(this, Tools.fields(values).toArray(EMPTY_FIELD))); }
@Override @Deprecated @SafeVarargs public final Field<T> coalesce(T option, T... options) { return DSL.coalesce(this, Tools.combine(Tools.field(option, this), Tools.fields(options, this).toArray(EMPTY_FIELD))); }
Expression(ExpressionOperator operator, Field<T> lhs, Field<?>... rhs) { super(operator.toSQL(), lhs.getDataType(), Tools.combine(lhs, rhs)); this.operator = operator; this.lhs = lhs; this.rhs = new QueryPartList<Field<?>>(rhs); }
static <T> Field<T> coalesce0(Field<T> field, Field<?>... fields) { return new Coalesce<T>(nullSafeDataType(field), nullSafe(combine(field, fields))); }
/** * Find the least among all values. * <p> * This function has no equivalent in Adaptive Server, Derby, SQL Server and * Sybase SQL Anywhere. Its current simulation implementation has * <code>O(2^n)</code> complexity and should be avoided for * <code>n > 5</code>! Better implementation suggestions are very * welcome. */ @Support public static <T> Field<T> least(Field<T> field, Field<?>... others) { return new Least<T>(nullSafeDataType(field), nullSafe(combine(field, others))); }
/** * Find the greatest among all values. * <p> * This function has no equivalent in Adaptive Server, Derby, SQL Server and * Sybase SQL Anywhere. Its current simulation implementation has * <code>O(2^n)</code> complexity and should be avoided for * <code>n > 5</code>! Better implementation suggestions are very * welcome. */ @Support public static <T> Field<T> greatest(Field<T> field, Field<?>... others) { return new Greatest<T>(nullSafeDataType(field), nullSafe(combine(field, others))); }
Configuration local = configuration.derive(Tools.combine( configuration.executeListenerProviders(), new DefaultExecuteListenerProvider(collector)
private final int[] executeStatic() { List<Query> queries = new ArrayList<Query>(); QueryCollector collector = new QueryCollector(); Configuration local = configuration.derive(Tools.combine( configuration.executeListenerProviders(), new DefaultExecuteListenerProvider(collector) )); for (int i = 0; i < records.length; i++) { Configuration previous = records[i].configuration(); try { records[i].attach(local); executeAction(i); } catch (QueryCollectorSignal e) { Query query = e.getQuery(); if (query.isExecutable()) { queries.add(query); } } finally { records[i].attach(previous); } } // Resulting statements can be batch executed in their requested order int[] result = create.batch(queries).execute(); updateChangedFlag(); return result; }
final Field<?>[] alternativeFields = Tools.combine( alternativeNames.length == 0 ? new Field[] { DSL.field("*") }