Merged release fixes from pro distribution

This commit is contained in:
Lukas Eder 2013-10-09 19:28:25 +02:00
parent 2f1c103a92
commit fc7afb4076
19 changed files with 118 additions and 73 deletions

View File

@ -46,7 +46,6 @@ import static org.jooq.impl.DSL.count;
import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.table;
import static org.jooq.test.h2.generatedclasses.Tables.T_2698;
import static org.jooq.test.h2.generatedclasses.Tables.T_785;
import static org.jooq.test.h2.generatedclasses.Tables.T_AUTHOR;
import static org.jooq.test.h2.generatedclasses.Tables.T_BOOK;
import static org.jooq.test.h2.generatedclasses.Tables.T_BOOK_STORE;
@ -110,6 +109,7 @@ import org.jooq.test.h2.generatedclasses.tables.TTriggers;
import org.jooq.test.h2.generatedclasses.tables.TUnsigned;
import org.jooq.test.h2.generatedclasses.tables.T_639NumbersTable;
import org.jooq.test.h2.generatedclasses.tables.T_725LobTest;
import org.jooq.test.h2.generatedclasses.tables.T_785;
import org.jooq.test.h2.generatedclasses.tables.VLibrary;
import org.jooq.test.h2.generatedclasses.tables.daos.TAuthorDao;
import org.jooq.test.h2.generatedclasses.tables.daos.T_2698Dao;

View File

@ -257,8 +257,8 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, UU, I, IPK, T7
assertEquals(3, (int) entry22.getValue().get(0).getValue(TBook_ID()));
assertEquals(4, (int) entry22.getValue().get(1).getValue(TBook_ID()));
assertFalse(it.hasNext());
assertFalse(it.hasNext());
// Key -> Value Map
// ----------------

View File

@ -41,6 +41,7 @@
package org.jooq.impl;
import static java.util.Arrays.asList;
// ...
import static org.jooq.conf.ParamType.INDEXED;
import static org.jooq.conf.ParamType.INLINED;
import static org.jooq.conf.ParamType.NAMED;
@ -353,8 +354,14 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
xx xxxxxxxxxxxxx xxx xx xxx xxxx xx xxxxxx xxx xxxxx xxxxxxx xxxxxxxx
xx xxxxxxxxxx x xxxxxxx xxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxx
xx xxxxx xxxxxxxxxx xxxxxxx
xxxxxxxxxxx xx xxx xxxxxxxx xxxx x xxxx xxxxx xxxxxxx xx xxxx x x xxxxxxxxxxxxxxxxxxxxxxxx
xx xxxxx xxxxxxxxxx xxxxxxx x
xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xx xxxxxxx x
xxxxxxxxxxx xx xxx xxxxxxxx xxxx x xxxx xxxxx xxxxxxx xx xxxx x x xxxxxxxxxxxxxxxxxxxxxx x x xxxxx
x
xxxx x
xxxxxxxxxxx xx xxx xxxxxxxx xxxx x xxxx xxxxx xxxxxxx xx xxxx x x xxxxxxxxxxxxxxxxxxxxxxxx
x
x
xx xxxxxxxx xx xx [/pro] */

View File

@ -108,10 +108,10 @@ class FetchCount extends AbstractResultQuery<Record1<Integer>> {
return null;
}
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public final Class<? extends Record1<Integer>> getRecordType() {
return (Class<? extends Record1<Integer>>) RecordImpl.class;
return (Class) RecordImpl.class;
}
@Override

View File

@ -105,10 +105,10 @@ class GenerateSeries extends AbstractTable<Record1<Integer>> {
}
}
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public final Class<? extends Record1<Integer>> getRecordType() {
return (Class<? extends Record1<Integer>>) RecordImpl.class;
return (Class) RecordImpl.class;
}
@Override

View File

@ -51,7 +51,10 @@ import java.sql.PreparedStatement;
import java.sql.Time;
import java.sql.Timestamp;
import junit.framework.Assert;
import org.jooq.BindContext;
import org.jooq.Constants;
import org.jooq.DSLContext;
import org.jooq.RenderContext;
import org.jooq.Result;
@ -180,5 +183,25 @@ public abstract class AbstractTest {
protected final String zeroTimestamp() {
return new Timestamp(0).toString();
}
protected static void assertEquals(int expected, int actual) {
Assert.assertEquals(expected, actual);
}
protected static void assertEquals(Object expected, Object actual) {
if (actual instanceof String) {
actual = ((String) actual).replace(" -- SQL rendered with a free trial version of jOOQ " + Constants.FULL_VERSION, "");
}
Assert.assertEquals(expected, actual);
}
protected static void assertEquals(String message, Object expected, Object actual) {
if (actual instanceof String) {
actual = ((String) actual).replace(" -- SQL rendered with a free trial version of jOOQ " + Constants.FULL_VERSION, "");
}
Assert.assertEquals(message, expected, actual);
}
}

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static junit.framework.Assert.assertEquals;
import static org.jooq.JoinType.LEFT_OUTER_JOIN;
import static org.jooq.conf.ParamType.INLINED;
import static org.jooq.impl.DSL.any;

View File

@ -40,14 +40,12 @@
*/
package org.jooq.test;
import static org.junit.Assert.assertEquals;
import org.jooq.BindContext;
import org.jooq.RenderContext;
import org.jooq.exception.DataAccessException;
import org.jooq.impl.CustomCondition;
import org.junit.Test;
import org.jooq.BindContext;
import org.jooq.RenderContext;
import org.jooq.exception.DataAccessException;
import org.jooq.impl.CustomCondition;
import org.junit.Test;
/**
* Some common tests related to {@link RenderContext}

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static org.jooq.test.data.Table1.FIELD_ID1;
import static org.junit.Assert.assertEquals;
import org.jooq.impl.SQLDataType;

View File

@ -40,21 +40,20 @@
*/
package org.jooq.test;
import static org.jooq.tools.reflect.Reflect.wrapper;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import org.jooq.tools.Convert;
import org.junit.Test;
import static org.jooq.tools.reflect.Reflect.wrapper;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
import org.jooq.tools.Convert;
import org.junit.Test;
/**
* Unit tests for data type conversion

View File

@ -40,17 +40,16 @@
*/
package org.jooq.test;
import static junit.framework.Assert.assertEquals;
import static org.jooq.impl.DSL.val;
import org.jooq.BindContext;
import org.jooq.QueryPart;
import org.jooq.RenderContext;
import org.jooq.impl.CustomQueryPart;
import org.jooq.impl.DSL;
import org.jmock.Expectations;
import org.junit.Test;
import static org.jooq.impl.DSL.val;
import org.jooq.BindContext;
import org.jooq.QueryPart;
import org.jooq.RenderContext;
import org.jooq.impl.CustomQueryPart;
import org.jooq.impl.DSL;
import org.jmock.Expectations;
import org.junit.Test;
/**
* Test cases for custom {@link QueryPart}s.

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertTrue;
import static org.jooq.impl.DSL.fieldByName;
import static org.jooq.impl.DSL.val;

View File

@ -40,11 +40,11 @@
*/
package org.jooq.test;
import org.jooq.impl.DSL;
import org.jooq.test.init.SeparateClassloaderTestRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.jooq.impl.DSL;
import org.jooq.test.init.SeparateClassloaderTestRunner;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(SeparateClassloaderTestRunner.class)
public class InitialisationTest {

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNull;
import static junit.framework.Assert.fail;
import static org.jooq.impl.DSL.val;

View File

@ -41,17 +41,16 @@
package org.jooq.test;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.fail;
import org.jooq.test.data.Table1;
import org.jooq.test.data.Table1Record;
import org.jooq.test.data.Table2;
import org.jooq.test.data.Table2Record;
import org.jooq.test.data.Table4;
import org.jooq.test.data.Table4Record;
import org.junit.Test;
import static junit.framework.Assert.fail;
import org.jooq.test.data.Table1;
import org.jooq.test.data.Table1Record;
import org.jooq.test.data.Table2;
import org.jooq.test.data.Table2Record;
import org.jooq.test.data.Table4;
import org.jooq.test.data.Table4Record;
import org.junit.Test;
/**

View File

@ -40,14 +40,12 @@
*/
package org.jooq.test;
import static org.junit.Assert.assertEquals;
import org.jooq.BindContext;
import org.jooq.RenderContext;
import org.jooq.exception.DataAccessException;
import org.jooq.impl.CustomCondition;
import org.junit.Test;
import org.jooq.BindContext;
import org.jooq.RenderContext;
import org.jooq.exception.DataAccessException;
import org.jooq.impl.CustomCondition;
import org.junit.Test;
/**
* Some common tests related to {@link RenderContext}

View File

@ -48,7 +48,6 @@ import static org.jooq.conf.RenderKeywordStyle.LOWER;
import static org.jooq.conf.RenderKeywordStyle.UPPER;
import static org.jooq.conf.StatementType.STATIC_STATEMENT;
import static org.jooq.impl.DSL.val;
import static org.junit.Assert.assertEquals;
import org.jooq.DSLContext;
import org.jooq.Field;

View File

@ -41,7 +41,6 @@
package org.jooq.test;
import static java.util.Arrays.asList;
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.fail;
import static org.jooq.Clause.CONDITION;
import static org.jooq.Clause.CONDITION_AND;

View File

@ -6,12 +6,24 @@ select 'A';
> A
@ rows: 1
select 'A' -- SQL rendered with a free trial version of jOOQ 3.2.0;
> A
> -
> A
@ rows: 1
select 'A', 'B';
> A B
> - -
> A B
@ rows: 1
select 'A', 'B' -- SQL rendered with a free trial version of jOOQ 3.2.0;
> A B
> - -
> A B
@ rows: 1
select "TABLE1"."ID1", "TABLE1"."NAME1" from "TABLE1";
> ID1 NAME1
> --- -----
@ -19,6 +31,13 @@ select "TABLE1"."ID1", "TABLE1"."NAME1" from "TABLE1";
> 2 Y
@ rows: 2
select "TABLE1"."ID1", "TABLE1"."NAME1" from "TABLE1" -- SQL rendered with a free trial version of jOOQ 3.2.0;
> ID1 NAME1
> --- -----
> 1 X
> 2 Y
@ rows: 2
select "TABLE2"."ID2", "TABLE2"."NAME2" from "TABLE2";
> +---+-----+
> |ID2|NAME2|
@ -28,6 +47,15 @@ select "TABLE2"."ID2", "TABLE2"."NAME2" from "TABLE2";
> +---+-----+
@ rows: 2
select "TABLE2"."ID2", "TABLE2"."NAME2" from "TABLE2" -- SQL rendered with a free trial version of jOOQ 3.2.0;
> +---+-----+
> |ID2|NAME2|
> +---+-----+
> |1 |X |
> |2 |Y |
> +---+-----+
@ rows: 2
# [#2280] Check if "advanced" CSV content can be handled, too
select complex_data;
> F1 F2 F3 is a bit more complex