[#430] Add support for the Firebird database - Changed connection URL to

fix binding of null values
This commit is contained in:
Lukas Eder 2012-08-25 11:35:44 +02:00
parent 0af655949c
commit f2ff0c77e2
4 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
#example properties file
jdbc.Driver=org.firebirdsql.jdbc.FBDriver
jdbc.URL=jdbc:firebirdsql:local:C:/data/firebird/test.db
jdbc.URL=jdbc:firebirdsql:localhost:C:/data/firebird/test.db
jdbc.User=TEST
jdbc.Password=TEST

View File

@ -2,7 +2,7 @@
<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-2.1.0.xsd">
<jdbc>
<driver>org.firebirdsql.jdbc.FBDriver</driver>
<url>jdbc:firebirdsql:local:C:/data/firebird/test.db</url>
<url>jdbc:firebirdsql:localhost:C:/data/firebird/test.db</url>
<properties>
<property>
<key>user</key>

View File

@ -36,6 +36,7 @@
package org.jooq.test._.testcases;
import static junit.framework.Assert.assertEquals;
import static org.jooq.SQLDialect.FIREBIRD;
import org.jooq.TableRecord;
import org.jooq.UpdatableRecord;
@ -72,6 +73,11 @@ extends BaseTest<A, AP, B, S, B2S, BS, L, X, DATE, BOOL, D, T, U, I, IPK, T658,
@Test
public void testConcurrentExecution() throws Exception {
if (getDialect() == FIREBIRD) {
log.info("SKIPPING", "Thread-safety tests. This can crash Firebird");
return;
}
// This test is an adapted version of a test case contributed by
// Sergey Epik for [#1543]

View File

@ -59,7 +59,6 @@ import java.util.Arrays;
import org.jooq.ArrayRecord;
import org.jooq.BindContext;
import org.jooq.Context;
import org.jooq.Converter;
import org.jooq.DataType;
import org.jooq.EnumType;
@ -541,7 +540,7 @@ class Val<T> extends AbstractField<T> implements Param<T> {
public final void bind(BindContext context) {
// [#1302] Bind value only if it was not explicitly forced to be inlined
if (!isInline(context)) {
if (!isInline()) {
context.bindValue(getValue(), getType());
}
}
@ -585,12 +584,7 @@ class Val<T> extends AbstractField<T> implements Param<T> {
return inline;
}
private final boolean isInline(Context<?> context) {
// It looks as though jaybird cannot properly bind NULL!
return isInline() || (context.getDialect() == FIREBIRD && value == null);
}
private final boolean isInline(RenderContext context) {
return isInline((Context<?>) context) || context.inline();
return isInline() || context.inline();
}
}