summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2009-05-29 03:09:41 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2009-05-29 03:09:41 +0000
commit2a058943cfc469997a1ba1c92330e16ed9ccee7f (patch)
tree79f09779a21bcb1779a433b35397bb416092550a
parentaeab15c5c14b3d9de43bb5f97c368694b6f7625e (diff)
downloadjackcess-2a058943cfc469997a1ba1c92330e16ed9ccee7f.tar.gz
jackcess-2a058943cfc469997a1ba1c92330e16ed9ccee7f.zip
use join syntax closer to access
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@395 f203690c-595d-4dc9-a70b-905162fa7fd2
-rw-r--r--src/java/com/healthmarketscience/jackcess/query/QueryFormat.java4
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/query/QueryTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/query/QueryFormat.java b/src/java/com/healthmarketscience/jackcess/query/QueryFormat.java
index ac58727..d54a567 100644
--- a/src/java/com/healthmarketscience/jackcess/query/QueryFormat.java
+++ b/src/java/com/healthmarketscience/jackcess/query/QueryFormat.java
@@ -128,8 +128,8 @@ public class QueryFormat
new HashMap<Short,String>();
static {
JOIN_TYPE_MAP.put((short)1, " INNER JOIN ");
- JOIN_TYPE_MAP.put((short)2, " LEFT OUTER JOIN ");
- JOIN_TYPE_MAP.put((short)3, " RIGHT OUTER JOIN ");
+ JOIN_TYPE_MAP.put((short)2, " LEFT JOIN ");
+ JOIN_TYPE_MAP.put((short)3, " RIGHT JOIN ");
}
}
diff --git a/test/src/java/com/healthmarketscience/jackcess/query/QueryTest.java b/test/src/java/com/healthmarketscience/jackcess/query/QueryTest.java
index d1f8eac..751fbb4 100644
--- a/test/src/java/com/healthmarketscience/jackcess/query/QueryTest.java
+++ b/test/src/java/com/healthmarketscience/jackcess/query/QueryTest.java
@@ -203,7 +203,7 @@ public class QueryTest extends TestCase
expectedQueries.put(
"SelectQuery", multiline(
"SELECT DISTINCT Table1.*, Table2.col1, Table2.col2, Table3.col3",
- "FROM (Table1 LEFT OUTER JOIN Table3 ON Table1.col1 = Table3.col1) INNER JOIN Table2 ON (Table3.col1 = Table2.col1) AND (Table3.col1 = Table2.col2)",
+ "FROM (Table1 LEFT JOIN Table3 ON Table1.col1 = Table3.col1) INNER JOIN Table2 ON (Table3.col1 = Table2.col1) AND (Table3.col1 = Table2.col2)",
"WHERE (((Table2.col2)=\"foo\" Or (Table2.col2) In (\"buzz\",\"bazz\")))",
"ORDER BY Table2.col1;"));
expectedQueries.put(
@@ -225,7 +225,7 @@ public class QueryTest extends TestCase
expectedQueries.put(
"MakeTableQuery",multiline(
"SELECT Max(Table2.col1) AS MaxOfcol1, Table2.col2, Table3.col2 INTO Table4",
- "FROM (Table2 INNER JOIN Table1 ON Table2.col1 = Table1.col2) RIGHT OUTER JOIN Table3 ON Table1.col2 = Table3.col3",
+ "FROM (Table2 INNER JOIN Table1 ON Table2.col1 = Table1.col2) RIGHT JOIN Table3 ON Table1.col2 = Table3.col3",
"GROUP BY Table2.col2, Table3.col2",
"HAVING (((Max(Table2.col1))=\"buzz\") AND ((Table2.col2)<>\"blah\"));"));
expectedQueries.put(
@@ -376,7 +376,7 @@ public class QueryTest extends TestCase
addRows(query, newRow(JOIN_ATTRIBUTE, "(Table1.id = Table3Val.id)", 2, "Table1", "Table3Val"));
assertEquals(multiline("SELECT Table1.id, Table1.col AS [Some.Alias]",
- "FROM (Table1 INNER JOIN Table2 AS [Another Table] ON (Table1.id = [Another Table].id)) LEFT OUTER JOIN [Select val from Table3].val AS Table3Val ON (Table1.id = Table3Val.id);"),
+ "FROM (Table1 INNER JOIN Table2 AS [Another Table] ON (Table1.id = [Another Table].id)) LEFT JOIN [Select val from Table3].val AS Table3Val ON (Table1.id = Table3Val.id);"),
query.toSQLString());
addRows(query, newRow(JOIN_ATTRIBUTE, "(Table1.id = Table3Val.id)", 5, "Table1", "Table3Val"));