Skip to content

Commit

Permalink
[#11061] [#11070] [#11091] RAND
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Dec 14, 2020
1 parent a59fe42 commit 7f90a92
Show file tree
Hide file tree
Showing 57 changed files with 716 additions and 37 deletions.
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Abs.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down Expand Up @@ -85,4 +86,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Abs) {
return
StringUtils.equals(number, ((Abs) that).number)
;
}
else
return super.equals(that);
}
}
16 changes: 8 additions & 8 deletions jOOQ/src/main/java/org/jooq/impl/AbstractParam.java
Expand Up @@ -197,17 +197,17 @@ public boolean equals(Object that) {
if (this == that)
return true;

if (that instanceof AbstractParam) {
AbstractParam<?> thatParam = (AbstractParam<?>) that;
if (that instanceof Param) {
Object thatValue = ((Param<?>) that).getValue();

if (value == null)
return thatParam.value == null;
else if (value instanceof byte[] && thatParam.value instanceof byte[])
return Arrays.equals((byte[]) value, (byte[]) thatParam.value);
else if (value instanceof Object[] && thatParam.value instanceof Object[])
return Arrays.equals((Object[]) value, (Object[]) thatParam.value);
return thatValue == null;
else if (value instanceof byte[] && thatValue instanceof byte[])
return Arrays.equals((byte[]) value, (byte[]) thatValue);
else if (value instanceof Object[] && thatValue instanceof Object[])
return Arrays.equals((Object[]) value, (Object[]) thatValue);
else
return value.equals(thatParam.value);
return value.equals(thatValue);
}
else
return false;
Expand Down
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/AlterDatabaseImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/AlterDomainImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/AlterSchemaImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Ascii.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down Expand Up @@ -105,4 +106,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Ascii) {
return
StringUtils.equals(string, ((Ascii) that).string)
;
}
else
return super.equals(that);
}
}
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/BitLength.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down Expand Up @@ -116,4 +117,19 @@ public void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof BitLength) {
return
StringUtils.equals(string, ((BitLength) that).string)
;
}
else
return super.equals(that);
}
}
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/CharLength.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down Expand Up @@ -108,4 +109,19 @@ public void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof CharLength) {
return
StringUtils.equals(string, ((CharLength) that).string)
;
}
else
return super.equals(that);
}
}
19 changes: 19 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/ConvertedVal.java
Expand Up @@ -118,4 +118,23 @@ public final ParamType getParamType() {
public final ParamMode getParamMode() {
return delegate.getParamMode();
}

// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public String toString() {
return delegate.toString();
}

@Override
public int hashCode() {
return delegate.hashCode();
}

@Override
public boolean equals(Object that) {
return delegate.equals(that);
}
}
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Cos.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;
import java.math.BigDecimal;
Expand Down Expand Up @@ -86,4 +87,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Cos) {
return
StringUtils.equals(number, ((Cos) that).number)
;
}
else
return super.equals(that);
}
}
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Cosh.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;
import java.math.BigDecimal;
Expand Down Expand Up @@ -118,4 +119,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Cosh) {
return
StringUtils.equals(number, ((Cosh) that).number)
;
}
else
return super.equals(that);
}
}
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Cot.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;
import java.math.BigDecimal;
Expand Down Expand Up @@ -100,4 +101,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Cot) {
return
StringUtils.equals(number, ((Cot) that).number)
;
}
else
return super.equals(that);
}
}
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Coth.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;
import java.math.BigDecimal;
Expand Down Expand Up @@ -89,4 +90,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Coth) {
return
StringUtils.equals(number, ((Coth) that).number)
;
}
else
return super.equals(that);
}
}
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/CreateDatabaseImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/CreateDomainImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/CreateSchemaImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/CreateSequenceImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down
20 changes: 11 additions & 9 deletions jOOQ/src/main/java/org/jooq/impl/DSL.java
Expand Up @@ -15732,6 +15732,17 @@ public static Field<BigDecimal> rad(Field<? extends Number> degrees) {
return new Radians(degrees);
}

/**
* The <code>RAND</code> function.
* <p>
* Turn a value in degrees to radians.
*/
@NotNull
@Support
public static Field<BigDecimal> rand() {
return new Rand();
}

/**
* The <code>REPEAT</code> function.
* <p>
Expand Down Expand Up @@ -19990,15 +20001,6 @@ public static <T extends Number> Field<T> shr(Field<T> field1, Field<? extends N
// XXX Mathematical functions
// ------------------------------------------------------------------------

/**
* Get the rand() function.
*/
@NotNull
@Support
public static Field<BigDecimal> rand() {
return new Rand();
}

/**
* Find the greatest among all values.
* <p>
Expand Down
16 changes: 16 additions & 0 deletions jOOQ/src/main/java/org/jooq/impl/Degrees.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;
import java.math.BigDecimal;
Expand Down Expand Up @@ -104,4 +105,19 @@ public final void accept(Context<?> ctx) {
}



// -------------------------------------------------------------------------
// The Object API
// -------------------------------------------------------------------------

@Override
public boolean equals(Object that) {
if (that instanceof Degrees) {
return
StringUtils.equals(radians, ((Degrees) that).radians)
;
}
else
return super.equals(that);
}
}
1 change: 1 addition & 0 deletions jOOQ/src/main/java/org/jooq/impl/DropDatabaseImpl.java
Expand Up @@ -48,6 +48,7 @@

import org.jooq.*;
import org.jooq.impl.*;
import org.jooq.tools.*;

import java.util.*;

Expand Down

0 comments on commit 7f90a92

Please sign in to comment.