Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade mysql connector to 8.0.22 - fix test table creation #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ private GreatGrandChildTable() {

public final TableField<Record, Integer> parent_id = createPKAndFKField("parent_id", SQLDataType.INTEGER, ParentTable.INSTANCE.id);
public final TableField<Record, String> grandchild_color = createPKAndFKField("grandchild_color", SQLDataType.VARCHAR.length(10), GrandChildTable.INSTANCE.color);
public final TableField<Record, String> name = createPKField("name", SQLDataType.VARCHAR.length(40));
public final TableField<Record, String> name = createPKField("name", SQLDataType.VARCHAR.length(40).identity(true));

@Override
public GreatGrandChildTable as(String alias) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ChildTable extends AbstractDataTable<ChildTable> {
public static final ChildTable INSTANCE = new ChildTable("ChildTable");

final TableField<Record, Integer> parent_id = createPKAndFKField("parent_id", SQLDataType.INTEGER, ParentTable.INSTANCE.id);
final TableField<Record, Integer> ordinal = createPKField("ordinal", SQLDataType.INTEGER);
final TableField<Record, Integer> ordinal = createPKField("ordinal", SQLDataType.INTEGER.identity(true));
final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR(64));

public ChildTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class GrandParentTable extends AbstractDataTable<GrandParentTable> {

public static final GrandParentTable INSTANCE = new GrandParentTable("GrandParentTable");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));

public GrandParentTable(String name) {
super(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public void insert() {

private static class TestTable extends AbstractDataTable<TestTable> {

private final TableField<Record, Integer> type = createPKField("type", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> type = createPKField("type", SQLDataType.INTEGER.identity(true));
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));

public TestTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public class ChildForTestTable extends AbstractDataTable<ChildForTestTable> {

public static final ChildForTestTable INSTANCE = new ChildForTestTable("ChildForTest");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, String> field = createPKField("field", SQLDataType.VARCHAR(50));
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, String> field = createPKField("field", SQLDataType.VARCHAR(50).nullable(false));
final TableField<Record, Integer> parent_id = createFKField("parent_id", EntityForTestTable.INSTANCE.id);

public ChildForTestTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private DeadlockRetryer createDataBaseRetryer(int maxDeadlockRetries) {

private static class TestTable extends AbstractDataTable<TestTable> {

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field = createField("field", SQLDataType.VARCHAR.length(50));

public TestTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,8 @@ public void fetchCountGroupingByFieldsOfParentWithConditionOnParent() {
private static class TestTable extends AbstractDataTable<TestTable> {
private static final TestTable INSTANCE = new TestTable("test");

private final TableField<Record, Integer> type = createPKField("type", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> type = createPKField("type", SQLDataType.INTEGER.identity(true));
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));
private final TableField<Record, String> enum_field = createField("enum_field", SQLDataType.VARCHAR.length(50));
private final TableField<Record, Integer> parent_id = createFKField("parent_id", TestParentTable.INSTANCE.id);
Expand All @@ -529,7 +529,7 @@ public TestTable as(String alias) {
private static class TestParentTable extends AbstractDataTable<TestParentTable> {
private static final TestParentTable INSTANCE = new TestParentTable("testParent");

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));
private final TableField<Record, String> field2 = createField("field2", SQLDataType.VARCHAR.length(50));

Expand All @@ -550,7 +550,7 @@ public TestParentTable as(String alias) {
private static class TestParentSecondaryTable extends AbstractDataTable<TestParentSecondaryTable> {
private static final TestParentSecondaryTable INSTANCE = new TestParentSecondaryTable("testParentSecondary");

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));
private final TableField<Record, String> field2 = createField("field2", SQLDataType.VARCHAR.length(50));
private final TableField<Record, Integer> parent_id = createFKField("parent_id", TestParentTable.INSTANCE.id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ private List<CurrentEntityState> sortByField1(List<CurrentEntityState> entities)
private static class TestTable extends AbstractDataTable<TestTable> {
private static final TestTable INSTANCE = new TestTable("test");

private final TableField<Record, Integer> id1 = createPKField("id1", SQLDataType.INTEGER);
private final TableField<Record, Integer> id2 = createPKField("id2", SQLDataType.INTEGER);
private final TableField<Record, Integer> id3 = createPKField("id3", SQLDataType.INTEGER);
private final TableField<Record, Integer> id1 = createPKField("id1", SQLDataType.INTEGER.identity(true));
private final TableField<Record, Integer> id2 = createPKField("id2", SQLDataType.INTEGER.identity(true));
private final TableField<Record, Integer> id3 = createPKField("id3", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));

public TestTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public void fetchVirtualField() {

private static class TestTable extends AbstractDataTable<TestTable> {

private final TableField<Record, Integer> type = createPKField("type", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> type = createPKField("type", SQLDataType.INTEGER.identity(true));
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));

public TestTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public class EntityForTestComplexKeyParentTable extends AbstractDataTable<Entity

public static final EntityForTestComplexKeyParentTable INSTANCE = new EntityForTestComplexKeyParentTable("EntityForTestComplexKeyParent");

final TableField<Record, Integer> id1 = createPKField("id1", SQLDataType.INTEGER);
final TableField<Record, Integer> id2 = createPKField("id2", SQLDataType.INTEGER);
final TableField<Record, Integer> id1 = createPKField("id1", SQLDataType.INTEGER.identity(true));
final TableField<Record, Integer> id2 = createPKField("id2", SQLDataType.INTEGER.identity(true));
final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));

public EntityForTestComplexKeyParentTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class EntityForTestParentTable extends AbstractDataTable<EntityForTestPar

public static final EntityForTestParentTable INSTANCE = new EntityForTestParentTable("EntityForTestParent");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));

public EntityForTestParentTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class EntityForTestSecondaryTable extends AbstractDataTable<EntityForTest

public static final EntityForTestSecondaryTable INSTANCE = new EntityForTestSecondaryTable("SECONDARY_DUMMY");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, Integer> entityId = createFKField("entity_id", EntityForTestTable.INSTANCE.id);
final TableField<Record, String> url = createField("entity_url", SQLDataType.VARCHAR.length(100).nullable(false));
final TableField<Record, String> url_param = createField("url_param", SQLDataType.VARCHAR.length(100));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public void selectWithoutFieldsShouldThrowException() {
private static class TestTable extends AbstractDataTable<TestTable> {
private static final TestTable INSTANCE = new TestTable("test");

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));
private final TableField<Record, Integer> parent_id = createFKField("parent_id", TestParentTable.INSTANCE.id);

Expand All @@ -296,7 +296,7 @@ public TestTable as(String alias) {
private static class TestParentTable extends AbstractDataTable<TestParentTable> {
private static final TestParentTable INSTANCE = new TestParentTable("testParent");

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));
private final TableField<Record, String> field2 = createField("field2", SQLDataType.VARCHAR.length(50));

Expand All @@ -317,7 +317,7 @@ public TestParentTable as(String alias) {
private static class TestParentSecondaryTable extends AbstractDataTable<TestParentSecondaryTable> {
private static final TestParentSecondaryTable INSTANCE = new TestParentSecondaryTable("testParentSecondary");

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR.length(50));
private final TableField<Record, Integer> parent_id = createFKField("parent_id", TestParentTable.INSTANCE.id);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private void waitTasks(Future<?> task1, Future<?> task2) {

private static class TestTable extends AbstractDataTable<TestTable> {

private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
private final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
private final TableField<Record, String> field = createField("field", SQLDataType.VARCHAR.length(50));

public TestTable(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ChildTable extends AbstractDataTable<ChildTable> {

public static final ChildTable INSTANCE = new ChildTable("ChildTable");

public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true).identity(true));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate call to identity()

public final TableField<Record, String> type = createFKField("type", ParentTable.INSTANCE.type);
public final TableField<Record, Integer> idInTarget = createFKField("idInTarget", ParentTable.INSTANCE.idInTarget);
public final TableField<Record, Integer> ordinal = createField("ordinal", SQLDataType.INTEGER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class ParentTable extends AbstractDataTable<ParentTable> {

public static final ParentTable INSTANCE = new ParentTable("ParentTable");

public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true).identity(true));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

public final TableField<Record, String> type = createField("type", SQLDataType.VARCHAR(40));
public final TableField<Record, Integer> idInTarget = createField("idInTarget", SQLDataType.INTEGER);
public final TableField<Record, String> name = createField("name", SQLDataType.VARCHAR(40));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ChildTable extends AbstractDataTable<ChildTable> {
public final TableField<Record, Integer> parent_id = createFKField("parent_id", ParentTable.INSTANCE.id);
public final TableField<Record, Integer> ordinal = createField("ordinal", SQLDataType.INTEGER);
public final TableField<Record, String> field1 = createField("field1", SQLDataType.VARCHAR(64));
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));

public ChildTable(String name) {
super(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private GrandChildTable() {
}

public final TableField<Record, Integer> child_id = createPKAndFKField("child_id", SQLDataType.INTEGER, ChildTable.INSTANCE.id);
public final TableField<Record, String> color = createPKField("color", SQLDataType.VARCHAR.length(10));
public final TableField<Record, String> color = createPKField("color", SQLDataType.VARCHAR.length(10).identity(true));

@Override
public GrandChildTable as(String alias) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class OtherChildTable extends AbstractDataTable<OtherChildTable> {

public final TableField<Record, Integer> parent_id = createFKField("parent_id", ParentTable.INSTANCE.id);
public final TableField<Record, String> name = createField("name", SQLDataType.VARCHAR(64));
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));

public OtherChildTable(String name) {
super(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public class ParentTable extends AbstractDataTable<ParentTable> {

public static final ParentTable INSTANCE = new ParentTable("ParentTable");

public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
public final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
public final TableField<Record, Integer> idInTarget = createField("idInTarget", SQLDataType.INTEGER);
public final TableField<Record, String> name = createField("name", SQLDataType.VARCHAR(40));
public final TableField<Record, String> enum_field = createField("enum_field", SQLDataType.VARCHAR(40));
public final TableField<Record, String> enum_field = createField("enum_field", SQLDataType.VARCHAR(40).nullable(false));

public ParentTable(String name) {
super(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ private static class Table0 extends AbstractDataTable<Table0> {

static final Table0 INSTANCE = new Table0("entity0");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, Integer> entity12_id = createFKField("entity12_id", Table12.INSTANCE.id);
final TableField<Record, Integer> entity11_id = createFKField("entity11_id", Table11.INSTANCE.id);

Expand All @@ -164,7 +164,7 @@ private static class Table11 extends AbstractDataTable<Table11> {

static final Table11 INSTANCE = new Table11("entity11");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));

Table11(String name) {
super(name);
Expand All @@ -184,7 +184,7 @@ private static class Table12 extends AbstractDataTable<Table12> {

static final Table12 INSTANCE = new Table12("entity12");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, Integer> entity2_id = createFKField("entity2_id", Table2.INSTANCE.id);

Table12(String name) {
Expand All @@ -205,8 +205,8 @@ private static class Table2 extends AbstractDataTable<Table2> {

static final Table2 INSTANCE = new Table2("entity2");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, String> name = createPKField("name", SQLDataType.VARCHAR(20));
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, String> name = createPKField("name", SQLDataType.VARCHAR(20).nullable(false));
final TableField<Record, Integer> entity3_id = createFKField("entity3_id", Table3.INSTANCE.id);
final TableField<Record, Integer> entity11_id = createFKField("entity11_id", Table11.INSTANCE.id);

Expand All @@ -228,7 +228,7 @@ private static class Table3 extends AbstractDataTable<Table3> {

static final Table3 INSTANCE = new Table3("entity3");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, String> name = createField("name", SQLDataType.VARCHAR(20));

Table3(String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class MainTable extends AbstractDataTable<MainTable> {

public static final MainTable INSTANCE = new MainTable("main");

final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER);
final TableField<Record, Integer> id = createPKField("id", SQLDataType.INTEGER.identity(true));
final TableField<Record, Integer> id_in_target = createField("id_in_target", SQLDataType.INTEGER);
final TableField<Record, String> name = createField("name", SQLDataType.VARCHAR.length(50));
final TableField<Record, String> type = createField("type", SQLDataType.VARCHAR.length(10));
Expand Down
Loading