Skip to content
Snippets Groups Projects
Commit 770cfdec authored by gmantele's avatar gmantele Committed by GitHub
Browse files

Fixed bug with CROSS JOINs in SQLServerTranslator

Merge pull request #35 from vforchi/master
parents bae21b07 0eb4445d
Branches
No related tags found
No related merge requests found
......@@ -12,13 +12,14 @@ dependencies {
compile 'javax.servlet:javax.servlet-api:3.0.1'
compile 'postgresql:postgresql:9.1-901.jdbc4'
testCompile 'simple-jndi:simple-jndi:0.11.4.1'
testCompile 'junit:junit:4.12'
testCompile 'org.xerial:sqlite-jdbc:3.16.1'
testCompile 'com.h2database:h2:1.4.193'
testCompile 'com.vividsolutions:jts-core:1.14.0'
testCompile 'org.locationtech.spatial4j:spatial4j:0.6'
testCompile fileTree(dir: 'lib', include: 'astroh2-0.3.jar')
testRuntime 'simple-jndi:simple-jndi:0.11.4.1'
testRuntime 'com.vividsolutions:jts-core:1.14.0'
testRuntime 'org.locationtech.spatial4j:spatial4j:0.6'
testRuntime 'org.xerial:sqlite-jdbc:3.16.1'
}
compileJava {
......
......@@ -252,7 +252,7 @@ public class SQLServerTranslator extends JDBCTranslator {
}
}
// DEFAULT CASE:
else
else if (join.getJoinCondition() != null)
sql.append(translate(join.getJoinCondition()));
return sql.toString();
......
......@@ -282,7 +282,7 @@ public class TestFunctionDef {
// TEST :: With a function having the same name, but a different return type: [EQUAL}
assertEquals(0, def1.compareTo(new FunctionDef("fct1", new DBType(DBDatatype.INTEGER))));
// TEST :: With a function having the same name, but 2 parameters: [LESS (4 characters: ø against 1010)]
// TEST :: With a function having the same name, but 2 parameters: [LESS (4 characters: 0 against 1010)]
assertEquals(-6, def1.compareTo(new FunctionDef("fct1", new DBType(DBDatatype.INTEGER), new FunctionParam[]{new FunctionParam("foo", new DBType(DBDatatype.INTEGER)),new FunctionParam("foo", new DBType(DBDatatype.INTEGER))})));
// DEFINITION 1 :: fct1(foo1 CHAR(12), foo2 DOUBLE) -> VARCHAR
......
......@@ -70,7 +70,7 @@ public class MetadataExtractionTest {
resultat = statement.executeQuery(requet);
}catch(SQLException e){
e.printStackTrace();
System.out.println("Erreur dans la requête: " + requet);
System.out.println("Error in the request: " + requet);
}
return resultat;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment