field, Converter super T, U> converter) throws DataAccessException;
+
/**
* Map resulting records onto a custom type.
*
diff --git a/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java b/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java
index 1c971a17a7..6131ab5b1b 100644
--- a/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java
+++ b/jOOQ/src/main/java/org/jooq/impl/AbstractResultQuery.java
@@ -57,6 +57,7 @@ import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
@@ -704,6 +705,51 @@ abstract class AbstractResultQuery extends AbstractQuery imple
return fetch().intoArray(field, converter);
}
+ @Override
+ public final Set> fetchSet(int fieldIndex) {
+ return fetch().intoSet(fieldIndex);
+ }
+
+ @Override
+ public final Set fetchSet(int fieldIndex, Class extends T> type) {
+ return fetch().intoSet(fieldIndex, type);
+ }
+
+ @Override
+ public final Set fetchSet(int fieldIndex, Converter, U> converter) {
+ return fetch().intoSet(fieldIndex, converter);
+ }
+
+ @Override
+ public final Set> fetchSet(String fieldName) {
+ return fetch().intoSet(fieldName);
+ }
+
+ @Override
+ public final Set fetchSet(String fieldName, Class extends T> type) {
+ return fetch().intoSet(fieldName, type);
+ }
+
+ @Override
+ public final Set fetchSet(String fieldName, Converter, U> converter) {
+ return fetch().intoSet(fieldName, converter);
+ }
+
+ @Override
+ public final Set fetchSet(Field field) {
+ return fetch().intoSet(field);
+ }
+
+ @Override
+ public final Set fetchSet(Field> field, Class extends T> type) {
+ return fetch().intoSet(field, type);
+ }
+
+ @Override
+ public final Set fetchSet(Field field, Converter super T, U> converter) {
+ return fetch().intoSet(field, converter);
+ }
+
/**
* Subclasses may override this method
*
diff --git a/jOOQ/src/main/java/org/jooq/impl/Coalesce.java b/jOOQ/src/main/java/org/jooq/impl/Coalesce.java
new file mode 100644
index 0000000000..13856be015
--- /dev/null
+++ b/jOOQ/src/main/java/org/jooq/impl/Coalesce.java
@@ -0,0 +1,87 @@
+/**
+ * Copyright (c) 2009-2014, Data Geekery GmbH (http://www.datageekery.com)
+ * All rights reserved.
+ *
+ * This work is dual-licensed
+ * - under the Apache Software License 2.0 (the "ASL")
+ * - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
+ * =============================================================================
+ * You may choose which license applies to you:
+ *
+ * - If you're using this work with Open Source databases, you may choose
+ * either ASL or jOOQ License.
+ * - If you're using this work with at least one commercial database, you must
+ * choose jOOQ License
+ *
+ * For more information, please visit http://www.jooq.org/licenses
+ *
+ * Apache Software License 2.0:
+ * -----------------------------------------------------------------------------
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * jOOQ License and Maintenance Agreement:
+ * -----------------------------------------------------------------------------
+ * Data Geekery grants the Customer the non-exclusive, timely limited and
+ * non-transferable license to install and use the Software under the terms of
+ * the jOOQ License and Maintenance Agreement.
+ *
+ * This library is distributed with a LIMITED WARRANTY. See the jOOQ License
+ * and Maintenance Agreement for more details: http://www.jooq.org/licensing
+ */
+package org.jooq.impl;
+
+import org.jooq.Context;
+import org.jooq.DataType;
+import org.jooq.Field;
+
+/**
+ * @author Lukas Eder
+ */
+class Coalesce extends AbstractField {
+
+ /**
+ * Generated UID
+ */
+ private static final long serialVersionUID = -4546488210418866103L;
+ private final Field[] fields;
+
+ @SuppressWarnings("unchecked")
+ Coalesce(DataType dataType, Field>[] fields) {
+ super("coalesce", dataType);
+
+ this.fields = (Field[]) fields;
+ }
+
+ @Override
+ public final void accept(Context> ctx) {
+ switch (ctx.family()) {
+
+ /* [pro] xx
+ xxxx xxxxxxxxx x
+ xxxxxxxx xxxxxxxx x xxxxxxxxxx
+
+ xxx xxxx x x xx x x xxxxxxxxxxxxxx xxxx
+ xxxxxxxx x xxxxxxxxxxxxxxxxxxxxxxxx
+
+ xxxxxxxxxxxxxxxxxxxx
+ xxxxxx
+ x
+ xx [/pro] */
+
+ default: {
+ ctx.visit(DSL.function("coalesce", getDataType(), fields));
+ break;
+ }
+ }
+ }
+}
diff --git a/jOOQ/src/main/java/org/jooq/impl/DSL.java b/jOOQ/src/main/java/org/jooq/impl/DSL.java
index 223f033970..c652968e7f 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DSL.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DSL.java
@@ -6384,7 +6384,7 @@ public class DSL {
*/
@Support
public static Field coalesce(Field field, Field>... fields) {
- return function("coalesce", nullSafeDataType(field), nullSafe(combine(field, fields)));
+ return new Coalesce(nullSafeDataType(field), nullSafe(combine(field, fields)));
}
/**
diff --git a/jOOQ/src/main/java/org/jooq/impl/DateAdd.java b/jOOQ/src/main/java/org/jooq/impl/DateAdd.java
index 9b79d65ea9..af0c7436ae 100644
--- a/jOOQ/src/main/java/org/jooq/impl/DateAdd.java
+++ b/jOOQ/src/main/java/org/jooq/impl/DateAdd.java
@@ -196,6 +196,20 @@ class DateAdd extends AbstractFunction {
xxxxxx xxxxxxxxxxxxxxxxxxxxx xxxx xxxxxx xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxx xxxxxxxxx xxxxxx
x
+ xxxx xxxxxxxxx x
+ xxxxxx xxxxxxxxxx x
+ xxxx xxxxx xxxxxxx x xxxxxxx xxxxxx
+ xxxx xxxxxx xxxxxxx x xxxxxxxx xxxxxx
+ xxxx xxxx xxxxxxx x xxxxxx xxxxxx
+ xxxx xxxxx xxxxxxx x xxxxxxx xxxxxx
+ xxxx xxxxxxx xxxxxxx x xxxxxxxxx xxxxxx
+ xxxx xxxxxxx xxxxxxx x xxxxxxxxx xxxxxx
+ xxxxxxxx xxxxxxxxxxxxxxxxxxx
+ x
+
+ xxxxxx xxxxxxxxxxxxxxxxxxx xxxxxxx xxxxx xxxxxxxxx xxxxxxxxxxxxxxxxxxx
+ x
+
xxxx xxxx x
xxxxxx xxxxxxxxxx x
xxxx xxxxx xxxxxxx x xxxxxxx xxxxxx
diff --git a/jOOQ/src/main/java/org/jooq/impl/Expression.java b/jOOQ/src/main/java/org/jooq/impl/Expression.java
index a8c190828c..4d99a20c7a 100644
--- a/jOOQ/src/main/java/org/jooq/impl/Expression.java
+++ b/jOOQ/src/main/java/org/jooq/impl/Expression.java
@@ -400,6 +400,32 @@ class Expression extends AbstractFunction {
x
x
+ xxxx xxxxxxxxx x
+ xx xxxxxxxxxxxxxxxxxxxxx xx xxxxxxxxxxxxxxxxxx x
+ xx xxxxxxxxx xx xxxx x
+ xxxxxx xxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ x
+ xxxx x
+ xxxxxx xxxxxxxxxxxxxxxxxx xxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ x
+ x
+ xxxx x
+ xx xxxxxxxx xxxxx xxxx xxxx xx xxx xx xx xxxx xxxxx
+ xxxxxxxxxxx xxxx x xxxxxxxxxxxxxxxxxx
+
+ xx xxxxxxxxx xx xxxx x
+ xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxx xxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxx
+ xxxxxxxxxxxx
+ x
+ xxxx x
+ xxxxxx xxxxxxxxxxxxxxxxxxxxxxxxx
+ xxxxxxxxxxxxxxx xxxxx xxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x xxxxxxxxx
+ xxxxxxxxxxxx
+ x
+ x
+ x
+
xxxx xxxx x
xx xxxxxxxxxxxxxxxxxxxxx xx xxxxxxxxxxxxxxxxxx x
xx xxxxxxxxx xx xxxx x
@@ -520,10 +546,10 @@ class Expression extends AbstractFunction {
/* [pro] xx
xxxx xxxxxxxxx x
xx xxxxxxxxx xx xxxx x
- xxxxxx xxxxxxxxxx x xxxxxxxxxx xxxxx xxxx xx xxxxxx xxxxxxxxxxxxxx xxxx xxxxxxxxxxxxxxx
+ xxxxxx xxxxxxxxxx x xxx xxxxxx xxxxxx xxxxxxxxxxxxxx xxxx xxxxxxxxxxxxxxx
x
xxxx x
- xxxxxx xxxxxxxxxx x xxxxxxxxxx xxxxx xxxx xx xxxxxx xxxxxxxxxxxxxx xxxx xxxxxxxxxxxxxxx
+ xxxxxx xxxxxxxxxx x xxx xxxxxx xxxxxx xxxxxxxxxxxxxx xxxx xxxxxxxxxxxxxxx
x
x
diff --git a/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java b/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java
index 17a272521f..dd155c8385 100644
--- a/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java
+++ b/jOOQ/src/main/java/org/jooq/impl/ResultImpl.java
@@ -57,9 +57,11 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
+import java.util.Set;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -1077,6 +1079,51 @@ class ResultImpl implements Result, AttachableInternal {
return Convert.convertArray(intoArray(field), converter);
}
+ @Override
+ public final Set> intoSet(int fieldIndex) {
+ return new LinkedHashSet