This commit is contained in:
Lukas Eder 2020-12-08 17:49:02 +01:00
parent 2f8d68812c
commit aecc0e5b4c
7 changed files with 84 additions and 39 deletions

View File

@ -82,7 +82,6 @@ import org.jooq.conf.StatementType;
import org.jooq.exception.ControlFlowSignal;
import org.jooq.exception.DataAccessException;
import org.jooq.exception.DetachedException;
import org.jooq.impl.DefaultRenderContext.ForceSettingsSignal;
import org.jooq.tools.Ints;
import org.jooq.tools.JooqLogger;

View File

@ -15367,6 +15367,18 @@ public class DSL {
return new Rtrim(string);
}
/**
* The <code>SIGN</code> function.
*/
@ -20294,23 +20306,6 @@ public class DSL {

View File

@ -959,21 +959,4 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
log.debug("Re-render query", "Forcing bind variable inlining as " + configuration().dialect() + " does not support " + params + " bind variables (or more) in a single query");
}
}
/**
* A query rendering signal to force re-rendering a query with different
* settings.
*/
static class ForceSettingsSignal extends ControlFlowSignal {
/**
* Generated UID
*/
private static final long serialVersionUID = -1530836969063166588L;
final Settings settings;
ForceSettingsSignal(Settings settings) {
this.settings = settings;
}
}
}

View File

@ -0,0 +1,58 @@
/*
* 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 org.jooq.conf.Settings;
import org.jooq.exception.ControlFlowSignal;
/**
* A query rendering signal to force re-rendering a query with different
* settings.
*/
class ForceSettingsSignal extends ControlFlowSignal {
/**
* Generated UID
*/
private static final long serialVersionUID = -1530836969063166588L;
final Settings settings;
ForceSettingsSignal(Settings settings) {
this.settings = settings;
}
}

View File

@ -89,6 +89,5 @@ package org.jooq.impl;

View File

@ -76,6 +76,16 @@ package org.jooq.impl;

View File

@ -288,7 +288,6 @@ import org.jooq.exception.MappingException;
import org.jooq.exception.NoDataFoundException;
import org.jooq.exception.TemplatingException;
import org.jooq.exception.TooManyRowsException;
import org.jooq.impl.DefaultRenderContext.ForceSettingsSignal;
import org.jooq.impl.ResultsImpl.ResultOrRowsImpl;
import org.jooq.tools.Ints;
import org.jooq.tools.JooqLogger;
@ -301,8 +300,6 @@ import org.jooq.types.UInteger;
import org.jooq.types.ULong;
import org.jooq.types.UShort;
import org.jetbrains.annotations.NotNull;
/**
* General internal jOOQ utilities
*
@ -5912,6 +5909,10 @@ final class Tools {
: (DataType<T>) field.getDataType();
}
static final <T> DataType<T> allNotNull(DataType<T> defaultType) {
return defaultType.notNull();
}
static final <T> DataType<T> allNotNull(DataType<T> defaultType, Field<?> f1) {
return dataType(defaultType, f1, true);
}