[#1257] Add CUBRID support - Fixed some issues
This commit is contained in:
parent
7c003bbbf7
commit
7d6392e62e
@ -519,7 +519,7 @@ public abstract class BaseTest<
|
||||
return delegate.TDirectory_PARENT_ID();
|
||||
}
|
||||
|
||||
protected TableField<D, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<D, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return delegate.TDirectory_IS_DIRECTORY();
|
||||
}
|
||||
|
||||
|
||||
@ -42,8 +42,8 @@ import static org.jooq.impl.Factory.avg;
|
||||
import static org.jooq.impl.Factory.count;
|
||||
import static org.jooq.impl.Factory.field;
|
||||
import static org.jooq.impl.Factory.literal;
|
||||
import static org.jooq.impl.Factory.lower;
|
||||
import static org.jooq.impl.Factory.max;
|
||||
import static org.jooq.impl.Factory.one;
|
||||
import static org.jooq.impl.Factory.substring;
|
||||
import static org.jooq.impl.Factory.sum;
|
||||
import static org.jooq.impl.Factory.table;
|
||||
@ -338,42 +338,41 @@ extends BaseTest<A, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658, T725
|
||||
}
|
||||
|
||||
List<?> paths =
|
||||
create().select(substring(sysConnectByPath(TDirectory_NAME(), "/"), 2))
|
||||
create().select(substring(sysConnectByPath(lower(TDirectory_NAME()), "/"), 2).as("dir"))
|
||||
.from(TDirectory())
|
||||
.where(trueCondition())
|
||||
.and(trueCondition())
|
||||
.connectBy(prior(TDirectory_ID()).equal(TDirectory_PARENT_ID()))
|
||||
.startWith(TDirectory_PARENT_ID().isNull())
|
||||
.orderBy(one())
|
||||
.orderBy(1)
|
||||
.fetch(0);
|
||||
|
||||
assertEquals(26, paths.size());
|
||||
assertEquals(25, paths.size());
|
||||
assertEquals(Arrays.asList(
|
||||
"C:",
|
||||
"C:/eclipse",
|
||||
"C:/eclipse/configuration",
|
||||
"C:/eclipse/dropins",
|
||||
"C:/eclipse/eclipse.exe",
|
||||
"C:/eclipse/eclipse.ini",
|
||||
"C:/eclipse/features",
|
||||
"C:/eclipse/plugins",
|
||||
"C:/eclipse/p2",
|
||||
"C:/eclipse/readme",
|
||||
"C:/eclipse/readme/readme_eclipse.html",
|
||||
"C:/eclipse/src",
|
||||
"C:/Program Files",
|
||||
"C:/Program Files/Internet Explorer",
|
||||
"C:/Program Files/Internet Explorer/de-DE",
|
||||
"C:/Program Files/Internet Explorer/ielowutil.exe",
|
||||
"C:/Program Files/Internet Explorer/iexplore.exe",
|
||||
"C:/Program Files/Java",
|
||||
"C:/Program Files/Java/jre6",
|
||||
"C:/Program Files/Java/jre6/bin",
|
||||
"C:/Program Files/Java/jre6/bin/java.exe",
|
||||
"C:/Program Files/Java/jre6/bin/javaw.exe",
|
||||
"C:/Program Files/Java/jre6/bin/javaws.exe",
|
||||
"C:/Program Files/Java/jre6/lib",
|
||||
"C:/Program Files/Java/jre6/lib/javaws.jar",
|
||||
"C:/Program Files/Java/jre6/lib/rt.jar"), paths);
|
||||
"c:",
|
||||
"c:/eclipse",
|
||||
"c:/eclipse/configuration",
|
||||
"c:/eclipse/dropins",
|
||||
"c:/eclipse/eclipse.exe",
|
||||
"c:/eclipse/eclipse.ini",
|
||||
"c:/eclipse/features",
|
||||
"c:/eclipse/plugins",
|
||||
"c:/eclipse/readme",
|
||||
"c:/eclipse/readme/readme_eclipse.html",
|
||||
"c:/eclipse/src",
|
||||
"c:/program files",
|
||||
"c:/program files/internet explorer",
|
||||
"c:/program files/internet explorer/de-de",
|
||||
"c:/program files/internet explorer/ielowutil.exe",
|
||||
"c:/program files/internet explorer/iexplore.exe",
|
||||
"c:/program files/java",
|
||||
"c:/program files/java/jre6",
|
||||
"c:/program files/java/jre6/bin",
|
||||
"c:/program files/java/jre6/bin/java.exe",
|
||||
"c:/program files/java/jre6/bin/javaw.exe",
|
||||
"c:/program files/java/jre6/bin/javaws.exe",
|
||||
"c:/program files/java/jre6/lib",
|
||||
"c:/program files/java/jre6/lib/javaws.jar",
|
||||
"c:/program files/java/jre6/lib/rt.jar"), paths);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ DROP TABLE t_book/
|
||||
DROP TABLE t_book_details/
|
||||
DROP TABLE t_author/
|
||||
DROP TABLE t_language/
|
||||
DROP TABLE t_directory/
|
||||
DROP TABLE x_test_case_85/
|
||||
DROP TABLE x_test_case_71/
|
||||
DROP TABLE x_test_case_64_69/
|
||||
@ -91,6 +92,17 @@ EXECUTE AFTER
|
||||
UPDATE t_triggers SET id = id_generated, counter = id_generated * 2
|
||||
/
|
||||
|
||||
CREATE TABLE t_directory (
|
||||
id int NOT NULL,
|
||||
parent_id int,
|
||||
is_directory int,
|
||||
"name" varchar(50),
|
||||
|
||||
CONSTRAINT pk_t_directory PRIMARY KEY (ID),
|
||||
CONSTRAINT pk_t_directory_self FOREIGN KEY (PARENT_ID) REFERENCES t_directory(ID) ON DELETE CASCADE
|
||||
)
|
||||
/
|
||||
|
||||
CREATE TABLE t_language (
|
||||
cd CHAR(2) NOT NULL,
|
||||
description VARCHAR(50) NULL,
|
||||
|
||||
@ -8,7 +8,7 @@ package org.jooq.test.cubrid.generatedclasses;
|
||||
*/
|
||||
public class Dba extends org.jooq.impl.SchemaImpl {
|
||||
|
||||
private static final long serialVersionUID = -1364291472;
|
||||
private static final long serialVersionUID = -1747808426;
|
||||
|
||||
/**
|
||||
* The singleton instance of DBA
|
||||
@ -46,6 +46,7 @@ public class Dba extends org.jooq.impl.SchemaImpl {
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE,
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TBooleans.T_BOOLEANS,
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TDates.T_DATES,
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY,
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TIdentity.T_IDENTITY,
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK,
|
||||
org.jooq.test.cubrid.generatedclasses.tables.TTriggers.T_TRIGGERS,
|
||||
|
||||
@ -27,6 +27,7 @@ public class Keys extends org.jooq.impl.AbstractKeys {
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TBookToBookStoreRecord> T_BOOK_TO_BOOK_STORE__PK_B2BS = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_ID);
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TBooleansRecord> T_BOOLEANS__PK_T_BOOLEANS = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TBooleans.T_BOOLEANS, org.jooq.test.cubrid.generatedclasses.tables.TBooleans.ID);
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDatesRecord> T_DATES__PK_T_DATES = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TDates.T_DATES, org.jooq.test.cubrid.generatedclasses.tables.TDates.ID);
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> T_DIRECTORY__PK_T_DIRECTORY = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TDirectory.ID);
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TIdentityPkRecord> T_IDENTITY_PK__PK_T_IDENTITY_PK = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.T_IDENTITY_PK, org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk.ID);
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TTriggersRecord> T_TRIGGERS__PK_T_TRIGGERS = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.TTriggers.T_TRIGGERS, org.jooq.test.cubrid.generatedclasses.tables.TTriggers.ID_GENERATED);
|
||||
public static final org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.XTestCase_64_69Record> X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69 = createUniqueKey(org.jooq.test.cubrid.generatedclasses.tables.XTestCase_64_69.X_TEST_CASE_64_69, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_64_69.ID);
|
||||
@ -40,6 +41,7 @@ public class Keys extends org.jooq.impl.AbstractKeys {
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.TBookRecord, org.jooq.test.cubrid.generatedclasses.tables.records.TAuthorRecord> T_BOOK__FK_T_BOOK_CO_AUTHOR_ID = createForeignKey(T_AUTHOR__PK_T_AUTHOR, org.jooq.test.cubrid.generatedclasses.tables.TBook.T_BOOK, org.jooq.test.cubrid.generatedclasses.tables.TBook.CO_AUTHOR_ID);
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.TBookToBookStoreRecord, org.jooq.test.cubrid.generatedclasses.tables.records.TBookStoreRecord> T_BOOK_TO_BOOK_STORE__FK_B2BS_BS_NAME = createForeignKey(T_BOOK_STORE__UK_T_BOOK_STORE_NAME, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_STORE_NAME);
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.TBookToBookStoreRecord, org.jooq.test.cubrid.generatedclasses.tables.records.TBookRecord> T_BOOK_TO_BOOK_STORE__FK_B2BS_B_ID = createForeignKey(T_BOOK__PK_T_BOOK, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore.BOOK_ID);
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> T_DIRECTORY__PK_T_DIRECTORY_SELF = createForeignKey(T_DIRECTORY__PK_T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY, org.jooq.test.cubrid.generatedclasses.tables.TDirectory.PARENT_ID);
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.XTestCase_71Record, org.jooq.test.cubrid.generatedclasses.tables.records.XTestCase_64_69Record> X_TEST_CASE_71__FK_X_TEST_CASE_71 = createForeignKey(X_TEST_CASE_64_69__PK_X_TEST_CASE_64_69, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_71.X_TEST_CASE_71, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_71.TEST_CASE_64_69_ID);
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.XTestCase_85Record, org.jooq.test.cubrid.generatedclasses.tables.records.XUnusedRecord> X_TEST_CASE_85__FK_X_TEST_CASE_85 = createForeignKey(X_UNUSED__PK_X_UNUSED, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_85.X_TEST_CASE_85, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_85.X_UNUSED_ID, org.jooq.test.cubrid.generatedclasses.tables.XTestCase_85.X_UNUSED_NAME);
|
||||
public static final org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.XUnusedRecord, org.jooq.test.cubrid.generatedclasses.tables.records.XUnusedRecord> X_UNUSED__FK_X_UNUSED_SELF = createForeignKey(X_UNUSED__PK_X_UNUSED, org.jooq.test.cubrid.generatedclasses.tables.XUnused.X_UNUSED, org.jooq.test.cubrid.generatedclasses.tables.XUnused.NAME_REF, org.jooq.test.cubrid.generatedclasses.tables.XUnused.ID_REF);
|
||||
|
||||
@ -70,6 +70,11 @@ public final class Tables {
|
||||
*/
|
||||
public static org.jooq.test.cubrid.generatedclasses.tables.TDates T_DATES = org.jooq.test.cubrid.generatedclasses.tables.TDates.T_DATES;
|
||||
|
||||
/**
|
||||
* The table DBA.t_directory
|
||||
*/
|
||||
public static org.jooq.test.cubrid.generatedclasses.tables.TDirectory T_DIRECTORY = org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY;
|
||||
|
||||
/**
|
||||
* The table DBA.t_identity
|
||||
*/
|
||||
|
||||
@ -0,0 +1,82 @@
|
||||
/**
|
||||
* This class is generated by jOOQ
|
||||
*/
|
||||
package org.jooq.test.cubrid.generatedclasses.tables;
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
public class TDirectory extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1907354153;
|
||||
|
||||
/**
|
||||
* The singleton instance of DBA.t_directory
|
||||
*/
|
||||
public static final org.jooq.test.cubrid.generatedclasses.tables.TDirectory T_DIRECTORY = new org.jooq.test.cubrid.generatedclasses.tables.TDirectory();
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
private static final java.lang.Class<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> __RECORD_TYPE = org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord.class;
|
||||
|
||||
/**
|
||||
* The class holding records for this type
|
||||
*/
|
||||
@Override
|
||||
public java.lang.Class<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> getRecordType() {
|
||||
return __RECORD_TYPE;
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*
|
||||
* PRIMARY KEY
|
||||
*/
|
||||
public static final org.jooq.TableField<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, java.lang.Integer> ID = createField("id", org.jooq.impl.SQLDataType.INTEGER, T_DIRECTORY);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
* <p>
|
||||
* <code><pre>
|
||||
* CONSTRAINT t_directory__pk_t_directory_self
|
||||
* FOREIGN KEY (parent_id)
|
||||
* REFERENCES DBA.t_directory (id)
|
||||
* </pre></code>
|
||||
*/
|
||||
public static final org.jooq.TableField<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, java.lang.Integer> PARENT_ID = createField("parent_id", org.jooq.impl.SQLDataType.INTEGER, T_DIRECTORY);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.TableField<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, java.lang.Integer> IS_DIRECTORY = createField("is_directory", org.jooq.impl.SQLDataType.INTEGER, T_DIRECTORY);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.TableField<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, java.lang.String> NAME = createField("name", org.jooq.impl.SQLDataType.VARCHAR, T_DIRECTORY);
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
private TDirectory() {
|
||||
super("t_directory", org.jooq.test.cubrid.generatedclasses.Dba.DBA);
|
||||
}
|
||||
|
||||
@Override
|
||||
public org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> getMainKey() {
|
||||
return org.jooq.test.cubrid.generatedclasses.Keys.T_DIRECTORY__PK_T_DIRECTORY;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public java.util.List<org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord>> getKeys() {
|
||||
return java.util.Arrays.<org.jooq.UniqueKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord>>asList(org.jooq.test.cubrid.generatedclasses.Keys.T_DIRECTORY__PK_T_DIRECTORY);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public java.util.List<org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, ?>> getReferences() {
|
||||
return java.util.Arrays.<org.jooq.ForeignKey<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord, ?>>asList(org.jooq.test.cubrid.generatedclasses.Keys.T_DIRECTORY__PK_T_DIRECTORY_SELF);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,119 @@
|
||||
/**
|
||||
* This class is generated by jOOQ
|
||||
*/
|
||||
package org.jooq.test.cubrid.generatedclasses.tables.records;
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
public class TDirectoryRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> {
|
||||
|
||||
private static final long serialVersionUID = -179681099;
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*
|
||||
* PRIMARY KEY
|
||||
*/
|
||||
public void setId(java.lang.Integer value) {
|
||||
setValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.ID, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*
|
||||
* PRIMARY KEY
|
||||
*/
|
||||
public java.lang.Integer getId() {
|
||||
return getValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*
|
||||
* PRIMARY KEY
|
||||
*/
|
||||
public java.util.List<org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord> fetchTDirectoryList() {
|
||||
return create()
|
||||
.selectFrom(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY)
|
||||
.where(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.PARENT_ID.equal(getValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.ID)))
|
||||
.fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
* <p>
|
||||
* <code><pre>
|
||||
* CONSTRAINT t_directory__pk_t_directory_self
|
||||
* FOREIGN KEY (parent_id)
|
||||
* REFERENCES DBA.t_directory (id)
|
||||
* </pre></code>
|
||||
*/
|
||||
public void setParentId(java.lang.Integer value) {
|
||||
setValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.PARENT_ID, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
* <p>
|
||||
* <code><pre>
|
||||
* CONSTRAINT t_directory__pk_t_directory_self
|
||||
* FOREIGN KEY (parent_id)
|
||||
* REFERENCES DBA.t_directory (id)
|
||||
* </pre></code>
|
||||
*/
|
||||
public java.lang.Integer getParentId() {
|
||||
return getValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.PARENT_ID);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
* <p>
|
||||
* <code><pre>
|
||||
* CONSTRAINT t_directory__pk_t_directory_self
|
||||
* FOREIGN KEY (parent_id)
|
||||
* REFERENCES DBA.t_directory (id)
|
||||
* </pre></code>
|
||||
*/
|
||||
public org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord fetchTDirectory() {
|
||||
return create()
|
||||
.selectFrom(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY)
|
||||
.where(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.ID.equal(getValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.PARENT_ID)))
|
||||
.fetchOne();
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public void setIsDirectory(java.lang.Integer value) {
|
||||
setValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.IS_DIRECTORY, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public java.lang.Integer getIsDirectory() {
|
||||
return getValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.IS_DIRECTORY);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public void setName(java.lang.String value) {
|
||||
setValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.NAME, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
return getValue(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a detached TDirectoryRecord
|
||||
*/
|
||||
public TDirectoryRecord() {
|
||||
super(org.jooq.test.cubrid.generatedclasses.tables.TDirectory.T_DIRECTORY);
|
||||
}
|
||||
}
|
||||
@ -10,6 +10,7 @@ DELETE FROM t_book_store/
|
||||
DELETE FROM t_book/
|
||||
DELETE FROM t_author/
|
||||
DELETE FROM t_language/
|
||||
DELETE FROM t_directory/
|
||||
DELETE FROM t_booleans/
|
||||
DELETE FROM t_dates/
|
||||
DELETE FROM t_identity/
|
||||
@ -60,4 +61,30 @@ INSERT INTO t_book_to_book_store VALUES ('Orell Füssli', 2, 10)/
|
||||
INSERT INTO t_book_to_book_store VALUES ('Orell Füssli', 3, 10)/
|
||||
INSERT INTO t_book_to_book_store VALUES ('Ex Libris', 1, 1)/
|
||||
INSERT INTO t_book_to_book_store VALUES ('Ex Libris', 3, 2)/
|
||||
INSERT INTO t_book_to_book_store VALUES ('Buchhandlung im Volkshaus', 3, 1)/
|
||||
INSERT INTO t_book_to_book_store VALUES ('Buchhandlung im Volkshaus', 3, 1)/
|
||||
|
||||
INSERT INTO t_directory VALUES ( 1, null, 1, 'C:')/
|
||||
INSERT INTO t_directory VALUES ( 2, 1, 1, 'eclipse')/
|
||||
INSERT INTO t_directory VALUES ( 3, 2, 1, 'configuration')/
|
||||
INSERT INTO t_directory VALUES ( 4, 2, 1, 'dropins')/
|
||||
INSERT INTO t_directory VALUES ( 5, 2, 1, 'features')/
|
||||
INSERT INTO t_directory VALUES ( 7, 2, 1, 'plugins')/
|
||||
INSERT INTO t_directory VALUES ( 8, 2, 1, 'readme')/
|
||||
INSERT INTO t_directory VALUES ( 9, 8, 0, 'readme_eclipse.html')/
|
||||
INSERT INTO t_directory VALUES (10, 2, 1, 'src')/
|
||||
INSERT INTO t_directory VALUES (11, 2, 0, 'eclipse.exe')/
|
||||
INSERT INTO t_directory VALUES (12, 2, 0, 'eclipse.ini')/
|
||||
INSERT INTO t_directory VALUES (13, 1, 1, 'Program Files')/
|
||||
INSERT INTO t_directory VALUES (14, 13, 1, 'Internet Explorer')/
|
||||
INSERT INTO t_directory VALUES (15, 14, 1, 'de-DE')/
|
||||
INSERT INTO t_directory VALUES (16, 14, 0, 'ielowutil.exe')/
|
||||
INSERT INTO t_directory VALUES (17, 14, 0, 'iexplore.exe')/
|
||||
INSERT INTO t_directory VALUES (18, 13, 1, 'Java')/
|
||||
INSERT INTO t_directory VALUES (19, 18, 1, 'jre6')/
|
||||
INSERT INTO t_directory VALUES (20, 19, 1, 'bin')/
|
||||
INSERT INTO t_directory VALUES (21, 20, 0, 'java.exe')/
|
||||
INSERT INTO t_directory VALUES (22, 20, 0, 'javaw.exe')/
|
||||
INSERT INTO t_directory VALUES (23, 20, 0, 'javaws.exe')/
|
||||
INSERT INTO t_directory VALUES (24, 19, 1, 'lib')/
|
||||
INSERT INTO t_directory VALUES (25, 24, 0, 'javaws.jar')/
|
||||
INSERT INTO t_directory VALUES (26, 24, 0, 'rt.jar')/
|
||||
@ -528,7 +528,7 @@ public class jOOQASETest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -651,7 +651,7 @@ public abstract class jOOQAbstractTest<
|
||||
protected abstract UpdatableTable<D> TDirectory();
|
||||
protected abstract TableField<D, Integer> TDirectory_ID();
|
||||
protected abstract TableField<D, Integer> TDirectory_PARENT_ID();
|
||||
protected abstract TableField<D, Byte> TDirectory_IS_DIRECTORY();
|
||||
protected abstract TableField<D, Integer> TDirectory_IS_DIRECTORY();
|
||||
protected abstract TableField<D, String> TDirectory_NAME();
|
||||
|
||||
protected abstract UpdatableTable<T> TTriggers();
|
||||
|
||||
@ -34,6 +34,7 @@ package org.jooq.test;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.T_BOOK_TO_BOOK_STORE;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.T_BOOLEANS;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.T_DATES;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.T_DIRECTORY;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.T_IDENTITY;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.T_IDENTITY_PK;
|
||||
import static org.jooq.test.cubrid.generatedclasses.Tables.V_AUTHOR;
|
||||
@ -67,6 +68,7 @@ import org.jooq.test.cubrid.generatedclasses.tables.TBook;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TBookStore;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TBookToBookStore;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TBooleans;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TDirectory;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TIdentity;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TIdentityPk;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.TTriggers;
|
||||
@ -81,6 +83,7 @@ import org.jooq.test.cubrid.generatedclasses.tables.records.TBookStoreRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TBookToBookStoreRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TBooleansRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TDatesRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TDirectoryRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TIdentityPkRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TIdentityRecord;
|
||||
import org.jooq.test.cubrid.generatedclasses.tables.records.TTriggersRecord;
|
||||
@ -113,7 +116,7 @@ public class jOOQCUBRIDTest extends jOOQAbstractTest<
|
||||
XUnusedRecord,
|
||||
TDatesRecord,
|
||||
TBooleansRecord,
|
||||
XUnusedRecord,
|
||||
TDirectoryRecord,
|
||||
TTriggersRecord,
|
||||
XUnusedRecord,
|
||||
TIdentityRecord,
|
||||
@ -514,28 +517,28 @@ public class jOOQCUBRIDTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected UpdatableTable<XUnusedRecord> TDirectory() {
|
||||
return null;
|
||||
protected UpdatableTable<TDirectoryRecord> TDirectory() {
|
||||
return T_DIRECTORY;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_ID() {
|
||||
return null;
|
||||
protected TableField<TDirectoryRecord, Integer> TDirectory_ID() {
|
||||
return TDirectory.ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_PARENT_ID() {
|
||||
return null;
|
||||
protected TableField<TDirectoryRecord, Integer> TDirectory_PARENT_ID() {
|
||||
return TDirectory.PARENT_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
protected TableField<TDirectoryRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return TDirectory.IS_DIRECTORY;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, String> TDirectory_NAME() {
|
||||
return null;
|
||||
protected TableField<TDirectoryRecord, String> TDirectory_NAME() {
|
||||
return TDirectory.NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -545,7 +545,7 @@ public class jOOQDB2Test extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -536,7 +536,7 @@ public class jOOQDerbyTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -544,7 +544,7 @@ public class jOOQH2Test extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -535,7 +535,7 @@ public class jOOQHSQLDBTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -551,7 +551,7 @@ public class jOOQHSQLDBTest2 extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<TDirectoryRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<TDirectoryRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return T_DIRECTORY.IS_DIRECTORY;
|
||||
}
|
||||
|
||||
|
||||
@ -537,7 +537,7 @@ public class jOOQIngresTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -560,7 +560,7 @@ public class jOOQMySQLTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -537,7 +537,7 @@ public class jOOQMySQLTestSchemaRewrite extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -611,7 +611,7 @@ public class jOOQOracleTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<TDirectoryRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<TDirectoryRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return T_DIRECTORY.IS_DIRECTORY;
|
||||
}
|
||||
|
||||
|
||||
@ -544,7 +544,7 @@ public class jOOQPostgresTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -532,7 +532,7 @@ public class jOOQSQLServerTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -531,7 +531,7 @@ public class jOOQSQLiteTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -527,7 +527,7 @@ public class jOOQSybaseTest extends jOOQAbstractTest<
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TableField<XUnusedRecord, Byte> TDirectory_IS_DIRECTORY() {
|
||||
protected TableField<XUnusedRecord, Integer> TDirectory_IS_DIRECTORY() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -305,11 +305,11 @@ END t_triggers_trigger;
|
||||
CREATE TABLE t_directory (
|
||||
id number(7) NOT NULL,
|
||||
parent_id number(7),
|
||||
is_directory number(1),
|
||||
is_directory number(7),
|
||||
"name" varchar2(50),
|
||||
|
||||
CONSTRAINT pk_t_directory PRIMARY KEY (ID),
|
||||
CONSTRAINT pk_t_directory_self FOREIGN KEY (PARENT_ID) REFERENCES t_directory(ID)
|
||||
CONSTRAINT pk_t_directory_self FOREIGN KEY (PARENT_ID) REFERENCES t_directory(ID) ON DELETE CASCADE
|
||||
)
|
||||
/
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ package org.jooq.test.oracle.generatedclasses.test.tables;
|
||||
*/
|
||||
public class TDirectory extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord> {
|
||||
|
||||
private static final long serialVersionUID = 693215027;
|
||||
private static final long serialVersionUID = -587003708;
|
||||
|
||||
/**
|
||||
* The singleton instance of TEST.T_DIRECTORY
|
||||
@ -49,7 +49,7 @@ public class TDirectory extends org.jooq.impl.UpdatableTableImpl<org.jooq.test.o
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord, java.lang.Byte> IS_DIRECTORY = createField("IS_DIRECTORY", org.jooq.impl.SQLDataType.TINYINT, this);
|
||||
public final org.jooq.TableField<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord, java.lang.Integer> IS_DIRECTORY = createField("IS_DIRECTORY", org.jooq.impl.SQLDataType.INTEGER, this);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
|
||||
@ -10,11 +10,11 @@ package org.jooq.test.oracle.generatedclasses.test.tables.pojos;
|
||||
@javax.persistence.Table(name = "T_DIRECTORY", schema = "TEST")
|
||||
public class TDirectory implements java.io.Serializable {
|
||||
|
||||
private static final long serialVersionUID = -958687423;
|
||||
private static final long serialVersionUID = 986299765;
|
||||
|
||||
private java.lang.Integer id;
|
||||
private java.lang.Integer parentId;
|
||||
private java.lang.Byte isDirectory;
|
||||
private java.lang.Integer isDirectory;
|
||||
private java.lang.String name;
|
||||
|
||||
@javax.persistence.Id
|
||||
@ -36,12 +36,12 @@ public class TDirectory implements java.io.Serializable {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
@javax.persistence.Column(name = "IS_DIRECTORY", precision = 1)
|
||||
public java.lang.Byte getIsDirectory() {
|
||||
@javax.persistence.Column(name = "IS_DIRECTORY", precision = 7)
|
||||
public java.lang.Integer getIsDirectory() {
|
||||
return this.isDirectory;
|
||||
}
|
||||
|
||||
public void setIsDirectory(java.lang.Byte isDirectory) {
|
||||
public void setIsDirectory(java.lang.Integer isDirectory) {
|
||||
this.isDirectory = isDirectory;
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ package org.jooq.test.oracle.generatedclasses.test.tables.records;
|
||||
@javax.persistence.Table(name = "T_DIRECTORY", schema = "TEST")
|
||||
public class TDirectoryRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq.test.oracle.generatedclasses.test.tables.records.TDirectoryRecord> {
|
||||
|
||||
private static final long serialVersionUID = 1112825583;
|
||||
private static final long serialVersionUID = -2033765815;
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
@ -90,15 +90,15 @@ public class TDirectoryRecord extends org.jooq.impl.UpdatableRecordImpl<org.jooq
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public void setIsDirectory(java.lang.Byte value) {
|
||||
public void setIsDirectory(java.lang.Integer value) {
|
||||
setValue(org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY.IS_DIRECTORY, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
@javax.persistence.Column(name = "IS_DIRECTORY", precision = 1)
|
||||
public java.lang.Byte getIsDirectory() {
|
||||
@javax.persistence.Column(name = "IS_DIRECTORY", precision = 7)
|
||||
public java.lang.Integer getIsDirectory() {
|
||||
return getValue(org.jooq.test.oracle.generatedclasses.test.tables.TDirectory.T_DIRECTORY.IS_DIRECTORY);
|
||||
}
|
||||
|
||||
|
||||
@ -76,7 +76,6 @@ INSERT INTO t_directory VALUES ( 1, null, 1, 'C:')/
|
||||
INSERT INTO t_directory VALUES ( 3, 2, 1, 'configuration')/
|
||||
INSERT INTO t_directory VALUES ( 4, 2, 1, 'dropins')/
|
||||
INSERT INTO t_directory VALUES ( 5, 2, 1, 'features')/
|
||||
INSERT INTO t_directory VALUES ( 6, 2, 1, 'p2')/
|
||||
INSERT INTO t_directory VALUES ( 7, 2, 1, 'plugins')/
|
||||
INSERT INTO t_directory VALUES ( 8, 2, 1, 'readme')/
|
||||
INSERT INTO t_directory VALUES ( 9, 8, 0, 'readme_eclipse.html')/
|
||||
|
||||
@ -784,6 +784,27 @@ public final class Routines {
|
||||
p.execute(configuration);
|
||||
}
|
||||
|
||||
/**
|
||||
* Call TEST.P_DEFAULT
|
||||
*
|
||||
* @param P_IN_NUMBER IN parameter
|
||||
* @param P_OUT_NUMBER OUT parameter
|
||||
* @param P_IN_VARCHAR IN parameter
|
||||
* @param P_OUT_VARCHAR OUT parameter
|
||||
* @param P_IN_DATE IN parameter
|
||||
* @param P_OUT_DATE OUT parameter
|
||||
* @throws org.jooq.exception.DataAccessException if something went wrong executing the query
|
||||
*/
|
||||
public static org.jooq.test.oracle3.generatedclasses.routines.P_DEFAULT call_P_DEFAULT(org.jooq.Configuration configuration, java.lang.Number P_IN_NUMBER, java.lang.String P_IN_VARCHAR, java.sql.Date P_IN_DATE) {
|
||||
org.jooq.test.oracle3.generatedclasses.routines.P_DEFAULT p = new org.jooq.test.oracle3.generatedclasses.routines.P_DEFAULT();
|
||||
p.setP_IN_NUMBER(P_IN_NUMBER);
|
||||
p.setP_IN_VARCHAR(P_IN_VARCHAR);
|
||||
p.setP_IN_DATE(P_IN_DATE);
|
||||
|
||||
p.execute(configuration);
|
||||
return p;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call TEST.P_ENHANCE_ADDRESS1
|
||||
*
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
/**
|
||||
* This class is generated by jOOQ
|
||||
*/
|
||||
package org.jooq.test.oracle3.generatedclasses.routines;
|
||||
|
||||
/**
|
||||
* This class is generated by jOOQ.
|
||||
*/
|
||||
public class P_DEFAULT extends org.jooq.impl.AbstractRoutine<java.lang.Void> implements java.lang.Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 2037862521;
|
||||
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.Parameter<java.math.BigDecimal> P_IN_NUMBER = createParameter("P_IN_NUMBER", org.jooq.impl.SQLDataType.NUMERIC, true);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.Parameter<java.math.BigDecimal> P_OUT_NUMBER = createParameter("P_OUT_NUMBER", org.jooq.impl.SQLDataType.NUMERIC);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.Parameter<java.lang.String> P_IN_VARCHAR = createParameter("P_IN_VARCHAR", org.jooq.impl.SQLDataType.VARCHAR, true);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.Parameter<java.lang.String> P_OUT_VARCHAR = createParameter("P_OUT_VARCHAR", org.jooq.impl.SQLDataType.VARCHAR);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.Parameter<java.sql.Date> P_IN_DATE = createParameter("P_IN_DATE", org.jooq.impl.SQLDataType.DATE, true);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public static final org.jooq.Parameter<java.sql.Date> P_OUT_DATE = createParameter("P_OUT_DATE", org.jooq.impl.SQLDataType.DATE);
|
||||
|
||||
/**
|
||||
* Create a new routine call instance
|
||||
*/
|
||||
public P_DEFAULT() {
|
||||
super("P_DEFAULT", org.jooq.test.oracle3.generatedclasses.TEST.TEST);
|
||||
|
||||
addInParameter(P_IN_NUMBER);
|
||||
addOutParameter(P_OUT_NUMBER);
|
||||
addInParameter(P_IN_VARCHAR);
|
||||
addOutParameter(P_OUT_VARCHAR);
|
||||
addInParameter(P_IN_DATE);
|
||||
addOutParameter(P_OUT_DATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>P_IN_NUMBER</code> parameter to the routine
|
||||
*/
|
||||
public void setP_IN_NUMBER(java.lang.Number value) {
|
||||
setNumber(P_IN_NUMBER, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>P_IN_VARCHAR</code> parameter to the routine
|
||||
*/
|
||||
public void setP_IN_VARCHAR(java.lang.String value) {
|
||||
setValue(P_IN_VARCHAR, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the <code>P_IN_DATE</code> parameter to the routine
|
||||
*/
|
||||
public void setP_IN_DATE(java.sql.Date value) {
|
||||
setValue(P_IN_DATE, value);
|
||||
}
|
||||
|
||||
public java.math.BigDecimal getP_OUT_NUMBER() {
|
||||
return getValue(P_OUT_NUMBER);
|
||||
}
|
||||
|
||||
public java.lang.String getP_OUT_VARCHAR() {
|
||||
return getValue(P_OUT_VARCHAR);
|
||||
}
|
||||
|
||||
public java.sql.Date getP_OUT_DATE() {
|
||||
return getValue(P_OUT_DATE);
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,7 @@ package org.jooq.test.oracle3.generatedclasses.tables;
|
||||
*/
|
||||
public class T_DATES extends org.jooq.impl.UpdatableTableImpl<org.jooq.Record> implements java.lang.Cloneable {
|
||||
|
||||
private static final long serialVersionUID = -748268541;
|
||||
private static final long serialVersionUID = -1199417431;
|
||||
|
||||
/**
|
||||
* The singleton instance of TEST.T_DATES
|
||||
@ -60,6 +60,16 @@ public class T_DATES extends org.jooq.impl.UpdatableTableImpl<org.jooq.Record> i
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.Record, java.lang.Long> TS_BIGINT = createField("TS_BIGINT", org.jooq.impl.SQLDataType.BIGINT, this);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.Record, 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.Record, org.jooq.types.DayToSecond> I_D = createField("I_D", org.jooq.impl.SQLDataType.INTERVALDAYTOSECOND, this);
|
||||
|
||||
/**
|
||||
* No further instances allowed
|
||||
*/
|
||||
|
||||
@ -8,7 +8,7 @@ package org.jooq.test.oracle3.generatedclasses.tables;
|
||||
*/
|
||||
public class T_DIRECTORY extends org.jooq.impl.UpdatableTableImpl<org.jooq.Record> implements java.lang.Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1865260204;
|
||||
private static final long serialVersionUID = -285258429;
|
||||
|
||||
/**
|
||||
* The singleton instance of TEST.T_DIRECTORY
|
||||
@ -49,7 +49,7 @@ public class T_DIRECTORY extends org.jooq.impl.UpdatableTableImpl<org.jooq.Recor
|
||||
/**
|
||||
* An uncommented item
|
||||
*/
|
||||
public final org.jooq.TableField<org.jooq.Record, java.lang.Byte> IS_DIRECTORY = createField("IS_DIRECTORY", org.jooq.impl.SQLDataType.TINYINT, this);
|
||||
public final org.jooq.TableField<org.jooq.Record, java.lang.Integer> IS_DIRECTORY = createField("IS_DIRECTORY", org.jooq.impl.SQLDataType.INTEGER, this);
|
||||
|
||||
/**
|
||||
* An uncommented item
|
||||
|
||||
@ -10,14 +10,16 @@ package org.jooq.test.oracle3.generatedclasses.tables.pojos;
|
||||
@javax.persistence.Table(name = "T_DATES", schema = "TEST")
|
||||
public class T_DATES_POJO extends java.lang.ThreadDeath implements java.lang.Cloneable {
|
||||
|
||||
private static final long serialVersionUID = 1137165902;
|
||||
private static final long serialVersionUID = 1304078440;
|
||||
|
||||
private java.lang.Integer ID;
|
||||
private java.sql.Date D;
|
||||
private java.sql.Timestamp T;
|
||||
private java.sql.Timestamp TS;
|
||||
private java.lang.Integer D_INT;
|
||||
private java.lang.Long TS_BIGINT;
|
||||
private java.lang.Integer ID;
|
||||
private java.sql.Date D;
|
||||
private java.sql.Timestamp T;
|
||||
private java.sql.Timestamp TS;
|
||||
private java.lang.Integer D_INT;
|
||||
private java.lang.Long TS_BIGINT;
|
||||
private org.jooq.types.YearToMonth I_Y;
|
||||
private org.jooq.types.DayToSecond I_D;
|
||||
|
||||
@javax.persistence.Id
|
||||
@javax.persistence.Column(name = "ID", unique = true, nullable = false, precision = 7)
|
||||
@ -73,4 +75,22 @@ public class T_DATES_POJO extends java.lang.ThreadDeath implements java.lang.Clo
|
||||
public void setTS_BIGINT(java.lang.Long TS_BIGINT) {
|
||||
this.TS_BIGINT = TS_BIGINT;
|
||||
}
|
||||
|
||||
@javax.persistence.Column(name = "I_Y", precision = 2)
|
||||
public org.jooq.types.YearToMonth getI_Y() {
|
||||
return this.I_Y;
|
||||
}
|
||||
|
||||
public void setI_Y(org.jooq.types.YearToMonth I_Y) {
|
||||
this.I_Y = I_Y;
|
||||
}
|
||||
|
||||
@javax.persistence.Column(name = "I_D", precision = 2, scale = 6)
|
||||
public org.jooq.types.DayToSecond getI_D() {
|
||||
return this.I_D;
|
||||
}
|
||||
|
||||
public void setI_D(org.jooq.types.DayToSecond I_D) {
|
||||
this.I_D = I_D;
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,11 +10,11 @@ package org.jooq.test.oracle3.generatedclasses.tables.pojos;
|
||||
@javax.persistence.Table(name = "T_DIRECTORY", schema = "TEST")
|
||||
public class T_DIRECTORY_POJO extends java.lang.ThreadDeath implements java.lang.Cloneable {
|
||||
|
||||
private static final long serialVersionUID = -1620930239;
|
||||
private static final long serialVersionUID = -415288281;
|
||||
|
||||
private java.lang.Integer ID;
|
||||
private java.lang.Integer PARENT_ID;
|
||||
private java.lang.Byte IS_DIRECTORY;
|
||||
private java.lang.Integer IS_DIRECTORY;
|
||||
private java.lang.String name;
|
||||
|
||||
@javax.persistence.Id
|
||||
@ -36,12 +36,12 @@ public class T_DIRECTORY_POJO extends java.lang.ThreadDeath implements java.lang
|
||||
this.PARENT_ID = PARENT_ID;
|
||||
}
|
||||
|
||||
@javax.persistence.Column(name = "IS_DIRECTORY", precision = 1)
|
||||
public java.lang.Byte getIS_DIRECTORY() {
|
||||
@javax.persistence.Column(name = "IS_DIRECTORY", precision = 7)
|
||||
public java.lang.Integer getIS_DIRECTORY() {
|
||||
return this.IS_DIRECTORY;
|
||||
}
|
||||
|
||||
public void setIS_DIRECTORY(java.lang.Byte IS_DIRECTORY) {
|
||||
public void setIS_DIRECTORY(java.lang.Integer IS_DIRECTORY) {
|
||||
this.IS_DIRECTORY = IS_DIRECTORY;
|
||||
}
|
||||
|
||||
|
||||
@ -151,8 +151,8 @@ implements
|
||||
.bind((QueryPart) getFrom())
|
||||
.declareTables(false)
|
||||
.bind(getWhere())
|
||||
.bind(getConnectBy())
|
||||
.bind(getConnectByStartWith())
|
||||
.bind(getConnectBy())
|
||||
.bind((QueryPart) getGroupBy())
|
||||
.bind(getHaving())
|
||||
.bind((QueryPart) getOrderBy());
|
||||
@ -503,20 +503,12 @@ implements
|
||||
// CONNECT BY clause
|
||||
// -----------------
|
||||
if (!(getConnectBy().getWhere() instanceof TrueCondition)) {
|
||||
context.formatSeparator()
|
||||
.keyword("connect by");
|
||||
|
||||
if (connectByNoCycle) {
|
||||
context.keyword(" nocycle");
|
||||
}
|
||||
|
||||
context.sql(" ").sql(getConnectBy());
|
||||
|
||||
if (!(getConnectByStartWith().getWhere() instanceof TrueCondition)) {
|
||||
context.formatSeparator()
|
||||
.keyword("start with ")
|
||||
.sql(getConnectByStartWith());
|
||||
}
|
||||
// CUBRID supports this clause only as [ START WITH .. ] CONNECT BY
|
||||
// Oracle also knows the CONNECT BY .. [ START WITH ] alternative
|
||||
// syntax
|
||||
toSQLStartWith(context);
|
||||
toSQLConnectBy(context);
|
||||
}
|
||||
|
||||
// GROUP BY and HAVING clause
|
||||
@ -542,6 +534,25 @@ implements
|
||||
}
|
||||
}
|
||||
|
||||
private void toSQLStartWith(RenderContext context) {
|
||||
if (!(getConnectByStartWith().getWhere() instanceof TrueCondition)) {
|
||||
context.formatSeparator()
|
||||
.keyword("start with ")
|
||||
.sql(getConnectByStartWith());
|
||||
}
|
||||
}
|
||||
|
||||
private void toSQLConnectBy(RenderContext context) {
|
||||
context.formatSeparator()
|
||||
.keyword("connect by");
|
||||
|
||||
if (connectByNoCycle) {
|
||||
context.keyword(" nocycle");
|
||||
}
|
||||
|
||||
context.sql(" ").sql(getConnectBy());
|
||||
}
|
||||
|
||||
// @Mixin - Declaration in SelectQuery
|
||||
public final void addSelect(Collection<? extends Field<?>> fields) {
|
||||
getSelect0().addAll(fields);
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
package org.jooq.impl;
|
||||
|
||||
import static org.jooq.SQLDialect.ASE;
|
||||
import static org.jooq.SQLDialect.CUBRID;
|
||||
import static org.jooq.SQLDialect.DB2;
|
||||
import static org.jooq.SQLDialect.DERBY;
|
||||
import static org.jooq.SQLDialect.H2;
|
||||
@ -3645,6 +3646,57 @@ public class Factory implements FactoryOperations {
|
||||
return new Radians(nullSafe(field));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Pseudo-fields and functions for use in the context of a CONNECT BY clause
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific <code>LEVEL</code> pseudo-field (to be used
|
||||
* along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
@Support({ CUBRID, ORACLE })
|
||||
public static Field<Integer> level() {
|
||||
return field("level", Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific <code>CONNECT_BY_ISCYCLE</code> pseudo-field
|
||||
* (to be used along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
@Support({ CUBRID, ORACLE })
|
||||
public static Field<Boolean> connectByIsCycle() {
|
||||
return field("connect_by_iscycle", Boolean.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific <code>CONNECT_BY_ISLEAF</code> pseudo-field
|
||||
* (to be used along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
@Support({ CUBRID, ORACLE })
|
||||
public static Field<Boolean> connectByIsLeaf() {
|
||||
return field("connect_by_isleaf", Boolean.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific
|
||||
* <code>SYS_CONNECT_BY_PATH(field, separator)</code> function (to be used
|
||||
* along with <code>CONNECT BY</code> clauses).
|
||||
*/
|
||||
@Support({ CUBRID, ORACLE })
|
||||
public static Field<String> sysConnectByPath(Field<?> field, String separator) {
|
||||
String escaped = "'" + separator.replace("'", "''") + "'";
|
||||
return function("sys_connect_by_path", String.class, field, literal(escaped));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Oracle-specific <code>PRIOR</code> unary operator before a field
|
||||
* (to be used along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
@Support({ CUBRID, ORACLE })
|
||||
public static <T> Field<T> prior(Field<T> field) {
|
||||
return new Prior<T>(field);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// XXX Aggregate functions
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
69
jOOQ/src/main/java/org/jooq/impl/Prior.java
Normal file
69
jOOQ/src/main/java/org/jooq/impl/Prior.java
Normal file
@ -0,0 +1,69 @@
|
||||
/**
|
||||
* Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
|
||||
* All rights reserved.
|
||||
*
|
||||
* This software is licensed to you under the Apache License, Version 2.0
|
||||
* (the "License"); You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* . Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* . Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* . Neither the name "jOOQ" nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import org.jooq.BindContext;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.RenderContext;
|
||||
|
||||
/**
|
||||
* @author Lukas Eder
|
||||
*/
|
||||
class Prior<T> extends CustomField<T> {
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -530284767039331529L;
|
||||
|
||||
private final Field<T> field;
|
||||
|
||||
Prior(Field<T> field) {
|
||||
super("prior", field.getDataType());
|
||||
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void toSQL(RenderContext context) {
|
||||
context.keyword("prior ").sql(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void bind(BindContext context) {
|
||||
context.bind(field);
|
||||
}
|
||||
}
|
||||
@ -37,13 +37,10 @@ package org.jooq.util.oracle;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
import org.jooq.BindContext;
|
||||
import org.jooq.Field;
|
||||
import org.jooq.RenderContext;
|
||||
import org.jooq.SQLDialect;
|
||||
import org.jooq.SchemaMapping;
|
||||
import org.jooq.conf.Settings;
|
||||
import org.jooq.impl.CustomField;
|
||||
import org.jooq.impl.Factory;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
|
||||
@ -132,76 +129,4 @@ public class OracleFactory extends Factory {
|
||||
public static Field<String> sysContext(String namespace, String parameter, int length) {
|
||||
return function("sys_context", SQLDataType.VARCHAR, val(namespace), val(parameter), val(length));
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Pseudo-and functions for use in the context of a CONNECT BY clause
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific <code>LEVEL</code> pseudo-field (to be used
|
||||
* along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
public static Field<Integer> level() {
|
||||
return field("level", Integer.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific <code>CONNECT_BY_ISCYCLE</code> pseudo-field
|
||||
* (to be used along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
public static Field<Boolean> connectByIsCycle() {
|
||||
return field("connect_by_iscycle", Boolean.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific <code>CONNECT_BY_ISLEAF</code> pseudo-field
|
||||
* (to be used along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
public static Field<Boolean> connectByIsLeaf() {
|
||||
return field("connect_by_isleaf", Boolean.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the Oracle-specific
|
||||
* <code>SYS_CONNECT_BY_PATH(field, separator)</code> function (to be used
|
||||
* along with <code>CONNECT BY</code> clauses).
|
||||
*/
|
||||
public static Field<String> sysConnectByPath(Field<?> field, String separator) {
|
||||
String escaped = "'" + separator.replace("'", "''") + "'";
|
||||
return function("sys_connect_by_path", String.class, field, literal(escaped));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Oracle-specific <code>PRIOR</code> unary operator before a field
|
||||
* (to be used along with <code>CONNECT BY</code> clauses)
|
||||
*/
|
||||
public static <T> Field<T> prior(Field<T> field) {
|
||||
return new Prior<T>(field);
|
||||
}
|
||||
|
||||
private static class Prior<T> extends CustomField<T> {
|
||||
|
||||
/**
|
||||
* Generated UID
|
||||
*/
|
||||
private static final long serialVersionUID = -530284767039331529L;
|
||||
|
||||
private final Field<T> field;
|
||||
|
||||
Prior(Field<T> field) {
|
||||
super("prior", field.getDataType());
|
||||
|
||||
this.field = field;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void toSQL(RenderContext context) {
|
||||
context.keyword("prior ").sql(field);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void bind(BindContext context) {
|
||||
context.bind(field);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user