Cleanup: Simplify preprocessor's handling of whitespaces
This commit is contained in:
parent
27d422384a
commit
f84b15e04d
@ -74,7 +74,7 @@ import org.jooq.impl.DefaultRecordMapper;
|
||||
* @param <R> The cursor's record type
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface Cursor<R extends Record> extends Iterable<R>, Formattable, AutoCloseable {
|
||||
public interface Cursor<R extends Record> extends Iterable<R>, Formattable , AutoCloseable {
|
||||
|
||||
/**
|
||||
* Get this cursor's row type.
|
||||
|
||||
@ -139,7 +139,7 @@ import org.jooq.util.xml.jaxb.InformationSchema;
|
||||
* @see Configuration
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface DSLContext extends Scope, AutoCloseable {
|
||||
public interface DSLContext extends Scope , AutoCloseable {
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX AutoCloseable API
|
||||
|
||||
@ -59,7 +59,7 @@ import org.jooq.impl.DSL;
|
||||
*
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
public interface Query extends Statement, Attachable, AutoCloseable {
|
||||
public interface Query extends Statement, Attachable , AutoCloseable {
|
||||
|
||||
/**
|
||||
* Execute the query, if it has been created with a proper configuration.
|
||||
|
||||
@ -48,8 +48,8 @@ package org.jooq;
|
||||
public interface RowCountQuery
|
||||
extends
|
||||
Query
|
||||
, org.reactivestreams.Publisher<Integer>
|
||||
|
||||
, org.reactivestreams.Publisher<Integer>
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@ -694,7 +694,7 @@ public abstract class AbstractRoutine<T> extends AbstractNamed implements Routin
|
||||
toSQLCall(context);
|
||||
context.sql(' ');
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
context.sql('(');
|
||||
@ -752,7 +752,7 @@ public abstract class AbstractRoutine<T> extends AbstractNamed implements Routin
|
||||
if (indent)
|
||||
context.formatIndentEnd().formatNewLine();
|
||||
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
context.sql(')');
|
||||
|
||||
@ -1138,7 +1138,7 @@ final class AlterTableImpl extends AbstractRowCountQuery implements
|
||||
(renameConstraint != null && family == HSQLDB)
|
||||
|| (renameColumn != null && SUPPORT_RENAME_COLUMN.contains(family));
|
||||
boolean renameTable = renameTo != null && SUPPORT_RENAME_TABLE.contains(family);
|
||||
boolean renameObject = renameTo != null && (false);
|
||||
boolean renameObject = renameTo != null && (false );
|
||||
|
||||
if (!omitAlterTable) {
|
||||
ctx.start(ALTER_TABLE_TABLE)
|
||||
@ -1292,8 +1292,8 @@ final class AlterTableImpl extends AbstractRowCountQuery implements
|
||||
else if (add != null) {
|
||||
boolean qualify = ctx.qualify();
|
||||
boolean multiAdd = REQUIRE_REPEAT_ADD_ON_MULTI_ALTER.contains(ctx.family());
|
||||
boolean parens = !multiAdd;
|
||||
boolean comma = true;
|
||||
boolean parens = !multiAdd ;
|
||||
boolean comma = true ;
|
||||
|
||||
ctx.start(ALTER_TABLE_ADD)
|
||||
.visit(K_ADD)
|
||||
|
||||
@ -207,7 +207,7 @@ implements
|
||||
else {
|
||||
boolean qualify = ctx.qualify();
|
||||
|
||||
if (named) {
|
||||
if (named ) {
|
||||
ctx.visit(K_CONSTRAINT)
|
||||
.sql(' ')
|
||||
.visit(getUnqualifiedName())
|
||||
|
||||
@ -281,7 +281,7 @@ final class CreateIndexImpl extends AbstractRowCountQuery implements
|
||||
.sql(' ');
|
||||
|
||||
boolean supportsInclude = SUPPORT_INCLUDE.contains(ctx.dialect());
|
||||
boolean supportsFieldsBeforeTable = false;
|
||||
boolean supportsFieldsBeforeTable = false ;
|
||||
|
||||
QueryPartList<QueryPart> list = new QueryPartList<>();
|
||||
list.addAll(asList(sortFields));
|
||||
|
||||
@ -222,8 +222,8 @@ final class CreateViewImpl<R extends Record> extends AbstractRowCountQuery imple
|
||||
|
||||
// [#2059] MemSQL doesn't support column aliases at the view level
|
||||
boolean rename = f != null && f.length > 0;
|
||||
boolean renameSupported = true;
|
||||
boolean replaceSupported = false;
|
||||
boolean renameSupported = true ;
|
||||
boolean replaceSupported = false ;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1046,7 +1046,7 @@ public class DefaultDataType<T> implements DataType<T> {
|
||||
|
||||
@Override
|
||||
public final boolean isArray() {
|
||||
return
|
||||
return
|
||||
(!isBinary() && tType.isArray());
|
||||
}
|
||||
|
||||
|
||||
@ -327,7 +327,7 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
|
||||
|
||||
@Override
|
||||
public final String render() {
|
||||
String prepend = null;
|
||||
String prepend = null;
|
||||
String result = sql.toString();
|
||||
return prepend == null ? result : prepend + result;
|
||||
}
|
||||
|
||||
@ -231,7 +231,7 @@ final class DeleteQueryImpl<R extends Record> extends AbstractDMLQuery<R> implem
|
||||
|
||||
|
||||
// [#2059] MemSQL does not support DELETE ... ORDER BY
|
||||
if (limit != null && NO_SUPPORT_LIMIT.contains(ctx.family())) {
|
||||
if (limit != null && NO_SUPPORT_LIMIT.contains(ctx.family()) ) {
|
||||
Field<?>[] keyFields =
|
||||
table().getKeys().isEmpty()
|
||||
? new Field[] { table().rowid() }
|
||||
|
||||
@ -111,7 +111,7 @@ final class FieldMapsForInsert extends AbstractQueryPart {
|
||||
|
||||
|
||||
|
||||
else if (rows == 1) {
|
||||
else if (rows == 1 ) {
|
||||
ctx.formatSeparator()
|
||||
.start(INSERT_VALUES)
|
||||
.visit(K_VALUES)
|
||||
@ -245,9 +245,9 @@ final class FieldMapsForInsert extends AbstractQueryPart {
|
||||
|
||||
final void toSQL92Values(Context<?> ctx, boolean emulateBulkInsertReturning) {
|
||||
boolean indent = (values.size() > 1);
|
||||
boolean castFirstRowNumericValues = false;
|
||||
boolean castFirstRowNumericValues = false ;
|
||||
|
||||
for (int row = 0; row < rows; row++) {
|
||||
for (int row = 0; row < rows ; row++) {
|
||||
if (row > 0)
|
||||
ctx.sql(", ");
|
||||
|
||||
|
||||
@ -347,7 +347,7 @@ final class InsertQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
|
||||
.visit(K_ON_CONFLICT)
|
||||
.sql(' ');
|
||||
|
||||
if (onConstraint != null) {
|
||||
if (onConstraint != null ) {
|
||||
ctx.data(DATA_CONSTRAINT_REFERENCE, true);
|
||||
ctx.visit(K_ON_CONSTRAINT)
|
||||
.sql(' ')
|
||||
@ -483,7 +483,7 @@ final class InsertQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
|
||||
.visit(K_ON_CONFLICT)
|
||||
.sql(' ');
|
||||
|
||||
if (onConstraint != null) {
|
||||
if (onConstraint != null ) {
|
||||
ctx.data(DATA_CONSTRAINT_REFERENCE, true);
|
||||
ctx.visit(K_ON_CONSTRAINT)
|
||||
.sql(' ')
|
||||
|
||||
@ -371,7 +371,7 @@ final class Interpreter {
|
||||
if (mu == null)
|
||||
throw primaryKeyNotExists();
|
||||
|
||||
boolean enforced = true;
|
||||
boolean enforced = true ;
|
||||
mt.foreignKeys.add(new MutableForeignKey(
|
||||
(UnqualifiedName) impl.getUnqualifiedName(), mt, mfs, mu, impl.$onDelete(), impl.$onUpdate(), enforced
|
||||
));
|
||||
@ -733,7 +733,7 @@ final class Interpreter {
|
||||
private final void addConstraint(Query query, ConstraintImpl impl, MutableTable existing) {
|
||||
if (!impl.getUnqualifiedName().empty() && existing.constraint(impl) != null)
|
||||
throw constraintAlreadyExists(impl);
|
||||
boolean enforced = true;
|
||||
boolean enforced = true ;
|
||||
if (impl.$primaryKey() != null)
|
||||
if (existing.primaryKey != null)
|
||||
throw constraintAlreadyExists(impl);
|
||||
|
||||
@ -10937,7 +10937,7 @@ final class ParserImpl implements Parser {
|
||||
}
|
||||
|
||||
final class ParserContext {
|
||||
private static final boolean PRO_EDITION = false;
|
||||
private static final boolean PRO_EDITION = false ;
|
||||
|
||||
final DSLContext dsl;
|
||||
final Locale locale;
|
||||
|
||||
@ -95,7 +95,7 @@ final class QuantifiedSelectImpl<R extends Record> extends AbstractQueryPart imp
|
||||
|
||||
ctx.visit(quantifier.toKeyword());
|
||||
|
||||
boolean extraParentheses = false;
|
||||
boolean extraParentheses = false ;
|
||||
|
||||
ctx.sql(extraParentheses ? " ((" : " (");
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ final class RowSubqueryCondition extends AbstractCondition {
|
||||
if (rightQuantified == null) {
|
||||
|
||||
// Some databases need extra parentheses around the RHS
|
||||
boolean extraParentheses = false;
|
||||
boolean extraParentheses = false ;
|
||||
|
||||
ctx.sql(extraParentheses ? "((" : "(");
|
||||
|
||||
|
||||
@ -206,7 +206,7 @@ public class UDTImpl<R extends UDTRecord<R>> extends AbstractNamed implements UD
|
||||
|
||||
@Override
|
||||
public final boolean isSQLUsable() {
|
||||
return true;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -652,7 +652,7 @@ final class UpdateQueryImpl<R extends Record> extends AbstractStoreQuery<R> impl
|
||||
}
|
||||
|
||||
// [#2059] MemSQL does not support UPDATE ... ORDER BY
|
||||
if (limit != null && NO_SUPPORT_LIMIT.contains(ctx.family())) {
|
||||
if (limit != null && NO_SUPPORT_LIMIT.contains(ctx.family()) ) {
|
||||
Field<?>[] keyFields =
|
||||
table().getKeys().isEmpty()
|
||||
? new Field[] { table().rowid() }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user