[jOOQ/jOOQ#11061] [jOOQ/jOOQ#11070] [jOOQ/jOOQ#11091] REGR_XYZ functions
This commit is contained in:
parent
dc0fbbd17a
commit
1428a0ba54
@ -17026,6 +17026,96 @@ public class DSL {
|
||||
return new Xmlforest(fields);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>MEDIAN</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ CUBRID, H2, HSQLDB, MARIADB, POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> median(Field<? extends Number> field) {
|
||||
return new Median(field);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_AVG_X</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrAvgX(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrAvgx(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_AVG_Y</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrAvgY(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrAvgy(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_COUNT</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrCount(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrCount(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_INTERCEPT</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrIntercept(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrIntercept(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_R2</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrR2(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrR2(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_SLOPE</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSlope(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrSlope(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_S_X_X</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSXX(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrSxx(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_S_X_Y</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSXY(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrSxy(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>REGR_S_Y_Y</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSYY(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new RegrSyy(y, x);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>STDDEV_POP</code> function.
|
||||
*/
|
||||
@ -21902,159 +21992,6 @@ public class DSL {
|
||||
return new Mode(Tools.nullSafe(field));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the median over a numeric field: median(field).
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ CUBRID, H2, HSQLDB, MARIADB, POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> median(Field<? extends Number> field) {
|
||||
return new Median(Tools.nullSafe(field));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_SLOPE</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSlope(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_slope", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_INTERCEPT</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrIntercept(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_intercept", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_COUNT</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrCount(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_count", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_R2</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrR2(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_r2", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_AVGX</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrAvgX(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_avgx", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_AVGY</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrAvgY(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_avgy", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_SXX</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSXX(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_sxx", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_SYY</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSYY(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_syy", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the <code>REGR_SXY</code> linear regression function.
|
||||
* <p>
|
||||
* The linear regression functions fit an ordinary-least-squares regression
|
||||
* line to a set of number pairs. You can use them as both aggregate and
|
||||
* window functions, where this is supported.
|
||||
* <p>
|
||||
* Note that {@link SQLDialect#DB2} does not support linear regression
|
||||
* window functions.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static AggregateFunction<BigDecimal> regrSXY(Field<? extends Number> y, Field<? extends Number> x) {
|
||||
return new DefaultAggregateFunction<>("regr_sxy", SQLDataType.NUMERIC, Tools.nullSafe(y), Tools.nullSafe(x));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the aggregated concatenation for a field.
|
||||
* <p>
|
||||
|
||||
@ -37,34 +37,53 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
// ...
|
||||
import static org.jooq.SQLDialect.POSTGRES;
|
||||
import static org.jooq.impl.DSL.inline;
|
||||
import static org.jooq.impl.DSL.percentileCont;
|
||||
import static org.jooq.impl.Names.N_MEDIAN;
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Set;
|
||||
|
||||
import org.jooq.Context;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.SQLDialect;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
* The <code>MEDIAN</code> statement.
|
||||
*/
|
||||
final class Median extends DefaultAggregateFunction<BigDecimal> {
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class Median
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -7378732863724089028L;
|
||||
private static final Set<SQLDialect> EMULATE_WITH_PERCENTILES = SQLDialect.supportedBy(POSTGRES);
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
Median(Field<? extends Number> arg) {
|
||||
super(false, N_MEDIAN, SQLDataType.NUMERIC, arg);
|
||||
Median(
|
||||
Field<? extends Number> field
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_MEDIAN,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(field, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
private static final Set<SQLDialect> EMULATE_WITH_PERCENTILES = SQLDialect.supportedBy(POSTGRES);
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
if (EMULATE_WITH_PERCENTILES.contains(ctx.dialect()))
|
||||
@ -72,4 +91,6 @@ final class Median extends DefaultAggregateFunction<BigDecimal> {
|
||||
else
|
||||
super.accept(ctx);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -209,6 +209,16 @@ final class Names {
|
||||
static final Name N_RAWTOHEX = unquotedName("rawtohex");
|
||||
static final Name N_REGEXP_REPLACE = unquotedName("regexp_replace");
|
||||
static final Name N_REGEX_REPLACE = unquotedName("regex_replace");
|
||||
|
||||
static final Name N_REGR_AVGX = unquotedName("regr_avgx");
|
||||
static final Name N_REGR_AVGY = unquotedName("regr_avgy");
|
||||
static final Name N_REGR_COUNT = unquotedName("regr_count");
|
||||
static final Name N_REGR_INTERCEPT = unquotedName("regr_intercept");
|
||||
static final Name N_REGR_R2 = unquotedName("regr_r2");
|
||||
static final Name N_REGR_SLOPE = unquotedName("regr_slope");
|
||||
static final Name N_REGR_SXX = unquotedName("regr_sxx");
|
||||
static final Name N_REGR_SXY = unquotedName("regr_sxy");
|
||||
static final Name N_REGR_SYY = unquotedName("regr_syy");
|
||||
static final Name N_REPEAT = unquotedName("repeat");
|
||||
static final Name N_REPLACE = unquotedName("replace");
|
||||
static final Name N_REPLICATE = unquotedName("replicate");
|
||||
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrAvgx.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrAvgx.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR AVG X</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrAvgx
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrAvgx(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_AVGX,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrAvgy.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrAvgy.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR AVG Y</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrAvgy
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrAvgy(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_AVGY,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrCount.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrCount.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR COUNT</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrCount
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrCount(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_COUNT,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrIntercept.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrIntercept.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR INTERCEPT</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrIntercept
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrIntercept(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_INTERCEPT,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrR2.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrR2.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR R2</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrR2
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrR2(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_R2,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrSlope.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrSlope.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR SLOPE</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrSlope
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrSlope(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_SLOPE,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrSxx.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrSxx.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR S X X</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrSxx
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrSxx(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_SXX,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrSxy.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrSxy.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR S X Y</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrSxy
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrSxy(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_SXY,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
87
jOOQ/src/main/java/org/jooq/impl/RegrSyy.java
Normal file
87
jOOQ/src/main/java/org/jooq/impl/RegrSyy.java
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Other licenses:
|
||||
* -----------------------------------------------------------------------------
|
||||
* Commercial licenses for this work are available. These replace the above
|
||||
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
|
||||
* database integrations.
|
||||
*
|
||||
* For more information, please visit: http://www.jooq.org/licenses
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.DSL.*;
|
||||
import static org.jooq.impl.Internal.*;
|
||||
import static org.jooq.impl.Keywords.*;
|
||||
import static org.jooq.impl.Names.*;
|
||||
import static org.jooq.impl.SQLDataType.*;
|
||||
import static org.jooq.impl.Tools.*;
|
||||
import static org.jooq.impl.Tools.BooleanDataKey.*;
|
||||
import static org.jooq.SQLDialect.*;
|
||||
|
||||
import org.jooq.*;
|
||||
import org.jooq.impl.*;
|
||||
import org.jooq.tools.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
||||
/**
|
||||
* The <code>REGR S Y Y</code> statement.
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class RegrSyy
|
||||
extends
|
||||
DefaultAggregateFunction<BigDecimal>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
RegrSyy(
|
||||
Field<? extends Number> y,
|
||||
Field<? extends Number> x
|
||||
) {
|
||||
super(
|
||||
false,
|
||||
N_REGR_SYY,
|
||||
NUMERIC,
|
||||
nullSafeNotNull(y, INTEGER),
|
||||
nullSafeNotNull(x, INTEGER)
|
||||
);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user