[jOOQ/jOOQ#12253] Long lists are no longer wrapped when rendering formatted SQL

This commit is contained in:
Lukas Eder 2021-07-27 10:53:16 +02:00
parent 6149f674d3
commit bdeaf730c7
14 changed files with 14 additions and 1423 deletions

View File

@ -69,7 +69,7 @@ public final class Constants {
/**
* The current jooq-runtime XSD file name.
*/
public static final String XSD_RUNTIME = "jooq-runtime-3.15.0.xsd";
public static final String XSD_RUNTIME = "jooq-runtime-3.16.0.xsd";
/**
* The current jooq-runtime XML namespace.

View File

@ -28,7 +28,7 @@ public class InterpreterSearchSchema
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String catalog;
@XmlElement(required = true)
protected String schema;

View File

@ -34,7 +34,7 @@ public class MappedCatalog
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String input;
@XmlElement(type = String.class)
@XmlJavaTypeAdapter(RegexAdapter.class)

View File

@ -34,7 +34,7 @@ public class MappedSchema
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String input;
@XmlElement(type = String.class)
@XmlJavaTypeAdapter(RegexAdapter.class)

View File

@ -30,7 +30,7 @@ public class MappedTable
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String input;
@XmlElement(type = String.class)
@XmlJavaTypeAdapter(RegexAdapter.class)

View File

@ -28,7 +28,7 @@ public class MigrationSchema
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String catalog;
@XmlElement(required = true)
protected String schema;

View File

@ -24,7 +24,7 @@ import javax.xml.namespace.QName;
@XmlRegistry
public class ObjectFactory {
private final static QName _Settings_QNAME = new QName("http://www.jooq.org/xsd/jooq-runtime-3.15.0.xsd", "settings");
private final static QName _Settings_QNAME = new QName("http://www.jooq.org/xsd/jooq-runtime-3.16.0.xsd", "settings");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jooq.conf
@ -113,7 +113,7 @@ public class ObjectFactory {
* @return
* the new instance of {@link JAXBElement }{@code <}{@link Settings }{@code >}
*/
@XmlElementDecl(namespace = "http://www.jooq.org/xsd/jooq-runtime-3.15.0.xsd", name = "settings")
@XmlElementDecl(namespace = "http://www.jooq.org/xsd/jooq-runtime-3.16.0.xsd", name = "settings")
public JAXBElement<Settings> createSettings(Settings value) {
return new JAXBElement<Settings>(_Settings_QNAME, Settings.class, null, value);
}

View File

@ -28,7 +28,7 @@ public class ParseSearchSchema
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String catalog;
@XmlElement(required = true)
protected String schema;

View File

@ -28,7 +28,7 @@ public class RenderFormatting
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
@XmlElement(defaultValue = "\n")
protected String newline = "\n";
@XmlElement(defaultValue = " ")

View File

@ -32,7 +32,7 @@ public class RenderMapping
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
protected String defaultCatalog;
protected String defaultSchema;
@XmlElementWrapper(name = "catalogs")

View File

@ -36,7 +36,7 @@ public class Settings
implements Serializable, Cloneable, XMLAppendable
{
private final static long serialVersionUID = 31500L;
private final static long serialVersionUID = 31600L;
@XmlElement(defaultValue = "true")
protected Boolean forceIntegerTypesOnZeroScaleDecimals = true;
@XmlElement(defaultValue = "true")

View File

@ -1,2 +1,2 @@
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-runtime-3.15.0.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-runtime-3.16.0.xsd", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package org.jooq.conf;

View File

@ -134,7 +134,7 @@ class QueryPartCollectionView<T extends QueryPart> extends AbstractQueryPart imp
rendersContent.set(i++, ((QueryPartInternal) e).rendersContent(ctx));
int size = rendersContent.cardinality();
boolean format = ctx.format() && (size >= 2 && !isSimple());
boolean format = ctx.format() && (size >= 2 && !isSimple() || size > 4);
boolean previousQualify = ctx.qualify();
boolean previousAlreadyIndented = TRUE.equals(ctx.data(DATA_LIST_ALREADY_INDENTED));
boolean indent = format && !previousAlreadyIndented;

File diff suppressed because it is too large Load Diff