[jOOQ/jOOQ#11061] [jOOQ/jOOQ#11070] [jOOQ/jOOQ#11091] XMLCOMMENT
This commit is contained in:
parent
f36af8b52e
commit
ed0ada98f4
@ -16954,6 +16954,24 @@ public class DSL {
|
||||
return new WidthBucket(field, low, high, buckets);
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>XMLCOMMENT</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static Field<XML> xmlcomment(String comment) {
|
||||
return new Xmlcomment(Tools.field(comment));
|
||||
}
|
||||
|
||||
/**
|
||||
* The <code>XMLCOMMENT</code> function.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static Field<XML> xmlcomment(Field<String> comment) {
|
||||
return new Xmlcomment(comment);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@ -20748,24 +20766,6 @@ public class DSL {
|
||||
return new XMLParse(content, DocumentOrContent.CONTENT);
|
||||
}
|
||||
|
||||
/**
|
||||
* The XML comment constructor.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static Field<XML> xmlcomment(String comment) {
|
||||
return xmlcomment(val(comment));
|
||||
}
|
||||
|
||||
/**
|
||||
* The XML comment constructor.
|
||||
*/
|
||||
@NotNull
|
||||
@Support({ POSTGRES })
|
||||
public static Field<XML> xmlcomment(Field<String> comment) {
|
||||
return new XMLComment(comment);
|
||||
}
|
||||
|
||||
/**
|
||||
* The XML concat function.
|
||||
*/
|
||||
|
||||
@ -37,31 +37,68 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.impl.Names.N_XMLCOMMENT;
|
||||
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 org.jooq.Context;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.XML;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
* The <code>XMLCOMMENT</code> statement.
|
||||
*/
|
||||
final class XMLComment extends AbstractField<XML> {
|
||||
@SuppressWarnings({ "rawtypes", "unchecked", "unused" })
|
||||
final class Xmlcomment
|
||||
extends
|
||||
AbstractField<XML>
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = 4505809303211506197L;
|
||||
private final Field<String> comment;
|
||||
|
||||
XMLComment(Field<String> comment) {
|
||||
super(N_XMLCOMMENT, SQLDataType.XML);
|
||||
Xmlcomment(
|
||||
Field<String> comment
|
||||
) {
|
||||
super(N_XMLCOMMENT, allNotNull(XML, comment));
|
||||
|
||||
this.comment = comment;
|
||||
this.comment = nullSafeNotNull(comment, VARCHAR);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX: QueryPart API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public final void accept(Context<?> ctx) {
|
||||
ctx.visit(N_XMLCOMMENT).sql('(').visit(comment).sql(')');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// The Object API
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (that instanceof Xmlcomment) {
|
||||
return
|
||||
StringUtils.equals(comment, ((Xmlcomment) that).comment)
|
||||
;
|
||||
}
|
||||
else
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user