[#1257] Add CUBRID support - Fixed some issues
This commit is contained in:
parent
0eb930cceb
commit
6a308ddf92
@ -865,8 +865,7 @@ extends BaseTest<A, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658, T725
|
||||
later = create().selectFrom(TBook()).orderBy(TBook_ID()).fetchLater();
|
||||
later = create().selectFrom(TBook()).orderBy(TBook_ID()).fetchLater();
|
||||
later = create().selectFrom(TBook()).orderBy(TBook_ID()).fetchLater();
|
||||
later = create().selectFrom(TBook()).orderBy(TBook_ID()).fetchLater();
|
||||
assertEquals(activeCount + 4, Thread.activeCount());
|
||||
assertEquals(activeCount + 3, Thread.activeCount());
|
||||
|
||||
// This should be enough to ensure that GC will collect finished threads
|
||||
later = null;
|
||||
|
||||
@ -854,7 +854,7 @@ extends BaseTest<A, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658, T725
|
||||
Field<?> user = trim(lower(currentUser()));
|
||||
Record record = create().select(user).fetchOne();
|
||||
|
||||
assertTrue(Arrays.asList("test", "db2admin", "sa", "root@localhost", "postgres", "dbo", "dba")
|
||||
assertTrue(Arrays.asList("test", "db2admin", "sa", "root@localhost", "postgres", "dbo", "dba", "dba@lukas-hp")
|
||||
.contains(record.getValue(user)));
|
||||
}
|
||||
|
||||
|
||||
@ -193,6 +193,7 @@ extends BaseTest<A, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658, T725
|
||||
// databases is non-trivial in some of them.
|
||||
switch (getDialect()) {
|
||||
case ASE:
|
||||
case CUBRID:
|
||||
case DB2:
|
||||
case DERBY:
|
||||
case H2:
|
||||
|
||||
@ -370,7 +370,7 @@ public class jOOQCUBRIDTest extends jOOQAbstractTest<
|
||||
|
||||
@Override
|
||||
protected TableField<T_639NumbersTableRecord, Byte> T639_BYTE() {
|
||||
return T_639NumbersTable.BYTE;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -57,6 +57,7 @@ import java.sql.Types;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -512,7 +513,10 @@ public final class FieldTypeHelper {
|
||||
Date date = rs.getDate(index);
|
||||
|
||||
if (date != null) {
|
||||
date = new Date((rs.getDate(index).getTime() / 1000) * 1000);
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTimeInMillis(date.getTime());
|
||||
cal.set(Calendar.MILLISECOND, 0);
|
||||
date = new Date(cal.getTimeInMillis());
|
||||
}
|
||||
|
||||
return date;
|
||||
@ -534,7 +538,25 @@ public final class FieldTypeHelper {
|
||||
}
|
||||
|
||||
return null;
|
||||
} else {
|
||||
}
|
||||
|
||||
// Cubrid SQL dates are incorrectly fetched. Reset milliseconds...
|
||||
// See http://jira.cubrid.org/browse/APIS-159
|
||||
// See https://sourceforge.net/apps/trac/cubridinterface/ticket/140
|
||||
else if (dialect == CUBRID) {
|
||||
Time time = rs.getTime(index);
|
||||
|
||||
if (time != null) {
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTimeInMillis(time.getTime());
|
||||
cal.set(Calendar.MILLISECOND, 0);
|
||||
time = new Time(cal.getTimeInMillis());
|
||||
}
|
||||
|
||||
return time;
|
||||
}
|
||||
|
||||
else {
|
||||
return rs.getTime(index);
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,7 +147,6 @@ class Val<T> extends AbstractField<T> implements Param<T>, BindingProvider {
|
||||
case DERBY:
|
||||
|
||||
// These dialects have some trouble, when they mostly get it right.
|
||||
case CUBRID:
|
||||
case H2:
|
||||
case HSQLDB:
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user