From 8a60d7ee0f20e6da09664cd8b592d26ea078b9ce Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Sun, 20 Nov 2011 18:34:49 +0000 Subject: [PATCH] [#519] Add support for MySQL UNSIGNED numeric types --- .../jooq/util/mysql/MySQLTableDefinition.java | 39 +-- .../org/jooq/examples/mysql/sakila/Keys.java | 24 +- .../examples/mysql/sakila/tables/Actor.java | 6 +- .../mysql/sakila/tables/ActorInfo.java | 4 +- .../examples/mysql/sakila/tables/Address.java | 8 +- .../mysql/sakila/tables/Category.java | 6 +- .../examples/mysql/sakila/tables/City.java | 8 +- .../examples/mysql/sakila/tables/Country.java | 6 +- .../mysql/sakila/tables/Customer.java | 10 +- .../mysql/sakila/tables/CustomerList.java | 6 +- .../examples/mysql/sakila/tables/Film.java | 14 +- .../mysql/sakila/tables/FilmActor.java | 6 +- .../mysql/sakila/tables/FilmCategory.java | 6 +- .../mysql/sakila/tables/FilmList.java | 6 +- .../mysql/sakila/tables/Inventory.java | 10 +- .../mysql/sakila/tables/Language.java | 6 +- .../sakila/tables/NicerButSlowerFilmList.java | 6 +- .../examples/mysql/sakila/tables/Payment.java | 10 +- .../examples/mysql/sakila/tables/Rental.java | 8 +- .../examples/mysql/sakila/tables/Staff.java | 10 +- .../mysql/sakila/tables/StaffList.java | 6 +- .../examples/mysql/sakila/tables/Store.java | 10 +- .../tables/records/ActorInfoRecord.java | 6 +- .../sakila/tables/records/ActorRecord.java | 6 +- .../sakila/tables/records/AddressRecord.java | 10 +- .../sakila/tables/records/CategoryRecord.java | 6 +- .../sakila/tables/records/CityRecord.java | 10 +- .../sakila/tables/records/CountryRecord.java | 6 +- .../tables/records/CustomerListRecord.java | 10 +- .../sakila/tables/records/CustomerRecord.java | 14 +- .../tables/records/FilmActorRecord.java | 10 +- .../tables/records/FilmCategoryRecord.java | 10 +- .../sakila/tables/records/FilmListRecord.java | 10 +- .../sakila/tables/records/FilmRecord.java | 22 +- .../tables/records/InventoryRecord.java | 14 +- .../sakila/tables/records/LanguageRecord.java | 6 +- .../records/NicerButSlowerFilmListRecord.java | 10 +- .../sakila/tables/records/PaymentRecord.java | 14 +- .../sakila/tables/records/RentalRecord.java | 14 +- .../tables/records/StaffListRecord.java | 10 +- .../sakila/tables/records/StaffRecord.java | 14 +- .../sakila/tables/records/StoreRecord.java | 14 +- .../launch/GenerationTool DB2 test.launch | 1 + .../launch/GenerationTool Derby test.launch | 1 + .../launch/GenerationTool H2 test.launch | 1 + .../launch/GenerationTool HSQLDB test.launch | 1 + .../launch/GenerationTool Ingres test.launch | 1 + .../launch/GenerationTool MySQL sakila.launch | 1 + .../launch/GenerationTool MySQL test.launch | 1 + .../GenerationTool Oracle sys-test.launch | 1 + .../launch/GenerationTool Oracle test.launch | 1 + .../GenerationTool Postgres test.launch | 1 + .../GenerationTool SQLServer test.launch | 1 + .../launch/GenerationTool SQLite test.launch | 1 + .../GenerationTool Sybase ASE test.launch | 1 + .../launch/GenerationTool Sybase test.launch | 1 + .../launch/Meta-Generate DB2 syscat.launch | 1 + .../launch/Meta-Generate Derby sys.launch | 1 + ...Meta-Generate H2 information_schema.launch | 1 + ...-Generate HSQLDB information_schema.launch | 1 + .../Meta-Generate Ingres $ingres.launch | 1 + ...a-Generate MySQL information_schema.launch | 1 + .../launch/Meta-Generate MySQL mysql.launch | 1 + .../launch/Meta-Generate Oracle sys.launch | 1 + ...enerate Postgres information_schema.launch | 1 + .../Meta-Generate Postgres pg_catalog.launch | 1 + ...nerate SQLServer information_schema.launch | 1 + .../Meta-Generate Sybase ASE sys.launch | 1 + .../launch/Meta-Generate Sybase sys.launch | 1 + jOOQ-test/src/org/jooq/test/jOOQASETest.java | 31 +++ .../src/org/jooq/test/jOOQAbstractTest.java | 224 ++++++++++++++++++ jOOQ-test/src/org/jooq/test/jOOQDB2Test.java | 31 +++ .../src/org/jooq/test/jOOQDerbyTest.java | 31 +++ jOOQ-test/src/org/jooq/test/jOOQH2Test.java | 31 +++ .../src/org/jooq/test/jOOQHSQLDBTest.java | 31 +++ .../src/org/jooq/test/jOOQHSQLDBTest2.java | 32 +++ .../src/org/jooq/test/jOOQIngresTest.java | 31 +++ .../src/org/jooq/test/jOOQMySQLTest.java | 33 +++ .../src/org/jooq/test/jOOQOracleTest.java | 31 +++ .../src/org/jooq/test/jOOQPostgresTest.java | 31 +++ .../src/org/jooq/test/jOOQSQLServerTest.java | 31 +++ .../src/org/jooq/test/jOOQSQLiteTest.java | 31 +++ .../src/org/jooq/test/jOOQSybaseTest.java | 31 +++ jOOQ-test/src/org/jooq/test/mysql/create.sql | 9 + .../test/mysql/generatedclasses/Tables.java | 5 + .../test/mysql/generatedclasses/Test.java | 3 +- .../generatedclasses/tables/TUnsigned.java | 59 +++++ .../tables/records/TUnsignedRecord.java | 77 ++++++ jOOQ-test/src/org/jooq/test/mysql/reset.sql | 3 +- jOOQ/pom.xml | 7 + .../org/jooq/impl/DefaultBindContext.java | 5 + .../java/org/jooq/impl/FieldTypeHelper.java | 72 ++++++ .../main/java/org/jooq/impl/SQLDataType.java | 29 +++ .../main/java/org/jooq/impl/TypeUtils.java | 31 +++ .../org/jooq/util/mysql/MySQLDataType.java | 11 + 95 files changed, 1186 insertions(+), 213 deletions(-) create mode 100644 jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TUnsigned.java create mode 100644 jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TUnsignedRecord.java diff --git a/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLTableDefinition.java b/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLTableDefinition.java index 4177e4f03d..236eaad990 100644 --- a/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLTableDefinition.java +++ b/jOOQ-meta/src/main/java/org/jooq/util/mysql/MySQLTableDefinition.java @@ -36,6 +36,7 @@ package org.jooq.util.mysql; +import static java.util.Arrays.asList; import static org.jooq.util.mysql.information_schema.tables.Columns.COLUMNS; import static org.jooq.util.mysql.information_schema.tables.Columns.ORDINAL_POSITION; import static org.jooq.util.mysql.information_schema.tables.Columns.TABLE_NAME; @@ -68,21 +69,31 @@ public class MySQLTableDefinition extends AbstractTableDefinition { List result = new ArrayList(); for (Record record : create().select( - Columns.COLUMN_NAME, - Columns.ORDINAL_POSITION, - Columns.DATA_TYPE, - Columns.NUMERIC_PRECISION, - Columns.NUMERIC_SCALE, - Columns.COLUMN_COMMENT, - Columns.EXTRA) - .from(COLUMNS) - .where(TABLE_SCHEMA.equal(getSchemaName())) - .and(TABLE_NAME.equal(getName())) - .orderBy(ORDINAL_POSITION) - .fetch()) { + Columns.ORDINAL_POSITION, + Columns.COLUMN_NAME, + Columns.COLUMN_COMMENT, + Columns.COLUMN_TYPE, + Columns.DATA_TYPE, + Columns.NUMERIC_PRECISION, + Columns.NUMERIC_SCALE, + Columns.EXTRA) + .from(COLUMNS) + .where(TABLE_SCHEMA.equal(getSchemaName())) + .and(TABLE_NAME.equal(getName())) + .orderBy(ORDINAL_POSITION) + .fetch()) { - DataTypeDefinition type = new DefaultDataTypeDefinition(getDatabase(), - record.getValue(Columns.DATA_TYPE), + String dataType = record.getValue(Columns.DATA_TYPE); + + // [#519] Some types have unsigned versions + if (asList("tinyint", "smallint", "mediumint", "int", "bigint").contains(dataType.toLowerCase())) { + if (record.getValue(Columns.COLUMN_TYPE).toLowerCase().contains("unsigned")) { + dataType += "unsigned"; + } + } + + DataTypeDefinition type = new DefaultDataTypeDefinition(getDatabase(), + dataType, record.getValue(Columns.NUMERIC_PRECISION), record.getValue(Columns.NUMERIC_SCALE), getName() + "_" + record.getValue(Columns.COLUMN_NAME)); diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/Keys.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/Keys.java index 57c242072e..8b879bc1e6 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/Keys.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/Keys.java @@ -14,19 +14,19 @@ package org.jooq.examples.mysql.sakila; public class Keys extends org.jooq.impl.AbstractKeys { // IDENTITY definitions - public static final org.jooq.Identity IDENTITY_actor = createIdentity(org.jooq.examples.mysql.sakila.tables.Actor.ACTOR, org.jooq.examples.mysql.sakila.tables.Actor.ACTOR.ACTOR_ID); - public static final org.jooq.Identity IDENTITY_address = createIdentity(org.jooq.examples.mysql.sakila.tables.Address.ADDRESS, org.jooq.examples.mysql.sakila.tables.Address.ADDRESS.ADDRESS_ID); - public static final org.jooq.Identity IDENTITY_category = createIdentity(org.jooq.examples.mysql.sakila.tables.Category.CATEGORY, org.jooq.examples.mysql.sakila.tables.Category.CATEGORY.CATEGORY_ID); - public static final org.jooq.Identity IDENTITY_city = createIdentity(org.jooq.examples.mysql.sakila.tables.City.CITY, org.jooq.examples.mysql.sakila.tables.City.CITY.CITY_ID); - public static final org.jooq.Identity IDENTITY_country = createIdentity(org.jooq.examples.mysql.sakila.tables.Country.COUNTRY, org.jooq.examples.mysql.sakila.tables.Country.COUNTRY.COUNTRY_ID); - public static final org.jooq.Identity IDENTITY_customer = createIdentity(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER, org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.CUSTOMER_ID); - public static final org.jooq.Identity IDENTITY_film = createIdentity(org.jooq.examples.mysql.sakila.tables.Film.FILM, org.jooq.examples.mysql.sakila.tables.Film.FILM.FILM_ID); - public static final org.jooq.Identity IDENTITY_inventory = createIdentity(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY, org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.INVENTORY_ID); - public static final org.jooq.Identity IDENTITY_language = createIdentity(org.jooq.examples.mysql.sakila.tables.Language.LANGUAGE, org.jooq.examples.mysql.sakila.tables.Language.LANGUAGE.LANGUAGE_ID); - public static final org.jooq.Identity IDENTITY_payment = createIdentity(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT, org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.PAYMENT_ID); + public static final org.jooq.Identity IDENTITY_actor = createIdentity(org.jooq.examples.mysql.sakila.tables.Actor.ACTOR, org.jooq.examples.mysql.sakila.tables.Actor.ACTOR.ACTOR_ID); + public static final org.jooq.Identity IDENTITY_address = createIdentity(org.jooq.examples.mysql.sakila.tables.Address.ADDRESS, org.jooq.examples.mysql.sakila.tables.Address.ADDRESS.ADDRESS_ID); + public static final org.jooq.Identity IDENTITY_category = createIdentity(org.jooq.examples.mysql.sakila.tables.Category.CATEGORY, org.jooq.examples.mysql.sakila.tables.Category.CATEGORY.CATEGORY_ID); + public static final org.jooq.Identity IDENTITY_city = createIdentity(org.jooq.examples.mysql.sakila.tables.City.CITY, org.jooq.examples.mysql.sakila.tables.City.CITY.CITY_ID); + public static final org.jooq.Identity IDENTITY_country = createIdentity(org.jooq.examples.mysql.sakila.tables.Country.COUNTRY, org.jooq.examples.mysql.sakila.tables.Country.COUNTRY.COUNTRY_ID); + public static final org.jooq.Identity IDENTITY_customer = createIdentity(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER, org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.CUSTOMER_ID); + public static final org.jooq.Identity IDENTITY_film = createIdentity(org.jooq.examples.mysql.sakila.tables.Film.FILM, org.jooq.examples.mysql.sakila.tables.Film.FILM.FILM_ID); + public static final org.jooq.Identity IDENTITY_inventory = createIdentity(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY, org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.INVENTORY_ID); + public static final org.jooq.Identity IDENTITY_language = createIdentity(org.jooq.examples.mysql.sakila.tables.Language.LANGUAGE, org.jooq.examples.mysql.sakila.tables.Language.LANGUAGE.LANGUAGE_ID); + public static final org.jooq.Identity IDENTITY_payment = createIdentity(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT, org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.PAYMENT_ID); public static final org.jooq.Identity IDENTITY_rental = createIdentity(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL, org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.RENTAL_ID); - public static final org.jooq.Identity IDENTITY_staff = createIdentity(org.jooq.examples.mysql.sakila.tables.Staff.STAFF, org.jooq.examples.mysql.sakila.tables.Staff.STAFF.STAFF_ID); - public static final org.jooq.Identity IDENTITY_store = createIdentity(org.jooq.examples.mysql.sakila.tables.Store.STORE, org.jooq.examples.mysql.sakila.tables.Store.STORE.STORE_ID); + public static final org.jooq.Identity IDENTITY_staff = createIdentity(org.jooq.examples.mysql.sakila.tables.Staff.STAFF, org.jooq.examples.mysql.sakila.tables.Staff.STAFF.STAFF_ID); + public static final org.jooq.Identity IDENTITY_store = createIdentity(org.jooq.examples.mysql.sakila.tables.Store.STORE, org.jooq.examples.mysql.sakila.tables.Store.STORE.STORE_ID); // UNIQUE and PRIMARY KEY definitions public static final org.jooq.UniqueKey KEY_actor_PRIMARY = createUniqueKey(org.jooq.examples.mysql.sakila.tables.Actor.ACTOR, org.jooq.examples.mysql.sakila.tables.Actor.ACTOR.ACTOR_ID); diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Actor.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Actor.java index f79c570b77..07102f34de 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Actor.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Actor.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Actor extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 2087895104; + private static final long serialVersionUID = 1343164635; /** * The singleton instance of actor @@ -35,7 +35,7 @@ public class Actor extends org.jooq.impl.UpdatableTableImpl ACTOR_ID = createField("actor_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ACTOR_ID = createField("actor_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -67,7 +67,7 @@ public class Actor extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_actor; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/ActorInfo.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/ActorInfo.java index 8ceb0b3524..3a607a1069 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/ActorInfo.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/ActorInfo.java @@ -12,7 +12,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class ActorInfo extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = -2132230826; + private static final long serialVersionUID = 691176627; /** * The singleton instance of actor_info @@ -35,7 +35,7 @@ public class ActorInfo extends org.jooq.impl.TableImpl ACTOR_ID = createField("actor_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ACTOR_ID = createField("actor_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Address.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Address.java index 4fb4c105ea..19d931d304 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Address.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Address.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Address extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -255466610; + private static final long serialVersionUID = 1606371632; /** * The singleton instance of address @@ -35,7 +35,7 @@ public class Address extends org.jooq.impl.UpdatableTableImpl ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -60,7 +60,7 @@ public class Address extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField CITY_ID = createField("city_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField CITY_ID = createField("city_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -92,7 +92,7 @@ public class Address extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_address; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Category.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Category.java index e198506132..8c445212fb 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Category.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Category.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Category extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 120998556; + private static final long serialVersionUID = 1249737415; /** * The singleton instance of category @@ -35,7 +35,7 @@ public class Category extends org.jooq.impl.UpdatableTableImpl CATEGORY_ID = createField("category_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField CATEGORY_ID = createField("category_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -62,7 +62,7 @@ public class Category extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_category; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/City.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/City.java index 93daf686fc..3b8af5dcdf 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/City.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/City.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class City extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1954219428; + private static final long serialVersionUID = 207274276; /** * The singleton instance of city @@ -35,7 +35,7 @@ public class City extends org.jooq.impl.UpdatableTableImpl CITY_ID = createField("city_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField CITY_ID = createField("city_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -50,7 +50,7 @@ public class City extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField COUNTRY_ID = createField("country_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField COUNTRY_ID = createField("country_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -72,7 +72,7 @@ public class City extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_city; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Country.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Country.java index ed74377d3d..41a39476ae 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Country.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Country.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Country extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1109437430; + private static final long serialVersionUID = -534108443; /** * The singleton instance of country @@ -35,7 +35,7 @@ public class Country extends org.jooq.impl.UpdatableTableImpl COUNTRY_ID = createField("country_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField COUNTRY_ID = createField("country_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -62,7 +62,7 @@ public class Country extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_country; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Customer.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Customer.java index 61e779659a..7c3a3097e3 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Customer.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Customer.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Customer extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -550266799; + private static final long serialVersionUID = -309331968; /** * The singleton instance of customer @@ -35,7 +35,7 @@ public class Customer extends org.jooq.impl.UpdatableTableImpl CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -45,7 +45,7 @@ public class Customer extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -70,7 +70,7 @@ public class Customer extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -102,7 +102,7 @@ public class Customer extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_customer; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/CustomerList.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/CustomerList.java index 3499a16054..86a0116f3d 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/CustomerList.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/CustomerList.java @@ -12,7 +12,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class CustomerList extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = 1498293572; + private static final long serialVersionUID = 429183358; /** * The singleton instance of customer_list @@ -35,7 +35,7 @@ public class CustomerList extends org.jooq.impl.TableImpl ID = createField("ID", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -75,7 +75,7 @@ public class CustomerList extends org.jooq.impl.TableImpl SID = createField("SID", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField SID = createField("SID", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * No further instances allowed diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Film.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Film.java index 90466505f8..c8c9bdd4a8 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Film.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Film.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Film extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = 985926173; + private static final long serialVersionUID = 272508668; /** * The singleton instance of film @@ -35,7 +35,7 @@ public class Film extends org.jooq.impl.UpdatableTableImpl FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -60,7 +60,7 @@ public class Film extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -70,12 +70,12 @@ public class Film extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField ORIGINAL_LANGUAGE_ID = createField("original_language_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField ORIGINAL_LANGUAGE_ID = createField("original_language_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item */ - public final org.jooq.TableField RENTAL_DURATION = createField("rental_duration", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField RENTAL_DURATION = createField("rental_duration", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -85,7 +85,7 @@ public class Film extends org.jooq.impl.UpdatableTableImpl LENGTH = createField("length", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField LENGTH = createField("length", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -122,7 +122,7 @@ public class Film extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_film; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmActor.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmActor.java index 0d4df5ec90..e0b8a6920d 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmActor.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmActor.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class FilmActor extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1205143384; + private static final long serialVersionUID = -249053534; /** * The singleton instance of film_actor @@ -40,7 +40,7 @@ public class FilmActor extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField ACTOR_ID = createField("actor_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ACTOR_ID = createField("actor_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -52,7 +52,7 @@ public class FilmActor extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmCategory.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmCategory.java index 296718fede..1e9c7a4323 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmCategory.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmCategory.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class FilmCategory extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1737940182; + private static final long serialVersionUID = 2008435492; /** * The singleton instance of film_category @@ -40,7 +40,7 @@ public class FilmCategory extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -52,7 +52,7 @@ public class FilmCategory extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField CATEGORY_ID = createField("category_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField CATEGORY_ID = createField("category_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmList.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmList.java index 8034735aab..1cf38285b8 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmList.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/FilmList.java @@ -12,7 +12,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class FilmList extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = 986457410; + private static final long serialVersionUID = 961495458; /** * The singleton instance of film_list @@ -35,7 +35,7 @@ public class FilmList extends org.jooq.impl.TableImpl FID = createField("FID", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField FID = createField("FID", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -60,7 +60,7 @@ public class FilmList extends org.jooq.impl.TableImpl LENGTH = createField("length", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField LENGTH = createField("length", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Inventory.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Inventory.java index ee7452682d..d7a7cee0f3 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Inventory.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Inventory.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Inventory extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -712099866; + private static final long serialVersionUID = 663073685; /** * The singleton instance of inventory @@ -35,7 +35,7 @@ public class Inventory extends org.jooq.impl.UpdatableTableImpl INVENTORY_ID = createField("inventory_id", org.jooq.impl.SQLDataType.INTEGER, this); + public final org.jooq.TableField INVENTORY_ID = createField("inventory_id", org.jooq.impl.SQLDataType.INTEGERUNSIGNED, this); /** * An uncommented item @@ -45,7 +45,7 @@ public class Inventory extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField FILM_ID = createField("film_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -55,7 +55,7 @@ public class Inventory extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -77,7 +77,7 @@ public class Inventory extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_inventory; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Language.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Language.java index d1bee5bf93..24b92e15ee 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Language.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Language.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Language extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -2092586221; + private static final long serialVersionUID = -1183110632; /** * The singleton instance of language @@ -35,7 +35,7 @@ public class Language extends org.jooq.impl.UpdatableTableImpl LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField LANGUAGE_ID = createField("language_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -62,7 +62,7 @@ public class Language extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_language; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/NicerButSlowerFilmList.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/NicerButSlowerFilmList.java index 1d9db0b4db..b9f888cd09 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/NicerButSlowerFilmList.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/NicerButSlowerFilmList.java @@ -12,7 +12,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class NicerButSlowerFilmList extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = 1067032056; + private static final long serialVersionUID = 1028041368; /** * The singleton instance of nicer_but_slower_film_list @@ -35,7 +35,7 @@ public class NicerButSlowerFilmList extends org.jooq.impl.TableImpl FID = createField("FID", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField FID = createField("FID", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -60,7 +60,7 @@ public class NicerButSlowerFilmList extends org.jooq.impl.TableImpl LENGTH = createField("length", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField LENGTH = createField("length", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Payment.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Payment.java index 934dc201c5..f91373d8bb 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Payment.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Payment.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Payment extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1991614603; + private static final long serialVersionUID = -1854634268; /** * The singleton instance of payment @@ -35,7 +35,7 @@ public class Payment extends org.jooq.impl.UpdatableTableImpl PAYMENT_ID = createField("payment_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField PAYMENT_ID = createField("payment_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -45,7 +45,7 @@ public class Payment extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -55,7 +55,7 @@ public class Payment extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -97,7 +97,7 @@ public class Payment extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_payment; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Rental.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Rental.java index c5bdd128fd..1e8232f5e1 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Rental.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Rental.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Rental extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -1744725148; + private static final long serialVersionUID = -1451372373; /** * The singleton instance of rental @@ -50,7 +50,7 @@ public class Rental extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField INVENTORY_ID = createField("inventory_id", org.jooq.impl.SQLDataType.INTEGER, this); + public final org.jooq.TableField INVENTORY_ID = createField("inventory_id", org.jooq.impl.SQLDataType.INTEGERUNSIGNED, this); /** * An uncommented item @@ -60,7 +60,7 @@ public class Rental extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField CUSTOMER_ID = createField("customer_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -75,7 +75,7 @@ public class Rental extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Staff.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Staff.java index dc13fee328..b7d773252d 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Staff.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Staff.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Staff extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -590320201; + private static final long serialVersionUID = 524285340; /** * The singleton instance of staff @@ -35,7 +35,7 @@ public class Staff extends org.jooq.impl.UpdatableTableImpl STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STAFF_ID = createField("staff_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -55,7 +55,7 @@ public class Staff extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -75,7 +75,7 @@ public class Staff extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -112,7 +112,7 @@ public class Staff extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_staff; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/StaffList.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/StaffList.java index 9a258f3804..32334ff6b0 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/StaffList.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/StaffList.java @@ -12,7 +12,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class StaffList extends org.jooq.impl.TableImpl { - private static final long serialVersionUID = -1046507427; + private static final long serialVersionUID = -583692547; /** * The singleton instance of staff_list @@ -35,7 +35,7 @@ public class StaffList extends org.jooq.impl.TableImpl ID = createField("ID", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField ID = createField("ID", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -70,7 +70,7 @@ public class StaffList extends org.jooq.impl.TableImpl SID = createField("SID", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField SID = createField("SID", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * No further instances allowed diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Store.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Store.java index fb60c6d9bf..8c88d29701 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Store.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/Store.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables; comments = "This class is generated by jOOQ") public class Store extends org.jooq.impl.UpdatableTableImpl { - private static final long serialVersionUID = -310711317; + private static final long serialVersionUID = 1113761706; /** * The singleton instance of store @@ -35,7 +35,7 @@ public class Store extends org.jooq.impl.UpdatableTableImpl STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField STORE_ID = createField("store_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -45,7 +45,7 @@ public class Store extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField MANAGER_STAFF_ID = createField("manager_staff_id", org.jooq.impl.SQLDataType.TINYINT, this); + public final org.jooq.TableField MANAGER_STAFF_ID = createField("manager_staff_id", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, this); /** * An uncommented item @@ -55,7 +55,7 @@ public class Store extends org.jooq.impl.UpdatableTableImpl */ - public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINT, this); + public final org.jooq.TableField ADDRESS_ID = createField("address_id", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, this); /** * An uncommented item @@ -77,7 +77,7 @@ public class Store extends org.jooq.impl.UpdatableTableImpl getIdentity() { + public org.jooq.Identity getIdentity() { return org.jooq.examples.mysql.sakila.Keys.IDENTITY_store; } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorInfoRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorInfoRecord.java index 43944231dc..9ab1225f14 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorInfoRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorInfoRecord.java @@ -12,19 +12,19 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class ActorInfoRecord extends org.jooq.impl.TableRecordImpl { - private static final long serialVersionUID = -1698141927; + private static final long serialVersionUID = -1308586471; /** * An uncommented item */ - public void setActorId(java.lang.Short value) { + public void setActorId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.ActorInfo.ACTOR_INFO.ACTOR_ID, value); } /** * An uncommented item */ - public java.lang.Short getActorId() { + public org.joou.UShort getActorId() { return getValue(org.jooq.examples.mysql.sakila.tables.ActorInfo.ACTOR_INFO.ACTOR_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorRecord.java index 2f70a15f9d..cf2dcd7984 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/ActorRecord.java @@ -10,14 +10,14 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class ActorRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -928158217; + private static final long serialVersionUID = -1239063305; /** * An uncommented item * * PRIMARY KEY */ - public void setActorId(java.lang.Short value) { + public void setActorId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Actor.ACTOR.ACTOR_ID, value); } @@ -26,7 +26,7 @@ public class ActorRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -1373317564; + private static final long serialVersionUID = -1241050380; /** * An uncommented item * * PRIMARY KEY */ - public void setAddressId(java.lang.Short value) { + public void setAddressId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Address.ADDRESS.ADDRESS_ID, value); } @@ -26,7 +26,7 @@ public class AddressRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setCityId(java.lang.Short value) { + public void setCityId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Address.ADDRESS.CITY_ID, value); } @@ -128,7 +128,7 @@ public class AddressRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getCityId() { + public org.joou.UShort getCityId() { return getValue(org.jooq.examples.mysql.sakila.tables.Address.ADDRESS.CITY_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CategoryRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CategoryRecord.java index e128439232..2b801b2718 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CategoryRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CategoryRecord.java @@ -10,14 +10,14 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class CategoryRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -1516611703; + private static final long serialVersionUID = -1588275063; /** * An uncommented item * * PRIMARY KEY */ - public void setCategoryId(java.lang.Byte value) { + public void setCategoryId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Category.CATEGORY.CATEGORY_ID, value); } @@ -26,7 +26,7 @@ public class CategoryRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1836286513; + private static final long serialVersionUID = -2063807439; /** * An uncommented item * * PRIMARY KEY */ - public void setCityId(java.lang.Short value) { + public void setCityId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.City.CITY.CITY_ID, value); } @@ -26,7 +26,7 @@ public class CityRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setCountryId(java.lang.Short value) { + public void setCountryId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.City.CITY.COUNTRY_ID, value); } @@ -76,7 +76,7 @@ public class CityRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getCountryId() { + public org.joou.UShort getCountryId() { return getValue(org.jooq.examples.mysql.sakila.tables.City.CITY.COUNTRY_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CountryRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CountryRecord.java index 9aaf5f2be2..91f467ee2c 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CountryRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/CountryRecord.java @@ -10,14 +10,14 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class CountryRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -164764735; + private static final long serialVersionUID = 959338689; /** * An uncommented item * * PRIMARY KEY */ - public void setCountryId(java.lang.Short value) { + public void setCountryId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Country.COUNTRY.COUNTRY_ID, value); } @@ -26,7 +26,7 @@ public class CountryRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -899684075; + private static final long serialVersionUID = -749795051; /** * An uncommented item */ - public void setId(java.lang.Short value) { + public void setId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.CustomerList.CUSTOMER_LIST.ID, value); } /** * An uncommented item */ - public java.lang.Short getId() { + public org.joou.UShort getId() { return getValue(org.jooq.examples.mysql.sakila.tables.CustomerList.CUSTOMER_LIST.ID); } @@ -129,14 +129,14 @@ public class CustomerListRecord extends org.jooq.impl.TableRecordImpl { - private static final long serialVersionUID = 165445135; + private static final long serialVersionUID = 821627151; /** * An uncommented item * * PRIMARY KEY */ - public void setCustomerId(java.lang.Short value) { + public void setCustomerId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.CUSTOMER_ID, value); } @@ -26,7 +26,7 @@ public class CustomerRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setStoreId(java.lang.Byte value) { + public void setStoreId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.STORE_ID, value); } @@ -74,7 +74,7 @@ public class CustomerRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getStoreId() { + public org.joou.UByte getStoreId() { return getValue(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.STORE_ID); } @@ -143,7 +143,7 @@ public class CustomerRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setAddressId(java.lang.Short value) { + public void setAddressId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.ADDRESS_ID, value); } @@ -155,7 +155,7 @@ public class CustomerRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getAddressId() { + public org.joou.UShort getAddressId() { return getValue(org.jooq.examples.mysql.sakila.tables.Customer.CUSTOMER.ADDRESS_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmActorRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmActorRecord.java index 838246a9a4..55f619e3bc 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmActorRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmActorRecord.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class FilmActorRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -283651042; + private static final long serialVersionUID = 1651769550; /** * An uncommented item @@ -22,7 +22,7 @@ public class FilmActorRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setActorId(java.lang.Short value) { + public void setActorId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.FilmActor.FILM_ACTOR.ACTOR_ID, value); } @@ -36,7 +36,7 @@ public class FilmActorRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getActorId() { + public org.joou.UShort getActorId() { return getValue(org.jooq.examples.mysql.sakila.tables.FilmActor.FILM_ACTOR.ACTOR_ID); } @@ -67,7 +67,7 @@ public class FilmActorRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setFilmId(java.lang.Short value) { + public void setFilmId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.FilmActor.FILM_ACTOR.FILM_ID, value); } @@ -81,7 +81,7 @@ public class FilmActorRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getFilmId() { + public org.joou.UShort getFilmId() { return getValue(org.jooq.examples.mysql.sakila.tables.FilmActor.FILM_ACTOR.FILM_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmCategoryRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmCategoryRecord.java index 9567753405..8b483a3c64 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmCategoryRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmCategoryRecord.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class FilmCategoryRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -1764985182; + private static final long serialVersionUID = -645793966; /** * An uncommented item @@ -22,7 +22,7 @@ public class FilmCategoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setFilmId(java.lang.Short value) { + public void setFilmId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.FilmCategory.FILM_CATEGORY.FILM_ID, value); } @@ -36,7 +36,7 @@ public class FilmCategoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getFilmId() { + public org.joou.UShort getFilmId() { return getValue(org.jooq.examples.mysql.sakila.tables.FilmCategory.FILM_CATEGORY.FILM_ID); } @@ -67,7 +67,7 @@ public class FilmCategoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setCategoryId(java.lang.Byte value) { + public void setCategoryId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.FilmCategory.FILM_CATEGORY.CATEGORY_ID, value); } @@ -81,7 +81,7 @@ public class FilmCategoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getCategoryId() { + public org.joou.UByte getCategoryId() { return getValue(org.jooq.examples.mysql.sakila.tables.FilmCategory.FILM_CATEGORY.CATEGORY_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmListRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmListRecord.java index c6ff0d6012..05f0c81845 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmListRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/FilmListRecord.java @@ -12,19 +12,19 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class FilmListRecord extends org.jooq.impl.TableRecordImpl { - private static final long serialVersionUID = 256894785; + private static final long serialVersionUID = 455795345; /** * An uncommented item */ - public void setFid(java.lang.Short value) { + public void setFid(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.FilmList.FILM_LIST.FID, value); } /** * An uncommented item */ - public java.lang.Short getFid() { + public org.joou.UShort getFid() { return getValue(org.jooq.examples.mysql.sakila.tables.FilmList.FILM_LIST.FID); } @@ -87,14 +87,14 @@ public class FilmListRecord extends org.jooq.impl.TableRecordImpl { - private static final long serialVersionUID = 319995380; + private static final long serialVersionUID = 1905486212; /** * An uncommented item * * PRIMARY KEY */ - public void setFilmId(java.lang.Short value) { + public void setFilmId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Film.FILM.FILM_ID, value); } @@ -26,7 +26,7 @@ public class FilmRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setLanguageId(java.lang.Byte value) { + public void setLanguageId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Film.FILM.LANGUAGE_ID, value); } @@ -128,7 +128,7 @@ public class FilmRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getLanguageId() { + public org.joou.UByte getLanguageId() { return getValue(org.jooq.examples.mysql.sakila.tables.Film.FILM.LANGUAGE_ID); } @@ -155,7 +155,7 @@ public class FilmRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setOriginalLanguageId(java.lang.Byte value) { + public void setOriginalLanguageId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Film.FILM.ORIGINAL_LANGUAGE_ID, value); } @@ -167,7 +167,7 @@ public class FilmRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getOriginalLanguageId() { + public org.joou.UByte getOriginalLanguageId() { return getValue(org.jooq.examples.mysql.sakila.tables.Film.FILM.ORIGINAL_LANGUAGE_ID); } @@ -189,14 +189,14 @@ public class FilmRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 255921147; + private static final long serialVersionUID = 1081368315; /** * An uncommented item * * PRIMARY KEY */ - public void setInventoryId(java.lang.Integer value) { + public void setInventoryId(org.joou.UInteger value) { setValue(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.INVENTORY_ID, value); } @@ -26,7 +26,7 @@ public class InventoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setFilmId(java.lang.Short value) { + public void setFilmId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.FILM_ID, value); } @@ -62,7 +62,7 @@ public class InventoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getFilmId() { + public org.joou.UShort getFilmId() { return getValue(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.FILM_ID); } @@ -89,7 +89,7 @@ public class InventoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setStoreId(java.lang.Byte value) { + public void setStoreId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.STORE_ID, value); } @@ -101,7 +101,7 @@ public class InventoryRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getStoreId() { + public org.joou.UByte getStoreId() { return getValue(org.jooq.examples.mysql.sakila.tables.Inventory.INVENTORY.STORE_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/LanguageRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/LanguageRecord.java index bf20e2f390..ff87d3a6cd 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/LanguageRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/LanguageRecord.java @@ -10,14 +10,14 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class LanguageRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1608134600; + private static final long serialVersionUID = 1698869448; /** * An uncommented item * * PRIMARY KEY */ - public void setLanguageId(java.lang.Byte value) { + public void setLanguageId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Language.LANGUAGE.LANGUAGE_ID, value); } @@ -26,7 +26,7 @@ public class LanguageRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 431977896; + private static final long serialVersionUID = -221536520; /** * An uncommented item */ - public void setFid(java.lang.Short value) { + public void setFid(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.NicerButSlowerFilmList.NICER_BUT_SLOWER_FILM_LIST.FID, value); } /** * An uncommented item */ - public java.lang.Short getFid() { + public org.joou.UShort getFid() { return getValue(org.jooq.examples.mysql.sakila.tables.NicerButSlowerFilmList.NICER_BUT_SLOWER_FILM_LIST.FID); } @@ -87,14 +87,14 @@ public class NicerButSlowerFilmListRecord extends org.jooq.impl.TableRecordImpl< /** * An uncommented item */ - public void setLength(java.lang.Short value) { + public void setLength(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.NicerButSlowerFilmList.NICER_BUT_SLOWER_FILM_LIST.LENGTH, value); } /** * An uncommented item */ - public java.lang.Short getLength() { + public org.joou.UShort getLength() { return getValue(org.jooq.examples.mysql.sakila.tables.NicerButSlowerFilmList.NICER_BUT_SLOWER_FILM_LIST.LENGTH); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/PaymentRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/PaymentRecord.java index 8a33d67665..44fc80e385 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/PaymentRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/PaymentRecord.java @@ -10,14 +10,14 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class PaymentRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 815222398; + private static final long serialVersionUID = -1110782082; /** * An uncommented item * * PRIMARY KEY */ - public void setPaymentId(java.lang.Short value) { + public void setPaymentId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.PAYMENT_ID, value); } @@ -26,7 +26,7 @@ public class PaymentRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setCustomerId(java.lang.Short value) { + public void setCustomerId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.CUSTOMER_ID, value); } @@ -50,7 +50,7 @@ public class PaymentRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getCustomerId() { + public org.joou.UShort getCustomerId() { return getValue(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.CUSTOMER_ID); } @@ -77,7 +77,7 @@ public class PaymentRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setStaffId(java.lang.Byte value) { + public void setStaffId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.STAFF_ID, value); } @@ -89,7 +89,7 @@ public class PaymentRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getStaffId() { + public org.joou.UByte getStaffId() { return getValue(org.jooq.examples.mysql.sakila.tables.Payment.PAYMENT.STAFF_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/RentalRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/RentalRecord.java index 9df8042048..f96e532142 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/RentalRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/RentalRecord.java @@ -10,7 +10,7 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = 1079713184; + private static final long serialVersionUID = 2113146352; /** * An uncommented item @@ -64,7 +64,7 @@ public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setInventoryId(java.lang.Integer value) { + public void setInventoryId(org.joou.UInteger value) { setValue(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.INVENTORY_ID, value); } @@ -76,7 +76,7 @@ public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Integer getInventoryId() { + public org.joou.UInteger getInventoryId() { return getValue(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.INVENTORY_ID); } @@ -103,7 +103,7 @@ public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setCustomerId(java.lang.Short value) { + public void setCustomerId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.CUSTOMER_ID, value); } @@ -115,7 +115,7 @@ public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getCustomerId() { + public org.joou.UShort getCustomerId() { return getValue(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.CUSTOMER_ID); } @@ -156,7 +156,7 @@ public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setStaffId(java.lang.Byte value) { + public void setStaffId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.STAFF_ID, value); } @@ -168,7 +168,7 @@ public class RentalRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getStaffId() { + public org.joou.UByte getStaffId() { return getValue(org.jooq.examples.mysql.sakila.tables.Rental.RENTAL.STAFF_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StaffListRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StaffListRecord.java index e13d6988b7..02abd3b7cb 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StaffListRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StaffListRecord.java @@ -12,19 +12,19 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class StaffListRecord extends org.jooq.impl.TableRecordImpl { - private static final long serialVersionUID = -112858551; + private static final long serialVersionUID = 1424642809; /** * An uncommented item */ - public void setId(java.lang.Byte value) { + public void setId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.StaffList.STAFF_LIST.ID, value); } /** * An uncommented item */ - public java.lang.Byte getId() { + public org.joou.UByte getId() { return getValue(org.jooq.examples.mysql.sakila.tables.StaffList.STAFF_LIST.ID); } @@ -115,14 +115,14 @@ public class StaffListRecord extends org.jooq.impl.TableRecordImpl { - private static final long serialVersionUID = -1955768421; + private static final long serialVersionUID = -47487845; /** * An uncommented item * * PRIMARY KEY */ - public void setStaffId(java.lang.Byte value) { + public void setStaffId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Staff.STAFF.STAFF_ID, value); } @@ -26,7 +26,7 @@ public class StaffRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setAddressId(java.lang.Short value) { + public void setAddressId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Staff.STAFF.ADDRESS_ID, value); } @@ -114,7 +114,7 @@ public class StaffRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getAddressId() { + public org.joou.UShort getAddressId() { return getValue(org.jooq.examples.mysql.sakila.tables.Staff.STAFF.ADDRESS_ID); } @@ -169,7 +169,7 @@ public class StaffRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setStoreId(java.lang.Byte value) { + public void setStoreId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Staff.STAFF.STORE_ID, value); } @@ -181,7 +181,7 @@ public class StaffRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getStoreId() { + public org.joou.UByte getStoreId() { return getValue(org.jooq.examples.mysql.sakila.tables.Staff.STAFF.STORE_ID); } diff --git a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StoreRecord.java b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StoreRecord.java index aff7b988d7..95dde996c6 100644 --- a/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StoreRecord.java +++ b/jOOQ-test/examples/org/jooq/examples/mysql/sakila/tables/records/StoreRecord.java @@ -10,14 +10,14 @@ package org.jooq.examples.mysql.sakila.tables.records; comments = "This class is generated by jOOQ") public class StoreRecord extends org.jooq.impl.UpdatableRecordImpl { - private static final long serialVersionUID = -470783653; + private static final long serialVersionUID = 909965243; /** * An uncommented item * * PRIMARY KEY */ - public void setStoreId(java.lang.Byte value) { + public void setStoreId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Store.STORE.STORE_ID, value); } @@ -26,7 +26,7 @@ public class StoreRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setManagerStaffId(java.lang.Byte value) { + public void setManagerStaffId(org.joou.UByte value) { setValue(org.jooq.examples.mysql.sakila.tables.Store.STORE.MANAGER_STAFF_ID, value); } @@ -86,7 +86,7 @@ public class StoreRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Byte getManagerStaffId() { + public org.joou.UByte getManagerStaffId() { return getValue(org.jooq.examples.mysql.sakila.tables.Store.STORE.MANAGER_STAFF_ID); } @@ -113,7 +113,7 @@ public class StoreRecord extends org.jooq.impl.UpdatableRecordImpl */ - public void setAddressId(java.lang.Short value) { + public void setAddressId(org.joou.UShort value) { setValue(org.jooq.examples.mysql.sakila.tables.Store.STORE.ADDRESS_ID, value); } @@ -125,7 +125,7 @@ public class StoreRecord extends org.jooq.impl.UpdatableRecordImpl */ - public java.lang.Short getAddressId() { + public org.joou.UShort getAddressId() { return getValue(org.jooq.examples.mysql.sakila.tables.Store.STORE.ADDRESS_ID); } diff --git a/jOOQ-test/launch/GenerationTool DB2 test.launch b/jOOQ-test/launch/GenerationTool DB2 test.launch index 443473b6f1..54e58d1986 100644 --- a/jOOQ-test/launch/GenerationTool DB2 test.launch +++ b/jOOQ-test/launch/GenerationTool DB2 test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Derby test.launch b/jOOQ-test/launch/GenerationTool Derby test.launch index 3c2624830a..107e3a2780 100644 --- a/jOOQ-test/launch/GenerationTool Derby test.launch +++ b/jOOQ-test/launch/GenerationTool Derby test.launch @@ -15,6 +15,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool H2 test.launch b/jOOQ-test/launch/GenerationTool H2 test.launch index 158e1b24b8..327dbdfbf6 100644 --- a/jOOQ-test/launch/GenerationTool H2 test.launch +++ b/jOOQ-test/launch/GenerationTool H2 test.launch @@ -15,6 +15,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool HSQLDB test.launch b/jOOQ-test/launch/GenerationTool HSQLDB test.launch index 6c3469c48e..53080e67ca 100644 --- a/jOOQ-test/launch/GenerationTool HSQLDB test.launch +++ b/jOOQ-test/launch/GenerationTool HSQLDB test.launch @@ -15,6 +15,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Ingres test.launch b/jOOQ-test/launch/GenerationTool Ingres test.launch index 8f43fd8a63..626f6fbb2a 100644 --- a/jOOQ-test/launch/GenerationTool Ingres test.launch +++ b/jOOQ-test/launch/GenerationTool Ingres test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool MySQL sakila.launch b/jOOQ-test/launch/GenerationTool MySQL sakila.launch index f06b3f1475..c2afed2a77 100644 --- a/jOOQ-test/launch/GenerationTool MySQL sakila.launch +++ b/jOOQ-test/launch/GenerationTool MySQL sakila.launch @@ -15,6 +15,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool MySQL test.launch b/jOOQ-test/launch/GenerationTool MySQL test.launch index 79faa328a3..d3683767c2 100644 --- a/jOOQ-test/launch/GenerationTool MySQL test.launch +++ b/jOOQ-test/launch/GenerationTool MySQL test.launch @@ -15,6 +15,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Oracle sys-test.launch b/jOOQ-test/launch/GenerationTool Oracle sys-test.launch index 96dfec2669..34322b12e1 100644 --- a/jOOQ-test/launch/GenerationTool Oracle sys-test.launch +++ b/jOOQ-test/launch/GenerationTool Oracle sys-test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Oracle test.launch b/jOOQ-test/launch/GenerationTool Oracle test.launch index aa3ed287f7..eec3d13dda 100644 --- a/jOOQ-test/launch/GenerationTool Oracle test.launch +++ b/jOOQ-test/launch/GenerationTool Oracle test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Postgres test.launch b/jOOQ-test/launch/GenerationTool Postgres test.launch index 5d3a2b7b77..d226c89d63 100644 --- a/jOOQ-test/launch/GenerationTool Postgres test.launch +++ b/jOOQ-test/launch/GenerationTool Postgres test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool SQLServer test.launch b/jOOQ-test/launch/GenerationTool SQLServer test.launch index c0f275384a..59a38f1f0c 100644 --- a/jOOQ-test/launch/GenerationTool SQLServer test.launch +++ b/jOOQ-test/launch/GenerationTool SQLServer test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool SQLite test.launch b/jOOQ-test/launch/GenerationTool SQLite test.launch index 17a4a62ae7..2275724665 100644 --- a/jOOQ-test/launch/GenerationTool SQLite test.launch +++ b/jOOQ-test/launch/GenerationTool SQLite test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Sybase ASE test.launch b/jOOQ-test/launch/GenerationTool Sybase ASE test.launch index 48a431adec..6591d4ce17 100644 --- a/jOOQ-test/launch/GenerationTool Sybase ASE test.launch +++ b/jOOQ-test/launch/GenerationTool Sybase ASE test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/GenerationTool Sybase test.launch b/jOOQ-test/launch/GenerationTool Sybase test.launch index 9b237d99bd..80d3081f11 100644 --- a/jOOQ-test/launch/GenerationTool Sybase test.launch +++ b/jOOQ-test/launch/GenerationTool Sybase test.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate DB2 syscat.launch b/jOOQ-test/launch/Meta-Generate DB2 syscat.launch index 7f74a4e0d4..176a944d2d 100644 --- a/jOOQ-test/launch/Meta-Generate DB2 syscat.launch +++ b/jOOQ-test/launch/Meta-Generate DB2 syscat.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Derby sys.launch b/jOOQ-test/launch/Meta-Generate Derby sys.launch index 95314b7ea7..4178717297 100644 --- a/jOOQ-test/launch/Meta-Generate Derby sys.launch +++ b/jOOQ-test/launch/Meta-Generate Derby sys.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate H2 information_schema.launch b/jOOQ-test/launch/Meta-Generate H2 information_schema.launch index ebc77c5dbd..2255dcadc5 100644 --- a/jOOQ-test/launch/Meta-Generate H2 information_schema.launch +++ b/jOOQ-test/launch/Meta-Generate H2 information_schema.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate HSQLDB information_schema.launch b/jOOQ-test/launch/Meta-Generate HSQLDB information_schema.launch index 6d70a2abb8..a280a3d464 100644 --- a/jOOQ-test/launch/Meta-Generate HSQLDB information_schema.launch +++ b/jOOQ-test/launch/Meta-Generate HSQLDB information_schema.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Ingres $ingres.launch b/jOOQ-test/launch/Meta-Generate Ingres $ingres.launch index 2be9bba948..0b706771d1 100644 --- a/jOOQ-test/launch/Meta-Generate Ingres $ingres.launch +++ b/jOOQ-test/launch/Meta-Generate Ingres $ingres.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate MySQL information_schema.launch b/jOOQ-test/launch/Meta-Generate MySQL information_schema.launch index ce3dc7c66a..194eab72f3 100644 --- a/jOOQ-test/launch/Meta-Generate MySQL information_schema.launch +++ b/jOOQ-test/launch/Meta-Generate MySQL information_schema.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate MySQL mysql.launch b/jOOQ-test/launch/Meta-Generate MySQL mysql.launch index 5b9e3b37aa..c8479c63a7 100644 --- a/jOOQ-test/launch/Meta-Generate MySQL mysql.launch +++ b/jOOQ-test/launch/Meta-Generate MySQL mysql.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Oracle sys.launch b/jOOQ-test/launch/Meta-Generate Oracle sys.launch index dfe627940c..e2858027ad 100644 --- a/jOOQ-test/launch/Meta-Generate Oracle sys.launch +++ b/jOOQ-test/launch/Meta-Generate Oracle sys.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Postgres information_schema.launch b/jOOQ-test/launch/Meta-Generate Postgres information_schema.launch index c3f4a2e9df..69b4f794b0 100644 --- a/jOOQ-test/launch/Meta-Generate Postgres information_schema.launch +++ b/jOOQ-test/launch/Meta-Generate Postgres information_schema.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Postgres pg_catalog.launch b/jOOQ-test/launch/Meta-Generate Postgres pg_catalog.launch index fcfe497a38..0bbd441c33 100644 --- a/jOOQ-test/launch/Meta-Generate Postgres pg_catalog.launch +++ b/jOOQ-test/launch/Meta-Generate Postgres pg_catalog.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate SQLServer information_schema.launch b/jOOQ-test/launch/Meta-Generate SQLServer information_schema.launch index 5853ed1e93..b0806b36c8 100644 --- a/jOOQ-test/launch/Meta-Generate SQLServer information_schema.launch +++ b/jOOQ-test/launch/Meta-Generate SQLServer information_schema.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Sybase ASE sys.launch b/jOOQ-test/launch/Meta-Generate Sybase ASE sys.launch index a496e69c03..7a0711c7a6 100644 --- a/jOOQ-test/launch/Meta-Generate Sybase ASE sys.launch +++ b/jOOQ-test/launch/Meta-Generate Sybase ASE sys.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/launch/Meta-Generate Sybase sys.launch b/jOOQ-test/launch/Meta-Generate Sybase sys.launch index c7efc68821..f60f7f3a5a 100644 --- a/jOOQ-test/launch/Meta-Generate Sybase sys.launch +++ b/jOOQ-test/launch/Meta-Generate Sybase sys.launch @@ -13,6 +13,7 @@ + diff --git a/jOOQ-test/src/org/jooq/test/jOOQASETest.java b/jOOQ-test/src/org/jooq/test/jOOQASETest.java index 8989adcca4..898f0de2b9 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQASETest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQASETest.java @@ -71,6 +71,11 @@ import org.jooq.test.ase.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.ase.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.ase.ASEDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Integration test that creates tables and performs various sql operations. @@ -85,6 +90,7 @@ public class jOOQASETest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -201,6 +207,31 @@ public class jOOQASETest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table T639() { return T_639NumbersTable.T_639_NUMBERS_TABLE; diff --git a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java index 040c41bb91..c279d03603 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQAbstractTest.java @@ -48,6 +48,10 @@ import static org.jooq.SQLDialect.MYSQL; import static org.jooq.SQLDialect.SQLSERVER; import static org.jooq.SQLDialect.SYBASE; import static org.jooq.impl.Factory.*; +import static org.joou.Unsigned.ubyte; +import static org.joou.Unsigned.uint; +import static org.joou.Unsigned.ulong; +import static org.joou.Unsigned.ushort; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -155,6 +159,11 @@ import org.jooq.tools.StringUtils; import org.jooq.util.GenerationTool; import org.apache.commons.io.FileUtils; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.Unsigned; +import org.joou.UShort; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; @@ -194,6 +203,9 @@ public abstract class jOOQAbstractTest< // T_TRIGGERS table T extends UpdatableRecord, + // T_UNSIGNED table + U extends TableRecord, + // Various tables related to trac ticket numbers T658 extends TableRecord, T725 extends UpdatableRecord, @@ -486,6 +498,12 @@ public abstract class jOOQAbstractTest< protected abstract TableField T785_NAME(); protected abstract TableField T785_VALUE(); + protected abstract Table TUnsigned(); + protected abstract TableField TUnsigned_U_BYTE(); + protected abstract TableField TUnsigned_U_SHORT(); + protected abstract TableField TUnsigned_U_INT(); + protected abstract TableField TUnsigned_U_LONG(); + protected abstract Table TArrays(); protected abstract TableField TArrays_ID(); protected abstract TableField TArrays_STRING(); @@ -1078,6 +1096,11 @@ public abstract class jOOQAbstractTest< tables++; } + // The additional T_UNSIGNED table + if (TUnsigned() != null) { + tables++; + } + if (TArrays() == null) { assertEquals(tables, schema.getTables().size()); } @@ -1518,12 +1541,96 @@ public abstract class jOOQAbstractTest< assertEquals(Integer.valueOf(8), result.getValue(2, IDx2)); } + @Test + public void testUnsignedDataTypes() throws Exception { + if (TUnsigned() == null) { + log.info("SKIPPING", "Unsigned tests"); + return; + } + + reset = false; + + // unsigned null values + // -------------------- + assertEquals(1, + create().insertInto(TUnsigned(), + TUnsigned_U_BYTE(), + TUnsigned_U_SHORT(), + TUnsigned_U_INT(), + TUnsigned_U_LONG()) + .values(null, null, null, null) + .execute()); + + assertEquals(1, create().selectCount().from(TUnsigned()).fetchOne(0)); + U u = create().selectFrom(TUnsigned()).fetchOne(); + assertNotNull(u); + assertNull(u.getValue(TUnsigned_U_BYTE())); + assertNull(u.getValue(TUnsigned_U_SHORT())); + assertNull(u.getValue(TUnsigned_U_INT())); + assertNull(u.getValue(TUnsigned_U_LONG())); + + // unsigned 1 + // ---------- + assertEquals(1, + create().insertInto(TUnsigned()) + .set(TUnsigned_U_BYTE(), Unsigned.ubyte((byte) 1)) + .set(TUnsigned_U_SHORT(), Unsigned.ushort((short) 1)) + .set(TUnsigned_U_INT(), Unsigned.uint(1)) + .set(TUnsigned_U_LONG(), Unsigned.ulong(1L)) + .execute()); + + assertEquals(2, create().selectCount().from(TUnsigned()).fetchOne(0)); + u = create().selectFrom(TUnsigned()).where(TUnsigned_U_INT().equal(Unsigned.uint(1))).fetchOne(); + assertNotNull(u); + assertEquals(Unsigned.ubyte("1"), u.getValue(TUnsigned_U_BYTE())); + assertEquals(Unsigned.ushort("1"), u.getValue(TUnsigned_U_SHORT())); + assertEquals(Unsigned.uint("1"), u.getValue(TUnsigned_U_INT())); + assertEquals(Unsigned.ulong("1"), u.getValue(TUnsigned_U_LONG())); + + assertEquals("1", u.getValue(TUnsigned_U_BYTE(), String.class)); + assertEquals("1", u.getValue(TUnsigned_U_SHORT(), String.class)); + assertEquals("1", u.getValue(TUnsigned_U_INT(), String.class)); + assertEquals("1", u.getValue(TUnsigned_U_LONG(), String.class)); + + assertEquals(Unsigned.ubyte("1"), u.getValue(TUnsigned_U_BYTE())); + assertEquals(Unsigned.ushort("1"), u.getValue(TUnsigned_U_SHORT())); + assertEquals(Unsigned.uint("1"), u.getValue(TUnsigned_U_INT())); + assertEquals(Unsigned.ulong("1"), u.getValue(TUnsigned_U_LONG())); + + // unsigned max-values + // ------------------- + assertEquals(1, + create().insertInto(TUnsigned()) + .set(TUnsigned_U_BYTE(), Unsigned.ubyte((byte) -1)) + .set(TUnsigned_U_SHORT(), Unsigned.ushort((short) -1)) + .set(TUnsigned_U_INT(), Unsigned.uint(-1)) + .set(TUnsigned_U_LONG(), Unsigned.ulong(-1L)) + .execute()); + + assertEquals(3, create().selectCount().from(TUnsigned()).fetchOne(0)); + u = create().selectFrom(TUnsigned()).where(TUnsigned_U_INT().equal(Unsigned.uint(-1))).fetchOne(); + assertNotNull(u); + assertEquals(Unsigned.ubyte(UByte.MAX_VALUE), u.getValue(TUnsigned_U_BYTE())); + assertEquals(Unsigned.ushort(UShort.MAX_VALUE), u.getValue(TUnsigned_U_SHORT())); + assertEquals(Unsigned.uint(UInteger.MAX_VALUE), u.getValue(TUnsigned_U_INT())); + assertEquals(Unsigned.ulong(ULong.MAX_VALUE), u.getValue(TUnsigned_U_LONG())); + + assertEquals((byte) -1, u.getValue(TUnsigned_U_BYTE()).byteValue()); + assertEquals((short) -1, u.getValue(TUnsigned_U_SHORT()).shortValue()); + assertEquals(-1, u.getValue(TUnsigned_U_INT()).intValue()); + assertEquals(-1L, u.getValue(TUnsigned_U_LONG()).longValue()); + } + @Test public void testConversion() throws Exception { assertEquals(null, SQLDataType.TINYINT.convert(null)); + assertEquals(null, SQLDataType.TINYINTUNSIGNED.convert(null)); assertEquals(null, SQLDataType.SMALLINT.convert(null)); + assertEquals(null, SQLDataType.SMALLINTUNSIGNED.convert(null)); assertEquals(null, SQLDataType.INTEGER.convert(null)); + assertEquals(null, SQLDataType.INTEGERUNSIGNED.convert(null)); assertEquals(null, SQLDataType.BIGINT.convert(null)); + assertEquals(null, SQLDataType.BIGINTUNSIGNED.convert(null)); assertEquals(null, SQLDataType.REAL.convert(null)); assertEquals(null, SQLDataType.DOUBLE.convert(null)); assertEquals(null, SQLDataType.DECIMAL_INTEGER.convert(null)); @@ -1535,9 +1642,13 @@ public abstract class jOOQAbstractTest< assertEquals(null, SQLDataType.TIMESTAMP.convert(null)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert('1')); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert('1')); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert('1')); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert('1')); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert('1')); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert('1')); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert('1')); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert('1')); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert('1')); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert('1')); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert('1')); @@ -1546,9 +1657,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert('1')); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert("1")); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert("1")); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert("1")); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert("1")); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert("1")); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert("1")); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert("1")); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert("1")); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert("1")); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert("1")); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert("1")); @@ -1557,9 +1672,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert("1")); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert(" 1")); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert(" 1")); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert(" 1")); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert(" 1")); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert(" 1")); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert(" 1")); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert(" 1")); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert(" 1")); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert(" 1")); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert(" 1")); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert(" 1")); @@ -1568,9 +1687,13 @@ public abstract class jOOQAbstractTest< assertEquals(" 1", SQLDataType.VARCHAR.convert(" 1")); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert((byte) 1)); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert((byte) 1)); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert((byte) 1)); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert((byte) 1)); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert((byte) 1)); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert((byte) 1)); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert((byte) 1)); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert((byte) 1)); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert((byte) 1)); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert((byte) 1)); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert((byte) 1)); @@ -1579,9 +1702,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert((byte) 1)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert((short) 1)); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert((short) 1)); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert((short) 1)); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert((short) 1)); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert((short) 1)); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert((short) 1)); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert((short) 1)); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert((short) 1)); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert((short) 1)); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert((short) 1)); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert((short) 1)); @@ -1590,9 +1717,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert((short) 1)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert(1)); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert(1)); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert(1)); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert(1)); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert(1)); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert(1)); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert(1)); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert(1)); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert(1)); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert(1)); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert(1)); @@ -1601,9 +1732,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert(1)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert((long) 1)); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert((long) 1)); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert((long) 1)); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert((long) 1)); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert((long) 1)); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert((long) 1)); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert((long) 1)); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert((long) 1)); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert((long) 1)); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert((long) 1)); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert((long) 1)); @@ -1612,9 +1747,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert((long) 1)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert(1.1f)); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert(1.1f)); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert(1.1f)); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert(1.1f)); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert(1.1f)); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert(1.1f)); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert(1.1f)); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert(1.1f)); assertEquals(Float.valueOf("1.1"), SQLDataType.REAL.convert(1.1f)); assertEquals(Double.valueOf("1.1"), SQLDataType.DOUBLE.convert(1.1f)); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert(1.1f)); @@ -1623,9 +1762,13 @@ public abstract class jOOQAbstractTest< assertEquals("1.1", SQLDataType.VARCHAR.convert(1.1f)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert(1.1)); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert(1.1)); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert(1.1)); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert(1.1)); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert(1.1)); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert(1.1)); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert(1.1)); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert(1.1)); assertEquals(Float.valueOf("1.1"), SQLDataType.REAL.convert(1.1)); assertEquals(Double.valueOf("1.1"), SQLDataType.DOUBLE.convert(1.1)); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert(1.1)); @@ -1634,9 +1777,13 @@ public abstract class jOOQAbstractTest< assertEquals("1.1", SQLDataType.VARCHAR.convert(1.1)); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert(new BigInteger("1"))); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert(new BigInteger("1"))); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert(new BigInteger("1"))); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert(new BigInteger("1"))); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert(new BigInteger("1"))); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert(new BigInteger("1"))); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert(new BigInteger("1"))); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert(new BigInteger("1"))); assertEquals(Float.valueOf("1"), SQLDataType.REAL.convert(new BigInteger("1"))); assertEquals(Double.valueOf("1"), SQLDataType.DOUBLE.convert(new BigInteger("1"))); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert(new BigInteger("1"))); @@ -1645,9 +1792,13 @@ public abstract class jOOQAbstractTest< assertEquals("1", SQLDataType.VARCHAR.convert(new BigInteger("1"))); assertEquals(Byte.valueOf("1"), SQLDataType.TINYINT.convert(new BigDecimal("1.1"))); + assertEquals(UByte.valueOf("1"), SQLDataType.TINYINTUNSIGNED.convert(new BigDecimal("1.1"))); assertEquals(Short.valueOf("1"), SQLDataType.SMALLINT.convert(new BigDecimal("1.1"))); + assertEquals(UShort.valueOf("1"), SQLDataType.SMALLINTUNSIGNED.convert(new BigDecimal("1.1"))); assertEquals(Integer.valueOf("1"), SQLDataType.INTEGER.convert(new BigDecimal("1.1"))); + assertEquals(UInteger.valueOf("1"), SQLDataType.INTEGERUNSIGNED.convert(new BigDecimal("1.1"))); assertEquals(Long.valueOf("1"), SQLDataType.BIGINT.convert(new BigDecimal("1.1"))); + assertEquals(ULong.valueOf("1"), SQLDataType.BIGINTUNSIGNED.convert(new BigDecimal("1.1"))); assertEquals(Float.valueOf("1.1"), SQLDataType.REAL.convert(new BigDecimal("1.1"))); assertEquals(Double.valueOf("1.1"), SQLDataType.DOUBLE.convert(new BigDecimal("1.1"))); assertEquals(new BigInteger("1"), SQLDataType.DECIMAL_INTEGER.convert(new BigDecimal("1.1"))); @@ -1707,6 +1858,7 @@ public abstract class jOOQAbstractTest< assertEquals(calendar, author2.getValue(TAuthor_DATE_OF_BIRTH(), Calendar.class)); assertEquals(Long.valueOf(1), author2.getValue(TAuthor_DATE_OF_BIRTH(), Long.class)); assertEquals(Long.valueOf(1), author2.getValue(TAuthor_DATE_OF_BIRTH(), long.class)); + assertEquals(ULong.valueOf(1), author2.getValue(TAuthor_DATE_OF_BIRTH(), ULong.class)); // [#933] Character conversion checks // ---------------------------------- @@ -1759,6 +1911,18 @@ public abstract class jOOQAbstractTest< assertEquals( Arrays.asList(1L, 2L), create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(0, Long.class)); + assertEquals( + Arrays.asList(ubyte((byte) 1), ubyte((byte) 2)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(0, UByte.class)); + assertEquals( + Arrays.asList(ushort((short) 1), ushort((short) 2)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(0, UShort.class)); + assertEquals( + Arrays.asList(uint(1), uint(2)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(0, UInteger.class)); + assertEquals( + Arrays.asList(ulong(1L), ulong(2L)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(0, ULong.class)); assertEquals( Arrays.asList(1.0f, 2.0f), create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(0, Float.class)); @@ -1785,6 +1949,18 @@ public abstract class jOOQAbstractTest< assertEquals( Arrays.asList(1L, 2L), create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(TAuthor_ID().getName(), Long.class)); + assertEquals( + Arrays.asList(ubyte((byte) 1), ubyte((byte) 2)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(TAuthor_ID().getName(), UByte.class)); + assertEquals( + Arrays.asList(ushort((short) 1), ushort((short) 2)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(TAuthor_ID().getName(), UShort.class)); + assertEquals( + Arrays.asList(uint(1), uint(2)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(TAuthor_ID().getName(), UInteger.class)); + assertEquals( + Arrays.asList(ulong(1L), ulong(2L)), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(TAuthor_ID().getName(), ULong.class)); assertEquals( Arrays.asList(1.0f, 2.0f), create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetch(TAuthor_ID().getName(), Float.class)); @@ -1813,6 +1989,18 @@ public abstract class jOOQAbstractTest< assertEquals( Arrays.asList(1L, 2L), Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(0, Long.class))); + assertEquals( + Arrays.asList(ubyte((byte) 1), ubyte((byte) 2)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(0, UByte.class))); + assertEquals( + Arrays.asList(ushort((short) 1), ushort((short) 2)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(0, UShort.class))); + assertEquals( + Arrays.asList(uint(1), uint(2)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(0, UInteger.class))); + assertEquals( + Arrays.asList(ulong(1L), ulong(2L)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(0, ULong.class))); assertEquals( Arrays.asList(1.0f, 2.0f), Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(0, Float.class))); @@ -1839,6 +2027,18 @@ public abstract class jOOQAbstractTest< assertEquals( Arrays.asList(1L, 2L), Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(TAuthor_ID().getName(), Long.class))); + assertEquals( + Arrays.asList(ubyte((byte) 1), ubyte((byte) 2)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(TAuthor_ID().getName(), UByte.class))); + assertEquals( + Arrays.asList(ushort((short) 1), ushort((short) 2)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(TAuthor_ID().getName(), UShort.class))); + assertEquals( + Arrays.asList(uint(1), uint(2)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(TAuthor_ID().getName(), UInteger.class))); + assertEquals( + Arrays.asList(ulong(1L), ulong(2L)), + Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(TAuthor_ID().getName(), ULong.class))); assertEquals( Arrays.asList(1.0f, 2.0f), Arrays.asList(create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).fetchArray(TAuthor_ID().getName(), Float.class))); @@ -1867,6 +2067,18 @@ public abstract class jOOQAbstractTest< assertEquals( 1L, (long) create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, Long.class)); + assertEquals( + ubyte((byte) 1), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, UByte.class)); + assertEquals( + ushort((short) 1), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, UShort.class)); + assertEquals( + uint(1), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, UInteger.class)); + assertEquals( + ulong(1L), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, ULong.class)); assertEquals( 1.0f, create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(0, Float.class)); @@ -1893,6 +2105,18 @@ public abstract class jOOQAbstractTest< assertEquals( 1L, (long) create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), Long.class)); + assertEquals( + ubyte((byte) 1), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), UByte.class)); + assertEquals( + ushort((short) 1), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), UShort.class)); + assertEquals( + uint(1), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), UInteger.class)); + assertEquals( + ulong(1L), + create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), ULong.class)); assertEquals( 1.0f, create().selectFrom(TAuthor()).orderBy(TAuthor_ID()).limit(1).fetchOne(TAuthor_ID().getName(), Float.class)); diff --git a/jOOQ-test/src/org/jooq/test/jOOQDB2Test.java b/jOOQ-test/src/org/jooq/test/jOOQDB2Test.java index 862a8cc0c4..64d6cb18f3 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQDB2Test.java +++ b/jOOQ-test/src/org/jooq/test/jOOQDB2Test.java @@ -78,6 +78,11 @@ import org.jooq.test.db2.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.db2.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.db2.DB2DataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Integration test that creates tables and performs various sql operations. @@ -92,6 +97,7 @@ public class jOOQDB2Test extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -282,6 +288,31 @@ public class jOOQDB2Test extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQDerbyTest.java b/jOOQ-test/src/org/jooq/test/jOOQDerbyTest.java index fde276ea11..de05ab5be7 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQDerbyTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQDerbyTest.java @@ -77,6 +77,11 @@ import org.jooq.test.derby.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.derby.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.derby.DerbyDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * @author Lukas Eder */ @@ -88,6 +93,7 @@ public class jOOQDerbyTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -273,6 +279,31 @@ public class jOOQDerbyTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQH2Test.java b/jOOQ-test/src/org/jooq/test/jOOQH2Test.java index bd38bad034..568aeb64f3 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQH2Test.java +++ b/jOOQ-test/src/org/jooq/test/jOOQH2Test.java @@ -80,6 +80,11 @@ import org.jooq.test.h2.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.h2.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.h2.H2DataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Integration test for the H2 database * @@ -93,6 +98,7 @@ public class jOOQH2Test extends jOOQAbstractTest< TArraysRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -278,6 +284,31 @@ public class jOOQH2Test extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return TArrays.T_ARRAYS; diff --git a/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest.java b/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest.java index 9ffb290b43..e76dca514d 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest.java @@ -80,6 +80,11 @@ import org.jooq.test.hsqldb.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.hsqldb.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.hsqldb.HSQLDBDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * @author Lukas Eder */ @@ -91,6 +96,7 @@ public class jOOQHSQLDBTest extends jOOQAbstractTest< TArraysRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -276,6 +282,31 @@ public class jOOQHSQLDBTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return T_ARRAYS; diff --git a/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest2.java b/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest2.java index 3874e5afa4..d28b4e911d 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest2.java +++ b/jOOQ-test/src/org/jooq/test/jOOQHSQLDBTest2.java @@ -64,6 +64,7 @@ import org.jooq.TableField; import org.jooq.UDTRecord; import org.jooq.UpdatableTable; import org.jooq.impl.Factory; +import org.jooq.test.ase.generatedclasses.tables.records.XUnusedRecord; import org.jooq.test.hsqldb.generatedclasses.Public; import org.jooq.test.hsqldb.generatedclasses.PublicFactory; import org.jooq.test.oracle.generatedclasses.Routines; @@ -80,6 +81,11 @@ import org.jooq.test.oracle.generatedclasses.tables.records.T_725LobTestRecord; import org.jooq.test.oracle.generatedclasses.tables.records.T_785Record; import org.jooq.test.oracle.generatedclasses.tables.records.VLibraryRecord; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * @author Lukas Eder */ @@ -91,6 +97,7 @@ public class jOOQHSQLDBTest2 extends jOOQAbstractTest< TArraysRecord, TDirectoryRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -278,6 +285,31 @@ public class jOOQHSQLDBTest2 extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQIngresTest.java b/jOOQ-test/src/org/jooq/test/jOOQIngresTest.java index 2efa0c4ab9..861a634882 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQIngresTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQIngresTest.java @@ -77,6 +77,11 @@ import org.jooq.test.ingres.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.ingres.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.ingres.IngresDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * @author Lukas Eder @@ -89,6 +94,7 @@ public class jOOQIngresTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -274,6 +280,31 @@ public class jOOQIngresTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQMySQLTest.java b/jOOQ-test/src/org/jooq/test/jOOQMySQLTest.java index 880127f61b..227ffacfc8 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQMySQLTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQMySQLTest.java @@ -37,6 +37,7 @@ package org.jooq.test; import static org.jooq.impl.Factory.val; +import static org.jooq.test.mysql.generatedclasses.Tables.T_UNSIGNED; import static org.jooq.test.mysql.generatedclasses.Tables.V_AUTHOR; import static org.jooq.test.mysql.generatedclasses.Tables.V_BOOK; import static org.jooq.util.mysql.MySQLFactory.aesDecrypt; @@ -75,6 +76,7 @@ import org.jooq.test.mysql.generatedclasses.tables.TAuthor; import org.jooq.test.mysql.generatedclasses.tables.TBook; import org.jooq.test.mysql.generatedclasses.tables.TBookStore; import org.jooq.test.mysql.generatedclasses.tables.TTriggers; +import org.jooq.test.mysql.generatedclasses.tables.TUnsigned; import org.jooq.test.mysql.generatedclasses.tables.T_639NumbersTable; import org.jooq.test.mysql.generatedclasses.tables.T_658Ref; import org.jooq.test.mysql.generatedclasses.tables.T_725LobTest; @@ -84,6 +86,7 @@ import org.jooq.test.mysql.generatedclasses.tables.records.TAuthorRecord; import org.jooq.test.mysql.generatedclasses.tables.records.TBookRecord; import org.jooq.test.mysql.generatedclasses.tables.records.TBookStoreRecord; import org.jooq.test.mysql.generatedclasses.tables.records.TTriggersRecord; +import org.jooq.test.mysql.generatedclasses.tables.records.TUnsignedRecord; import org.jooq.test.mysql.generatedclasses.tables.records.T_639NumbersTableRecord; import org.jooq.test.mysql.generatedclasses.tables.records.T_658RefRecord; import org.jooq.test.mysql.generatedclasses.tables.records.T_725LobTestRecord; @@ -93,6 +96,10 @@ import org.jooq.test.mysql.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.mysql.MySQLDataType; import org.jooq.util.mysql.MySQLFactory; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; import org.junit.Test; @@ -107,6 +114,7 @@ public class jOOQMySQLTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + TUnsignedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -292,6 +300,31 @@ public class jOOQMySQLTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return T_UNSIGNED; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return TUnsigned.U_BYTE; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return TUnsigned.U_SHORT; + } + + @Override + protected TableField TUnsigned_U_INT() { + return TUnsigned.U_INT; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return TUnsigned.U_LONG; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQOracleTest.java b/jOOQ-test/src/org/jooq/test/jOOQOracleTest.java index 8f0e2156ec..e5cda037ee 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQOracleTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQOracleTest.java @@ -80,6 +80,7 @@ import org.jooq.Table; import org.jooq.TableField; import org.jooq.UDTRecord; import org.jooq.UpdatableTable; +import org.jooq.test.ase.generatedclasses.tables.records.XUnusedRecord; import org.jooq.test.oracle.generatedclasses.Routines; import org.jooq.test.oracle.generatedclasses.Sequences; import org.jooq.test.oracle.generatedclasses.TestFactory; @@ -114,6 +115,10 @@ import org.jooq.test.oracle.generatedclasses.udt.u_author_type.GetBooks; import org.jooq.util.oracle.OracleDataType; import org.jooq.util.oracle.OracleFactory; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; import org.junit.Test; @@ -128,6 +133,7 @@ public class jOOQOracleTest extends jOOQAbstractTest< TArraysRecord, TDirectoryRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -259,6 +265,31 @@ public class jOOQOracleTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table T658() { return T_658_REF; diff --git a/jOOQ-test/src/org/jooq/test/jOOQPostgresTest.java b/jOOQ-test/src/org/jooq/test/jOOQPostgresTest.java index 8f3647e8f0..abbd04fb47 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQPostgresTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQPostgresTest.java @@ -82,6 +82,11 @@ import org.jooq.test.postgres.generatedclasses.udt.UAddressType; import org.jooq.test.postgres.generatedclasses.udt.UStreetType; import org.jooq.util.postgres.PostgresDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * @author Lukas Eder @@ -94,6 +99,7 @@ public class jOOQPostgresTest extends jOOQAbstractTest< TArraysRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -204,6 +210,31 @@ public class jOOQPostgresTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table T658() { return T_658_REF; diff --git a/jOOQ-test/src/org/jooq/test/jOOQSQLServerTest.java b/jOOQ-test/src/org/jooq/test/jOOQSQLServerTest.java index 211b5c3edc..c3ac55bd9d 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQSQLServerTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQSQLServerTest.java @@ -77,6 +77,11 @@ import org.jooq.test.sqlserver.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.sqlserver.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.sqlserver.SQLServerDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * @author Lukas Eder */ @@ -88,6 +93,7 @@ public class jOOQSQLServerTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -273,6 +279,31 @@ public class jOOQSQLServerTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQSQLiteTest.java b/jOOQ-test/src/org/jooq/test/jOOQSQLiteTest.java index da033ff964..7be85b3bd0 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQSQLiteTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQSQLiteTest.java @@ -76,6 +76,11 @@ import org.jooq.test.sqlite.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.sqlite.SQLiteDataType; import org.jooq.util.sqlite.SQLiteFactory; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Integration test for the SQLite database * @@ -89,6 +94,7 @@ public class jOOQSQLiteTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -274,6 +280,31 @@ public class jOOQSQLiteTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table TArrays() { return null; diff --git a/jOOQ-test/src/org/jooq/test/jOOQSybaseTest.java b/jOOQ-test/src/org/jooq/test/jOOQSybaseTest.java index 3f627a59ad..f706de4df7 100644 --- a/jOOQ-test/src/org/jooq/test/jOOQSybaseTest.java +++ b/jOOQ-test/src/org/jooq/test/jOOQSybaseTest.java @@ -73,6 +73,11 @@ import org.jooq.test.sybase.generatedclasses.tables.records.VLibraryRecord; import org.jooq.test.sybase.generatedclasses.tables.records.XUnusedRecord; import org.jooq.util.sybase.SybaseDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Integration test that creates tables and performs various sql operations. @@ -87,6 +92,7 @@ public class jOOQSybaseTest extends jOOQAbstractTest< XUnusedRecord, XUnusedRecord, TTriggersRecord, + XUnusedRecord, T_658RefRecord, T_725LobTestRecord, T_639NumbersTableRecord, @@ -203,6 +209,31 @@ public class jOOQSybaseTest extends jOOQAbstractTest< return T_785.VALUE; } + @Override + protected Table TUnsigned() { + return null; + } + + @Override + protected TableField TUnsigned_U_BYTE() { + return null; + } + + @Override + protected TableField TUnsigned_U_SHORT() { + return null; + } + + @Override + protected TableField TUnsigned_U_INT() { + return null; + } + + @Override + protected TableField TUnsigned_U_LONG() { + return null; + } + @Override protected Table T639() { return T_639_NUMBERS_TABLE; diff --git a/jOOQ-test/src/org/jooq/test/mysql/create.sql b/jOOQ-test/src/org/jooq/test/mysql/create.sql index bd71229d9a..f8bc679c71 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/create.sql +++ b/jOOQ-test/src/org/jooq/test/mysql/create.sql @@ -25,6 +25,7 @@ DROP TABLE IF EXISTS t_658_22/ DROP TABLE IF EXISTS t_658_32/ DROP TABLE IF EXISTS t_725_lob_test/ DROP TABLE IF EXISTS t_785/ +DROP TABLE IF EXISTS t_unsigned/ DROP PROCEDURE IF EXISTS p_unused/ DROP PROCEDURE IF EXISTS p_author_exists/ @@ -36,6 +37,14 @@ DROP FUNCTION IF EXISTS f_one/ DROP FUNCTION IF EXISTS f_number/ DROP FUNCTION IF EXISTS f317/ +CREATE TABLE t_unsigned ( + u_byte tinyint unsigned, + u_short smallint unsigned, + u_int int unsigned, + u_long bigint unsigned +) ENGINE = InnoDB +/ + CREATE TABLE t_triggers ( id_generated int not null AUTO_INCREMENT, id int, diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java index d7ccb09780..f9e923b636 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Tables.java @@ -57,6 +57,11 @@ public final class Tables { */ public static org.jooq.test.mysql.generatedclasses.tables.TTriggers T_TRIGGERS = org.jooq.test.mysql.generatedclasses.tables.TTriggers.T_TRIGGERS; + /** + * The table test.t_unsigned + */ + public static org.jooq.test.mysql.generatedclasses.tables.TUnsigned T_UNSIGNED = org.jooq.test.mysql.generatedclasses.tables.TUnsigned.T_UNSIGNED; + /** * The table test.v_author */ diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java index 3ebc55a087..14480f5609 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/Test.java @@ -10,7 +10,7 @@ package org.jooq.test.mysql.generatedclasses; comments = "This class is generated by jOOQ") public class Test extends org.jooq.impl.SchemaImpl { - private static final long serialVersionUID = 1253072355; + private static final long serialVersionUID = 1604321656; /** * The singleton instance of test @@ -36,6 +36,7 @@ public class Test extends org.jooq.impl.SchemaImpl { org.jooq.test.mysql.generatedclasses.tables.TBookStore.T_BOOK_STORE, org.jooq.test.mysql.generatedclasses.tables.TBookToBookStore.T_BOOK_TO_BOOK_STORE, org.jooq.test.mysql.generatedclasses.tables.TTriggers.T_TRIGGERS, + org.jooq.test.mysql.generatedclasses.tables.TUnsigned.T_UNSIGNED, org.jooq.test.mysql.generatedclasses.tables.VAuthor.V_AUTHOR, org.jooq.test.mysql.generatedclasses.tables.VBook.V_BOOK, org.jooq.test.mysql.generatedclasses.tables.VLibrary.V_LIBRARY, diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TUnsigned.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TUnsigned.java new file mode 100644 index 0000000000..2f5edfbdb4 --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/TUnsigned.java @@ -0,0 +1,59 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql.generatedclasses.tables; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = {"http://www.jooq.org", "2.0.0"}, + comments = "This class is generated by jOOQ") +public class TUnsigned extends org.jooq.impl.TableImpl { + + private static final long serialVersionUID = 1984321646; + + /** + * The singleton instance of t_unsigned + */ + public static final org.jooq.test.mysql.generatedclasses.tables.TUnsigned T_UNSIGNED = new org.jooq.test.mysql.generatedclasses.tables.TUnsigned(); + + /** + * The class holding records for this type + */ + private static final java.lang.Class __RECORD_TYPE = org.jooq.test.mysql.generatedclasses.tables.records.TUnsignedRecord.class; + + /** + * The class holding records for this type + */ + @Override + public java.lang.Class getRecordType() { + return __RECORD_TYPE; + } + + /** + * An uncommented item + */ + public static final org.jooq.TableField U_BYTE = createField("u_byte", org.jooq.impl.SQLDataType.TINYINTUNSIGNED, T_UNSIGNED); + + /** + * An uncommented item + */ + public static final org.jooq.TableField U_SHORT = createField("u_short", org.jooq.impl.SQLDataType.SMALLINTUNSIGNED, T_UNSIGNED); + + /** + * An uncommented item + */ + public static final org.jooq.TableField U_INT = createField("u_int", org.jooq.impl.SQLDataType.INTEGERUNSIGNED, T_UNSIGNED); + + /** + * An uncommented item + */ + public static final org.jooq.TableField U_LONG = createField("u_long", org.jooq.impl.SQLDataType.BIGINTUNSIGNED, T_UNSIGNED); + + /** + * No further instances allowed + */ + private TUnsigned() { + super("t_unsigned", org.jooq.test.mysql.generatedclasses.Test.TEST); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TUnsignedRecord.java b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TUnsignedRecord.java new file mode 100644 index 0000000000..ecdb00721e --- /dev/null +++ b/jOOQ-test/src/org/jooq/test/mysql/generatedclasses/tables/records/TUnsignedRecord.java @@ -0,0 +1,77 @@ +/** + * This class is generated by jOOQ + */ +package org.jooq.test.mysql.generatedclasses.tables.records; + +/** + * This class is generated by jOOQ. + */ +@javax.annotation.Generated(value = {"http://www.jooq.org", "2.0.0"}, + comments = "This class is generated by jOOQ") +public class TUnsignedRecord extends org.jooq.impl.TableRecordImpl { + + private static final long serialVersionUID = -1989740547; + + /** + * An uncommented item + */ + public void setUByte(org.joou.UByte value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_BYTE, value); + } + + /** + * An uncommented item + */ + public org.joou.UByte getUByte() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_BYTE); + } + + /** + * An uncommented item + */ + public void setUShort(org.joou.UShort value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_SHORT, value); + } + + /** + * An uncommented item + */ + public org.joou.UShort getUShort() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_SHORT); + } + + /** + * An uncommented item + */ + public void setUInt(org.joou.UInteger value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_INT, value); + } + + /** + * An uncommented item + */ + public org.joou.UInteger getUInt() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_INT); + } + + /** + * An uncommented item + */ + public void setULong(org.joou.ULong value) { + setValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_LONG, value); + } + + /** + * An uncommented item + */ + public org.joou.ULong getULong() { + return getValue(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.U_LONG); + } + + /** + * Create a detached TUnsignedRecord + */ + public TUnsignedRecord() { + super(org.jooq.test.mysql.generatedclasses.tables.TUnsigned.T_UNSIGNED); + } +} diff --git a/jOOQ-test/src/org/jooq/test/mysql/reset.sql b/jOOQ-test/src/org/jooq/test/mysql/reset.sql index 65d0d48a26..71a106d8cc 100644 --- a/jOOQ-test/src/org/jooq/test/mysql/reset.sql +++ b/jOOQ-test/src/org/jooq/test/mysql/reset.sql @@ -44,5 +44,4 @@ INSERT INTO t_book_to_book_store VALUES ('Orell Füssli', 3, 10), ('Ex Libris', 1, 1), ('Ex Libris', 3, 2), - ('Buchhandlung im Volkshaus', 3, 1)/ - + ('Buchhandlung im Volkshaus', 3, 1)/ \ No newline at end of file diff --git a/jOOQ/pom.xml b/jOOQ/pom.xml index 9ad7183dff..d0766575b0 100644 --- a/jOOQ/pom.xml +++ b/jOOQ/pom.xml @@ -241,5 +241,12 @@ provided true + + org.jooq + joou + 0.9.0 + jar + compile + \ No newline at end of file diff --git a/jOOQ/src/main/java/org/jooq/impl/DefaultBindContext.java b/jOOQ/src/main/java/org/jooq/impl/DefaultBindContext.java index 2b0ae228ac..ffc08830b3 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DefaultBindContext.java +++ b/jOOQ/src/main/java/org/jooq/impl/DefaultBindContext.java @@ -59,6 +59,8 @@ import org.jooq.SQLDialect; import org.jooq.exception.SQLDialectNotSupportedException; import org.jooq.tools.JooqLogger; +import org.joou.UNumber; + /** * @author Lukas Eder */ @@ -276,6 +278,9 @@ class DefaultBindContext extends AbstractContext implements BindCon else if (type == Timestamp.class) { stmt.setTimestamp(nextIndex(), (Timestamp) value); } + else if (UNumber.class.isAssignableFrom(type)) { + stmt.setString(nextIndex(), value.toString()); + } // The type byte[] is handled earlier. byte[][] can be handled here else if (type.isArray()) { diff --git a/jOOQ/src/main/java/org/jooq/impl/FieldTypeHelper.java b/jOOQ/src/main/java/org/jooq/impl/FieldTypeHelper.java index 180279b6ff..44cfea6389 100644 --- a/jOOQ/src/main/java/org/jooq/impl/FieldTypeHelper.java +++ b/jOOQ/src/main/java/org/jooq/impl/FieldTypeHelper.java @@ -87,6 +87,12 @@ import org.jooq.util.sqlite.SQLiteDataType; import org.jooq.util.sqlserver.SQLServerDataType; import org.jooq.util.sybase.SybaseDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UNumber; +import org.joou.UShort; + /** * Utility methods related to the treatment of fields and their types *

@@ -181,6 +187,9 @@ public final class FieldTypeHelper { context.sql("ARRAY") .sql(Arrays.asList((Object[]) value).toString()); } + else if (UNumber.class.isAssignableFrom(type)) { + context.sql(value.toString()); + } else if (ArrayRecord.class.isAssignableFrom(type)) { context.sql(value.toString()); } @@ -277,6 +286,22 @@ public final class FieldTypeHelper { else if (type == Timestamp.class) { return (T) stream.readTimestamp(); } + else if (type == UByte.class) { + String string = stream.readString(); + return (T) (string == null ? null : new UByte(string)); + } + else if (type == UShort.class) { + String string = stream.readString(); + return (T) (string == null ? null : new UShort(string)); + } + else if (type == UInteger.class) { + String string = stream.readString(); + return (T) (string == null ? null : new UInteger(string)); + } + else if (type == ULong.class) { + String string = stream.readString(); + return (T) (string == null ? null : new ULong(string)); + } // The type byte[] is handled earlier. byte[][] can be handled here else if (type.isArray()) { @@ -361,6 +386,9 @@ public final class FieldTypeHelper { // else if (type.isArray()) { // stream.writeArray(value); // } + else if (UNumber.class.isAssignableFrom(type)) { + stream.writeString(value.toString()); + } else if (ArrayRecord.class.isAssignableFrom(type)) { stream.writeArray(((ArrayRecord) value).createArray()); } @@ -451,6 +479,22 @@ public final class FieldTypeHelper { else if (type == Timestamp.class) { return (T) getTimestamp(configuration.getDialect(), rs, index); } + else if (type == UByte.class) { + String string = rs.getString(index); + return (T) (string == null ? null : new UByte(string)); + } + else if (type == UShort.class) { + String string = rs.getString(index); + return (T) (string == null ? null : new UShort(string)); + } + else if (type == UInteger.class) { + String string = rs.getString(index); + return (T) (string == null ? null : new UInteger(string)); + } + else if (type == ULong.class) { + String string = rs.getString(index); + return (T) (string == null ? null : new ULong(string)); + } // The type byte[] is handled earlier. byte[][] can be handled here else if (type.isArray()) { @@ -700,6 +744,22 @@ public final class FieldTypeHelper { else if (type == Timestamp.class) { return (T) stmt.getTimestamp(index); } + else if (type == UByte.class) { + String string = stmt.getString(index); + return (T) (string == null ? null : new UByte(string)); + } + else if (type == UShort.class) { + String string = stmt.getString(index); + return (T) (string == null ? null : new UShort(string)); + } + else if (type == UInteger.class) { + String string = stmt.getString(index); + return (T) (string == null ? null : new UInteger(string)); + } + else if (type == ULong.class) { + String string = stmt.getString(index); + return (T) (string == null ? null : new ULong(string)); + } // The type byte[] is handled earlier. byte[][] can be handled here else if (type.isArray()) { @@ -918,6 +978,18 @@ public final class FieldTypeHelper { SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return (T) new Timestamp(pgParseDate(string, f).getTime()); } + else if (type == UByte.class) { + return (T) new UByte(string); + } + else if (type == UShort.class) { + return (T) new UShort(string); + } + else if (type == UInteger.class) { + return (T) new UInteger(string); + } + else if (type == ULong.class) { + return (T) new ULong(string); + } else if (type.isArray()) { return (T) pgNewArray(type, string); } diff --git a/jOOQ/src/main/java/org/jooq/impl/SQLDataType.java b/jOOQ/src/main/java/org/jooq/impl/SQLDataType.java index c73762ed02..1cd91dd61e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SQLDataType.java +++ b/jOOQ/src/main/java/org/jooq/impl/SQLDataType.java @@ -58,6 +58,11 @@ import org.jooq.util.sqlite.SQLiteDataType; import org.jooq.util.sqlserver.SQLServerDataType; import org.jooq.util.sybase.SybaseDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** @@ -165,6 +170,30 @@ public final class SQLDataType extends AbstractDataType { */ public static final SQLDataType DECIMAL_INTEGER = new SQLDataType(BigInteger.class, "decimal_integer"); + // ------------------------------------------------------------------------- + // Unsigned integer types + // ------------------------------------------------------------------------- + + /** + * The unsigned {@link Types#TINYINT} type + */ + public static final SQLDataType TINYINTUNSIGNED = new SQLDataType(UByte.class, "tinyintunsigned"); + + /** + * The unsigned {@link Types#SMALLINT} type + */ + public static final SQLDataType SMALLINTUNSIGNED = new SQLDataType(UShort.class, "smallintunsigned"); + + /** + * The unsigned {@link Types#INTEGER} type + */ + public static final SQLDataType INTEGERUNSIGNED = new SQLDataType(UInteger.class, "integerunsigned"); + + /** + * The unsigned {@link Types#BIGINT} type + */ + public static final SQLDataType BIGINTUNSIGNED = new SQLDataType(ULong.class, "bigintunsigned"); + // ------------------------------------------------------------------------- // Floating point types // ------------------------------------------------------------------------- diff --git a/jOOQ/src/main/java/org/jooq/impl/TypeUtils.java b/jOOQ/src/main/java/org/jooq/impl/TypeUtils.java index 129ffd6d84..f054a48e17 100644 --- a/jOOQ/src/main/java/org/jooq/impl/TypeUtils.java +++ b/jOOQ/src/main/java/org/jooq/impl/TypeUtils.java @@ -35,6 +35,11 @@ */ package org.jooq.impl; +import static org.joou.Unsigned.ubyte; +import static org.joou.Unsigned.uint; +import static org.joou.Unsigned.ulong; +import static org.joou.Unsigned.ushort; + import java.lang.reflect.Array; import java.math.BigDecimal; import java.math.BigInteger; @@ -50,6 +55,11 @@ import java.util.Set; import org.jooq.exception.DataTypeException; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Utility methods for type conversions * @@ -230,6 +240,27 @@ final class TypeUtils { return (T) Long.valueOf(new BigDecimal(from.toString().trim()).longValue()); } } + + // ... this also includes unsigned number types + else if (toClass == UByte.class) { + return (T) ubyte(new BigDecimal(from.toString().trim()).shortValue()); + } + else if (toClass == UShort.class) { + return (T) ushort(new BigDecimal(from.toString().trim()).intValue()); + } + else if (toClass == UInteger.class) { + return (T) uint(new BigDecimal(from.toString().trim()).longValue()); + } + else if (toClass == ULong.class) { + if (java.util.Date.class.isAssignableFrom(fromClass)) { + return (T) ulong(((java.util.Date) from).getTime()); + } + else { + return (T) ulong(new BigDecimal(from.toString().trim()).toBigInteger().toString()); + } + } + + // ... and floating point / fixed point types else if (toClass == Float.class || toClass == float.class) { return (T) Float.valueOf(from.toString().trim()); } diff --git a/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDataType.java b/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDataType.java index 6da2b23ac6..2e28ffdae5 100644 --- a/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDataType.java +++ b/jOOQ/src/main/java/org/jooq/util/mysql/MySQLDataType.java @@ -47,6 +47,11 @@ import org.jooq.SQLDialect; import org.jooq.impl.AbstractDataType; import org.jooq.impl.SQLDataType; +import org.joou.UByte; +import org.joou.UInteger; +import org.joou.ULong; +import org.joou.UShort; + /** * Supported data types for the {@link SQLDialect#MYSQL} dialect * @@ -66,11 +71,17 @@ public class MySQLDataType extends AbstractDataType { // ------------------------------------------------------------------------- public static final MySQLDataType TINYINT = new MySQLDataType(SQLDataType.TINYINT, "tinyint", "signed"); + public static final MySQLDataType TINYINTUNSIGNED = new MySQLDataType(SQLDataType.TINYINTUNSIGNED, "tinyintunsigned", "unsigned"); public static final MySQLDataType SMALLINT = new MySQLDataType(SQLDataType.SMALLINT, "smallint", "signed"); + public static final MySQLDataType SMALLINTUNSIGNED = new MySQLDataType(SQLDataType.SMALLINTUNSIGNED, "smallintunsigned", "unsigned"); public static final MySQLDataType INT = new MySQLDataType(SQLDataType.INTEGER, "int", "signed"); + public static final MySQLDataType INTUNSIGNED = new MySQLDataType(SQLDataType.INTEGERUNSIGNED, "intunsigned", "unsigned"); public static final MySQLDataType MEDIUMINT = new MySQLDataType(SQLDataType.INTEGER, "mediumint", "signed"); + public static final MySQLDataType MEDIUMINTUNSIGNED= new MySQLDataType(SQLDataType.INTEGERUNSIGNED, "mediumintunsigned", "unsigned"); public static final MySQLDataType INTEGER = new MySQLDataType(SQLDataType.INTEGER, "integer", "signed"); + public static final MySQLDataType INTEGERUNSIGNED = new MySQLDataType(SQLDataType.INTEGERUNSIGNED, "integerunsigned", "unsigned"); public static final MySQLDataType BIGINT = new MySQLDataType(SQLDataType.BIGINT, "bigint", "signed"); + public static final MySQLDataType BIGINTUNSIGNED = new MySQLDataType(SQLDataType.BIGINTUNSIGNED, "bigintunsigned", "unsigned"); public static final MySQLDataType DOUBLE = new MySQLDataType(SQLDataType.DOUBLE, "double", "decimal"); public static final MySQLDataType FLOAT = new MySQLDataType(SQLDataType.FLOAT, "float", "decimal"); public static final MySQLDataType REAL = new MySQLDataType(SQLDataType.REAL, "real", "decimal");