[#1286] Add "renderSchema" flag to Settings, to completely disable rendering of schema names
[#1306] Add missing INTERVAL data types to HSQLDBDataType
This commit is contained in:
parent
20b261fff3
commit
6d49519087
@ -36,7 +36,10 @@
|
||||
|
||||
package org.jooq.util.hsqldb;
|
||||
|
||||
import static org.jooq.impl.Factory.concat;
|
||||
import static org.jooq.impl.Factory.nvl;
|
||||
import static org.jooq.impl.Factory.nvl2;
|
||||
import static org.jooq.impl.Factory.val;
|
||||
import static org.jooq.util.hsqldb.information_schema.Tables.COLUMNS;
|
||||
import static org.jooq.util.hsqldb.information_schema.Tables.ELEMENT_TYPES;
|
||||
|
||||
@ -68,7 +71,10 @@ public class HSQLDBTableDefinition extends AbstractTableDefinition {
|
||||
for (Record record : create().select(
|
||||
COLUMNS.COLUMN_NAME,
|
||||
COLUMNS.ORDINAL_POSITION,
|
||||
nvl(ELEMENT_TYPES.COLLECTION_TYPE_IDENTIFIER, COLUMNS.DATA_TYPE).as("datatype"),
|
||||
nvl(ELEMENT_TYPES.COLLECTION_TYPE_IDENTIFIER,
|
||||
nvl2(COLUMNS.INTERVAL_TYPE,
|
||||
concat(COLUMNS.DATA_TYPE, val(" "), COLUMNS.INTERVAL_TYPE),
|
||||
COLUMNS.DATA_TYPE)).as("datatype"),
|
||||
COLUMNS.IDENTITY_GENERATION,
|
||||
COLUMNS.IS_NULLABLE,
|
||||
COLUMNS.COLUMN_DEFAULT,
|
||||
|
||||
@ -16,5 +16,5 @@
|
||||
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jooq.test.jOOQHSQLDBTest2"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="jOOQ-test"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djdbc.properties=/org/jooq/configuration/${env_var:USERNAME}/hsqldb/library.properties"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djdbc.properties=/org/jooq/configuration/${env_var:USERNAME}/hsqldb/library.properties -Dorg.jooq.settings.renderSchema"/>
|
||||
</launchConfiguration>
|
||||
@ -85,6 +85,8 @@ CREATE TABLE t_dates (
|
||||
ts timestamp,
|
||||
d_int int,
|
||||
ts_bigint bigint,
|
||||
i_y interval year to month,
|
||||
i_d interval day to second,
|
||||
|
||||
CONSTRAINT pk_t_dates PRIMARY KEY (id)
|
||||
)
|
||||
|
||||
@ -8,7 +8,7 @@ package org.jooq.test.hsqldb.generatedclasses.tables;
|
||||
*/
|
||||
public class TDates extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.hsqldb.generatedclasses.tables.records.TDatesRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1640812032;
|
||||
private static final long serialVersionUID = -833983098;
|
||||
|
||||
/**
|
||||
* The singleton instance of PUBLIC.T_DATES
|
||||
@ -60,6 +60,16 @@ public class TDates extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.hsqld
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.test.hsqldb.generatedclasses.tables.records.TDatesRecord, java.lang.Long> TS_BIGINT = createField("TS_BIGINT", org.jooq.impl.SQLDataType.BIGINT, this);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.test.hsqldb.generatedclasses.tables.records.TDatesRecord, org.jooq.types.YearToMonth> I_Y = createField("I_Y", org.jooq.impl.SQLDataType.INTERVALYEARTOMONTH, this);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.test.hsqldb.generatedclasses.tables.records.TDatesRecord, org.jooq.types.DayToSecond> I_D = createField("I_D", org.jooq.impl.SQLDataType.INTERVALDAYTOSECOND, this);
|
||||
|
||||
public TDates() {
|
||||
super("T_DATES", org.jooq.test.hsqldb.generatedclasses.Public.PUBLIC);
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ package org.jooq.test.hsqldb.generatedclasses.tables.records;
|
||||
*/
|
||||
public class TDatesRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.hsqldb.generatedclasses.tables.records.TDatesRecord> {
|
||||
|
||||
private static final long serialVersionUID = 637300834;
|
||||
private static final long serialVersionUID = -344451154;
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
@ -98,6 +98,34 @@ public class TDatesRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.tes
|
||||
return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES.TS_BIGINT);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public void setIY(org.jooq.types.YearToMonth value) {
|
||||
setValue(org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES.I_Y, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public org.jooq.types.YearToMonth getIY() {
|
||||
return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES.I_Y);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public void setID(org.jooq.types.DayToSecond value) {
|
||||
setValue(org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES.I_D, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public org.jooq.types.DayToSecond getID() {
|
||||
return getValue(org.jooq.test.hsqldb.generatedclasses.tables.TDates.T_DATES.I_D);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached TDatesRecord
|
||||
*/
|
||||
|
||||
@ -698,8 +698,10 @@ public abstract class jOOQAbstractTest<
|
||||
|
||||
protected final Factory create() {
|
||||
String defaultSchema = System.getProperty("org.jooq.settings.defaultSchema", "");
|
||||
Boolean renderSchema = Boolean.valueOf(System.getProperty("org.jooq.settings.renderSchema", "true"));
|
||||
|
||||
Settings settings = SettingsTools.defaultSettings()
|
||||
.withRenderSchema(renderSchema)
|
||||
.withRenderMapping(new RenderMapping()
|
||||
.withDefaultSchema(defaultSchema))
|
||||
.withExecuteListeners(
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
<!-- Run a full mvn clean package install deploy first before this -->
|
||||
<target name="xjc-generator" description="Generate JAXB artefacts from XSD">
|
||||
<mkdir dir="${dir.target}" />
|
||||
<xjc schema="${dir.resources}/xsd/jooq-runtime-2.1.0.xsd" destdir="${dir.java}" package="org.jooq.conf">
|
||||
<xjc schema="${dir.resources}/xsd/jooq-runtime-2.3.0.xsd" destdir="${dir.java}" package="org.jooq.conf">
|
||||
<arg value="-extension"/>
|
||||
<arg value="-Xxew" />
|
||||
<arg value="-Xfluent-api" />
|
||||
|
||||
@ -99,6 +99,7 @@ public class SchemaMapping implements Serializable {
|
||||
|
||||
private final RenderMapping mapping;
|
||||
private final boolean ignoreMapping;
|
||||
private final boolean renderSchema;
|
||||
private transient Map<String, Schema> schemata;
|
||||
private transient Map<String, Table<?>> tables;
|
||||
|
||||
@ -120,10 +121,18 @@ public class SchemaMapping implements Serializable {
|
||||
* Auxiliary constructor used for backwards-compatibility.
|
||||
*/
|
||||
private SchemaMapping(Settings settings, boolean ignore) {
|
||||
boolean isRenderSchema = true;
|
||||
|
||||
if (settings == null) {
|
||||
logDeprecation();
|
||||
}
|
||||
else {
|
||||
if (settings.isRenderSchema() != null) {
|
||||
isRenderSchema = settings.isRenderSchema();
|
||||
}
|
||||
}
|
||||
|
||||
this.renderSchema = isRenderSchema;
|
||||
this.mapping = SettingsTools.getRenderMapping(settings);
|
||||
this.ignoreMapping = ignore;
|
||||
}
|
||||
@ -292,8 +301,9 @@ public class SchemaMapping implements Serializable {
|
||||
*/
|
||||
public Schema map(Schema schema) {
|
||||
if (ignoreMapping) return schema;
|
||||
Schema result = null;
|
||||
if (!renderSchema) return null;
|
||||
|
||||
Schema result = null;
|
||||
if (schema != null) {
|
||||
String schemaName = schema.getName();
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <all>
|
||||
* <element name="input" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||
* <element name="output" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="tables" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}MappedTables" minOccurs="0"/>
|
||||
* <element name="tables" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}MappedTables" minOccurs="0"/>
|
||||
* </all>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <all>
|
||||
* <element name="defaultSchema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="schemata" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}MappedSchemata" minOccurs="0"/>
|
||||
* <element name="schemata" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}MappedSchemata" minOccurs="0"/>
|
||||
* </all>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
@ -30,13 +30,14 @@ import javax.xml.bind.annotation.XmlType;
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <all>
|
||||
* <element name="renderMapping" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}RenderMapping" minOccurs="0"/>
|
||||
* <element name="renderNameStyle" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}RenderNameStyle" minOccurs="0"/>
|
||||
* <element name="renderKeywordStyle" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}RenderKeywordStyle" minOccurs="0"/>
|
||||
* <element name="renderSchema" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* <element name="renderMapping" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}RenderMapping" minOccurs="0"/>
|
||||
* <element name="renderNameStyle" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}RenderNameStyle" minOccurs="0"/>
|
||||
* <element name="renderKeywordStyle" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}RenderKeywordStyle" minOccurs="0"/>
|
||||
* <element name="renderFormatted" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* <element name="statementType" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}StatementType" minOccurs="0"/>
|
||||
* <element name="statementType" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}StatementType" minOccurs="0"/>
|
||||
* <element name="executeLogging" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* <element name="executeListeners" type="{http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd}ExecuteListeners" minOccurs="0"/>
|
||||
* <element name="executeListeners" type="{http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd}ExecuteListeners" minOccurs="0"/>
|
||||
* </all>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
@ -54,6 +55,8 @@ public class Settings
|
||||
{
|
||||
|
||||
private final static long serialVersionUID = 205L;
|
||||
@XmlElement(defaultValue = "true")
|
||||
protected Boolean renderSchema = true;
|
||||
protected RenderMapping renderMapping;
|
||||
@XmlElement(defaultValue = "QUOTED")
|
||||
protected RenderNameStyle renderNameStyle = RenderNameStyle.QUOTED;
|
||||
@ -69,6 +72,30 @@ public class Settings
|
||||
@XmlElement(name = "executeListener")
|
||||
protected List<String> executeListeners;
|
||||
|
||||
/**
|
||||
* Gets the value of the renderSchema property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public Boolean isRenderSchema() {
|
||||
return renderSchema;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the renderSchema property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public void setRenderSchema(Boolean value) {
|
||||
this.renderSchema = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the renderMapping property.
|
||||
*
|
||||
@ -220,6 +247,11 @@ public class Settings
|
||||
return executeListeners;
|
||||
}
|
||||
|
||||
public Settings withRenderSchema(Boolean value) {
|
||||
setRenderSchema(value);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Settings withRenderMapping(RenderMapping value) {
|
||||
setRenderMapping(value);
|
||||
return this;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.5-b02-fcs
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.03.01 at 10:44:24 PM MEZ
|
||||
// Generated on: 2012.04.12 at 07:54:20 PM MESZ
|
||||
//
|
||||
|
||||
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-runtime-2.1.0.xsd")
|
||||
@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd")
|
||||
package org.jooq.conf;
|
||||
|
||||
@ -499,8 +499,10 @@ public abstract class AbstractRoutine<T> extends AbstractSchemaProviderQueryPart
|
||||
}
|
||||
|
||||
private final void toSQLQualifiedName(RenderContext context) {
|
||||
if (Util.getMappedSchema(context, getSchema()) != null) {
|
||||
context.sql(Util.getMappedSchema(context, getSchema()));
|
||||
Schema mappedSchema = Util.getMappedSchema(context, getSchema());
|
||||
|
||||
if (mappedSchema != null) {
|
||||
context.sql(mappedSchema);
|
||||
context.sql(".");
|
||||
}
|
||||
|
||||
|
||||
@ -108,8 +108,10 @@ public class TableImpl<R extends Record> extends AbstractTable<R> {
|
||||
alias.toSQL(context);
|
||||
}
|
||||
else {
|
||||
if (Util.getMappedSchema(context, getSchema()) != null) {
|
||||
context.sql(Util.getMappedSchema(context, getSchema()));
|
||||
Schema mappedSchema = Util.getMappedSchema(context, getSchema());
|
||||
|
||||
if (mappedSchema != null) {
|
||||
context.sql(mappedSchema);
|
||||
context.sql(".");
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ import org.jooq.Attachable;
|
||||
import org.jooq.BindContext;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.RenderContext;
|
||||
import org.jooq.Schema;
|
||||
import org.jooq.UDT;
|
||||
import org.jooq.UDTRecord;
|
||||
import org.jooq.exception.SQLDialectNotSupportedException;
|
||||
@ -143,9 +144,10 @@ class UDTConstant<R extends UDTRecord<R>> extends AbstractField<R> {
|
||||
// Assume default behaviour if dialect is not available
|
||||
default: {
|
||||
UDT<?> udt = record.getUDT();
|
||||
Schema mappedSchema = Util.getMappedSchema(context, udt.getSchema());
|
||||
|
||||
if (Util.getMappedSchema(context, udt.getSchema()) != null) {
|
||||
return Util.getMappedSchema(context, udt.getSchema()) + "." + udt.getName();
|
||||
if (mappedSchema != null) {
|
||||
return mappedSchema + "." + udt.getName();
|
||||
}
|
||||
else {
|
||||
return udt.getName();
|
||||
|
||||
@ -48,6 +48,8 @@ import org.jooq.Result;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.impl.AbstractDataType;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
import org.jooq.types.DayToSecond;
|
||||
import org.jooq.types.YearToMonth;
|
||||
|
||||
/**
|
||||
* Supported data types for the {@link SQLDialect#HSQLDB} dialect
|
||||
@ -67,37 +69,39 @@ public class HSQLDBDataType<T> extends AbstractDataType<T> {
|
||||
// Default SQL data types and synonyms thereof
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
public static final HSQLDBDataType<Byte> TINYINT = new HSQLDBDataType<Byte>(SQLDataType.TINYINT, "tinyint");
|
||||
public static final HSQLDBDataType<Short> SMALLINT = new HSQLDBDataType<Short>(SQLDataType.SMALLINT, "smallint");
|
||||
public static final HSQLDBDataType<Integer> INT = new HSQLDBDataType<Integer>(SQLDataType.INTEGER, "int");
|
||||
public static final HSQLDBDataType<Integer> INTEGER = new HSQLDBDataType<Integer>(SQLDataType.INTEGER, "integer");
|
||||
public static final HSQLDBDataType<Long> BIGINT = new HSQLDBDataType<Long>(SQLDataType.BIGINT, "bigint");
|
||||
public static final HSQLDBDataType<Double> DOUBLE = new HSQLDBDataType<Double>(SQLDataType.DOUBLE, "double");
|
||||
public static final HSQLDBDataType<Double> DOUBLEPRECISION = new HSQLDBDataType<Double>(SQLDataType.DOUBLE, "double precision");
|
||||
public static final HSQLDBDataType<Double> FLOAT = new HSQLDBDataType<Double>(SQLDataType.FLOAT, "float");
|
||||
public static final HSQLDBDataType<Float> REAL = new HSQLDBDataType<Float>(SQLDataType.REAL, "real");
|
||||
public static final HSQLDBDataType<Boolean> BOOLEAN = new HSQLDBDataType<Boolean>(SQLDataType.BOOLEAN, "boolean");
|
||||
public static final HSQLDBDataType<Boolean> BIT = new HSQLDBDataType<Boolean>(SQLDataType.BIT, "bit");
|
||||
public static final HSQLDBDataType<BigDecimal> DECIMAL = new HSQLDBDataType<BigDecimal>(SQLDataType.DECIMAL, "decimal");
|
||||
public static final HSQLDBDataType<BigDecimal> NUMERIC = new HSQLDBDataType<BigDecimal>(SQLDataType.NUMERIC, "numeric");
|
||||
public static final HSQLDBDataType<String> VARCHAR = new HSQLDBDataType<String>(SQLDataType.VARCHAR, "varchar", "varchar(32672)");
|
||||
public static final HSQLDBDataType<String> LONGVARCHAR = new HSQLDBDataType<String>(SQLDataType.LONGVARCHAR, "longvarchar");
|
||||
public static final HSQLDBDataType<String> CHAR = new HSQLDBDataType<String>(SQLDataType.CHAR, "char");
|
||||
public static final HSQLDBDataType<String> CHARACTER = new HSQLDBDataType<String>(SQLDataType.CHAR, "character");
|
||||
public static final HSQLDBDataType<String> CHARACTERVARYING = new HSQLDBDataType<String>(SQLDataType.VARCHAR, "character varying", "character varying(32672)");
|
||||
public static final HSQLDBDataType<String> CLOB = new HSQLDBDataType<String>(SQLDataType.CLOB, "clob");
|
||||
public static final HSQLDBDataType<String> CHARLARGEOBJECT = new HSQLDBDataType<String>(SQLDataType.CLOB, "char large object", "clob");
|
||||
public static final HSQLDBDataType<String> CHARACTERLARGEOBJECT = new HSQLDBDataType<String>(SQLDataType.CLOB, "character large object", "clob");
|
||||
public static final HSQLDBDataType<Date> DATE = new HSQLDBDataType<Date>(SQLDataType.DATE, "date");
|
||||
public static final HSQLDBDataType<Time> TIME = new HSQLDBDataType<Time>(SQLDataType.TIME, "time");
|
||||
public static final HSQLDBDataType<Timestamp> TIMESTAMP = new HSQLDBDataType<Timestamp>(SQLDataType.TIMESTAMP, "timestamp");
|
||||
public static final HSQLDBDataType<Timestamp> DATETIME = new HSQLDBDataType<Timestamp>(SQLDataType.TIMESTAMP, "datetime");
|
||||
public static final HSQLDBDataType<byte[]> LONGVARBINARY = new HSQLDBDataType<byte[]>(SQLDataType.LONGVARBINARY, "longvarbinary");
|
||||
public static final HSQLDBDataType<byte[]> VARBINARY = new HSQLDBDataType<byte[]>(SQLDataType.VARBINARY, "varbinary", "varbinary(32672)");
|
||||
public static final HSQLDBDataType<byte[]> BINARY = new HSQLDBDataType<byte[]>(SQLDataType.BINARY, "binary");
|
||||
public static final HSQLDBDataType<byte[]> BLOB = new HSQLDBDataType<byte[]>(SQLDataType.BLOB, "blob");
|
||||
public static final HSQLDBDataType<byte[]> BINARYLARGEOBJECT = new HSQLDBDataType<byte[]>(SQLDataType.BLOB, "binary large object", "blob");
|
||||
public static final HSQLDBDataType<Object> OTHER = new HSQLDBDataType<Object>(SQLDataType.OTHER, "other");
|
||||
public static final HSQLDBDataType<Byte> TINYINT = new HSQLDBDataType<Byte>(SQLDataType.TINYINT, "tinyint");
|
||||
public static final HSQLDBDataType<Short> SMALLINT = new HSQLDBDataType<Short>(SQLDataType.SMALLINT, "smallint");
|
||||
public static final HSQLDBDataType<Integer> INT = new HSQLDBDataType<Integer>(SQLDataType.INTEGER, "int");
|
||||
public static final HSQLDBDataType<Integer> INTEGER = new HSQLDBDataType<Integer>(SQLDataType.INTEGER, "integer");
|
||||
public static final HSQLDBDataType<Long> BIGINT = new HSQLDBDataType<Long>(SQLDataType.BIGINT, "bigint");
|
||||
public static final HSQLDBDataType<Double> DOUBLE = new HSQLDBDataType<Double>(SQLDataType.DOUBLE, "double");
|
||||
public static final HSQLDBDataType<Double> DOUBLEPRECISION = new HSQLDBDataType<Double>(SQLDataType.DOUBLE, "double precision");
|
||||
public static final HSQLDBDataType<Double> FLOAT = new HSQLDBDataType<Double>(SQLDataType.FLOAT, "float");
|
||||
public static final HSQLDBDataType<Float> REAL = new HSQLDBDataType<Float>(SQLDataType.REAL, "real");
|
||||
public static final HSQLDBDataType<Boolean> BOOLEAN = new HSQLDBDataType<Boolean>(SQLDataType.BOOLEAN, "boolean");
|
||||
public static final HSQLDBDataType<Boolean> BIT = new HSQLDBDataType<Boolean>(SQLDataType.BIT, "bit");
|
||||
public static final HSQLDBDataType<BigDecimal> DECIMAL = new HSQLDBDataType<BigDecimal>(SQLDataType.DECIMAL, "decimal");
|
||||
public static final HSQLDBDataType<BigDecimal> NUMERIC = new HSQLDBDataType<BigDecimal>(SQLDataType.NUMERIC, "numeric");
|
||||
public static final HSQLDBDataType<String> VARCHAR = new HSQLDBDataType<String>(SQLDataType.VARCHAR, "varchar", "varchar(32672)");
|
||||
public static final HSQLDBDataType<String> LONGVARCHAR = new HSQLDBDataType<String>(SQLDataType.LONGVARCHAR, "longvarchar");
|
||||
public static final HSQLDBDataType<String> CHAR = new HSQLDBDataType<String>(SQLDataType.CHAR, "char");
|
||||
public static final HSQLDBDataType<String> CHARACTER = new HSQLDBDataType<String>(SQLDataType.CHAR, "character");
|
||||
public static final HSQLDBDataType<String> CHARACTERVARYING = new HSQLDBDataType<String>(SQLDataType.VARCHAR, "character varying", "character varying(32672)");
|
||||
public static final HSQLDBDataType<String> CLOB = new HSQLDBDataType<String>(SQLDataType.CLOB, "clob");
|
||||
public static final HSQLDBDataType<String> CHARLARGEOBJECT = new HSQLDBDataType<String>(SQLDataType.CLOB, "char large object", "clob");
|
||||
public static final HSQLDBDataType<String> CHARACTERLARGEOBJECT = new HSQLDBDataType<String>(SQLDataType.CLOB, "character large object", "clob");
|
||||
public static final HSQLDBDataType<Date> DATE = new HSQLDBDataType<Date>(SQLDataType.DATE, "date");
|
||||
public static final HSQLDBDataType<Time> TIME = new HSQLDBDataType<Time>(SQLDataType.TIME, "time");
|
||||
public static final HSQLDBDataType<Timestamp> TIMESTAMP = new HSQLDBDataType<Timestamp>(SQLDataType.TIMESTAMP, "timestamp");
|
||||
public static final HSQLDBDataType<Timestamp> DATETIME = new HSQLDBDataType<Timestamp>(SQLDataType.TIMESTAMP, "datetime");
|
||||
public static final HSQLDBDataType<byte[]> LONGVARBINARY = new HSQLDBDataType<byte[]>(SQLDataType.LONGVARBINARY, "longvarbinary");
|
||||
public static final HSQLDBDataType<byte[]> VARBINARY = new HSQLDBDataType<byte[]>(SQLDataType.VARBINARY, "varbinary", "varbinary(32672)");
|
||||
public static final HSQLDBDataType<byte[]> BINARY = new HSQLDBDataType<byte[]>(SQLDataType.BINARY, "binary");
|
||||
public static final HSQLDBDataType<byte[]> BLOB = new HSQLDBDataType<byte[]>(SQLDataType.BLOB, "blob");
|
||||
public static final HSQLDBDataType<byte[]> BINARYLARGEOBJECT = new HSQLDBDataType<byte[]>(SQLDataType.BLOB, "binary large object", "blob");
|
||||
public static final HSQLDBDataType<Object> OTHER = new HSQLDBDataType<Object>(SQLDataType.OTHER, "other");
|
||||
public static final HSQLDBDataType<YearToMonth> INTERVALYEARTOMONTH = new HSQLDBDataType<YearToMonth>(SQLDataType.INTERVALYEARTOMONTH, "interval year to month");
|
||||
public static final HSQLDBDataType<DayToSecond> INTERVALDAYTOSECOND = new HSQLDBDataType<DayToSecond>(SQLDataType.INTERVALDAYTOSECOND, "interval day to second");
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Compatibility types for supported SQLDataTypes
|
||||
|
||||
165
jOOQ/src/main/resources/xsd/jooq-runtime-2.3.0.xsd
Normal file
165
jOOQ/src/main/resources/xsd/jooq-runtime-2.3.0.xsd
Normal file
@ -0,0 +1,165 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<schema
|
||||
xmlns="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:jooq-runtime="http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd"
|
||||
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
|
||||
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
|
||||
jaxb:version="1.0" jaxb:extensionBindingPrefixes="xjc"
|
||||
targetNamespace="http://www.jooq.org/xsd/jooq-runtime-2.3.0.xsd">
|
||||
|
||||
<annotation>
|
||||
<appinfo>
|
||||
<jaxb:globalBindings>
|
||||
<xjc:serializable uid="205"/>
|
||||
</jaxb:globalBindings>
|
||||
</appinfo>
|
||||
</annotation>
|
||||
|
||||
<element name="settings" type="jooq-runtime:Settings"/>
|
||||
|
||||
<complexType name="Settings">
|
||||
<all>
|
||||
<!-- Whether any schema name should be rendered at all.
|
||||
Use this for single-schema environments, or when all objects are made
|
||||
available using synonyms -->
|
||||
<element name="renderSchema" type="boolean" minOccurs="0" maxOccurs="1" default="true"/>
|
||||
|
||||
<!-- Configure render mapping for runtime schema / table rewriting in
|
||||
generated SQL -->
|
||||
<element name="renderMapping" type="jooq-runtime:RenderMapping" minOccurs="0" maxOccurs="1"/>
|
||||
|
||||
<!-- Whether rendered schema, table, column names, etc should be quoted
|
||||
in rendered SQL, or transformed in any other way.
|
||||
This is set to "QUOTED" by default for backwards-compatibility -->
|
||||
<element name="renderNameStyle" type="jooq-runtime:RenderNameStyle" minOccurs="0" maxOccurs="1" default="QUOTED"/>
|
||||
|
||||
<!-- Whether SQL keywords should be rendered with upper or lower case -->
|
||||
<element name="renderKeywordStyle" type="jooq-runtime:RenderKeywordStyle" minOccurs="0" maxOccurs="1" default="LOWER"/>
|
||||
|
||||
<!-- Whether rendered SQL should be pretty-printed -->
|
||||
<element name="renderFormatted" type="boolean" minOccurs="0" maxOccurs="1" default="false"/>
|
||||
|
||||
<!-- The type of statement that is to be executed -->
|
||||
<element name="statementType" type="jooq-runtime:StatementType" minOccurs="0" maxOccurs="1" default="PREPARED_STATEMENT"/>
|
||||
|
||||
<!-- When set to true, this will add jOOQ's default logging ExecuteListeners -->
|
||||
<element name="executeLogging" type="boolean" minOccurs="0" maxOccurs="1" default="true"/>
|
||||
|
||||
<!-- The event listeners to be notified upon execution events -->
|
||||
<element name="executeListeners" type="jooq-runtime:ExecuteListeners" minOccurs="0" maxOccurs="1"/>
|
||||
</all>
|
||||
</complexType>
|
||||
|
||||
<complexType name="RenderMapping">
|
||||
<all>
|
||||
<!-- The default schema as defined in org.jooq.Schema.getName()
|
||||
This schema will be omitted in rendered SQL -->
|
||||
<element name="defaultSchema" type="string" minOccurs="0" maxOccurs="1"/>
|
||||
|
||||
<!-- The mapped schemata configuration -->
|
||||
<element name="schemata" type="jooq-runtime:MappedSchemata" minOccurs="0" maxOccurs="1"/>
|
||||
</all>
|
||||
</complexType>
|
||||
|
||||
<complexType name="MappedSchemata">
|
||||
<sequence>
|
||||
<element name="schema" type="jooq-runtime:MappedSchema" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="MappedSchema">
|
||||
<all>
|
||||
<!-- The input schema as defined in org.jooq.Schema.getName() -->
|
||||
<element name="input" type="string" minOccurs="1" maxOccurs="1"/>
|
||||
|
||||
<!-- The output schema as it will be rendered in SQL
|
||||
When this is omitted, you can still apply table mapping -->
|
||||
<element name="output" type="string" minOccurs="0" maxOccurs="1"/>
|
||||
|
||||
<!-- Configure table mapping for runtime table rewriting in
|
||||
generated SQL -->
|
||||
<element name="tables" type="jooq-runtime:MappedTables" minOccurs="0" maxOccurs="1"/>
|
||||
</all>
|
||||
</complexType>
|
||||
|
||||
<complexType name="MappedTables">
|
||||
<sequence>
|
||||
<element name="table" type="jooq-runtime:MappedTable" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
|
||||
<complexType name="MappedTable">
|
||||
<all>
|
||||
<!-- The input schema as defined in org.jooq.Table.getName() -->
|
||||
<element name="input" type="string" minOccurs="1" maxOccurs="1"/>
|
||||
|
||||
<!-- The output schema as it will be rendered in SQL -->
|
||||
<element name="output" type="string" minOccurs="1" maxOccurs="1"/>
|
||||
</all>
|
||||
</complexType>
|
||||
|
||||
<simpleType name="StatementType">
|
||||
<restriction base="string">
|
||||
|
||||
<!-- Execute statements with inlined bind values, avoiding JDBC's
|
||||
PreparedStatements -->
|
||||
<enumeration value="STATIC_STATEMENT"/>
|
||||
|
||||
<!-- Execute statements with bind values, using JDBC's
|
||||
PreparedStatements -->
|
||||
<enumeration value="PREPARED_STATEMENT"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
|
||||
<simpleType name="RenderNameStyle">
|
||||
<restriction base="string">
|
||||
|
||||
<!-- Render object names quoted, as defined in the database. Use this
|
||||
to stay on the safe side with case-sensitivity and special
|
||||
characters. For instance:
|
||||
Oracle : "SYS"."ALL_TAB_COLS"
|
||||
MySQL : `information_schema`.`TABLES`
|
||||
SQL Server: [INFORMATION_SCHEMA].[TABLES] -->
|
||||
<enumeration value="QUOTED"/>
|
||||
|
||||
<!-- Render object names, as defined in the database. For instance:
|
||||
Oracle : SYS.ALL_TAB_COLS
|
||||
MySQL : information_schema.TABLES
|
||||
SQL Server: INFORMATION_SCHEMA.TABLES -->
|
||||
<enumeration value="AS_IS"/>
|
||||
|
||||
<!-- Force rendering object names in lower case. For instance:
|
||||
Oracle : sys.all_tab_cols
|
||||
MySQL : information_schema.tables
|
||||
SQL Server: information_schema.tables -->
|
||||
<enumeration value="LOWER"/>
|
||||
|
||||
<!-- Force rendering object names in upper case. For instance:
|
||||
Oracle : SYS.ALL_TAB_COLS
|
||||
MySQL : INFORMATION_SCHEMA.TABLES
|
||||
SQL Server: INFORMATION_SCHEMA.TABLES -->
|
||||
<enumeration value="UPPER"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
|
||||
<simpleType name="RenderKeywordStyle">
|
||||
<restriction base="string">
|
||||
|
||||
<!-- Keywords are rendered in lower case. For instance:
|
||||
select .. from .. where .. -->
|
||||
<enumeration value="LOWER"/>
|
||||
|
||||
<!-- Keywords are rendered in upper case. For instance:
|
||||
SELECT .. FROM .. WHERE .. -->
|
||||
<enumeration value="UPPER"/>
|
||||
</restriction>
|
||||
</simpleType>
|
||||
|
||||
<complexType name="ExecuteListeners">
|
||||
<sequence>
|
||||
|
||||
<!-- An event listener implementing org.jooq.ExecuteListener -->
|
||||
<element name="executeListener" type="string" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
</complexType>
|
||||
</schema>
|
||||
Loading…
Reference in New Issue
Block a user