Skip to content

Commit

Permalink
Merge branch '3.7' of https://github.com/JumpMind/symmetric-ds.git in…
Browse files Browse the repository at this point in the history
…to 3.7
  • Loading branch information
erilong committed Aug 13, 2015
2 parents fcabdf8 + d8684bf commit 17b357c
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 3 deletions.
13 changes: 13 additions & 0 deletions README.md
@@ -0,0 +1,13 @@
# SymmetricDS
SymmetricDS is a database and file synchronization solution that is platform-independent, web-enabled, and database agnostic. SymmetricDS was built to make data replication across two to tens of thousands of databases and file systems fast, easy and resilient. We specialize in near real time, bi-directional data replication across large node networks over the WAN or LAN.

##Development
We use Eclipse for development.

To setup a development environment run the following commands:
```
cd symmetric-assemble
./gradlew develop
```

This will generate Eclipse project artifacts. You can then import the projects into your Eclipse workspace.
Expand Up @@ -170,6 +170,9 @@ public void exportTables(OutputStream output, Table[] tables, String sql) throws
tables[i] = platform.readTableFromDatabase(getCatalogToUse(), getSchemaToUse(),
tables[i].getName());
}

/* make a copy so if we zero out catalog and schema we don't effect the original */
tables[i] = tables[i].copy();
}

WriterWrapper writerWrapper = null;
Expand Down Expand Up @@ -462,7 +465,7 @@ protected void startTable(Table table) {
&& table.getCatalog().equals(platform.getDefaultCatalog())) {
table.setCatalog(null);
}
if (table.getSchema() != null
if (table.getCatalog() == null && table.getSchema() != null
&& table.getSchema().equals(platform.getDefaultSchema())) {
table.setSchema(null);
}
Expand Down
Expand Up @@ -123,7 +123,10 @@ public String transform(IDatabasePlatform platform, DataContext context,
Column targetCol = table.getColumnWithName(keyNames[i]);
if (targetCol != null) {
columns.add(targetCol);
keyValuesList.add(sourceValues.get(keyNames[i]));
String value = sourceValues.get(keyNames[i]);
if (value != null) {
keyValuesList.add(value);
}
if (addedFirstKey) {
sql.append("and ");
} else {
Expand All @@ -132,7 +135,11 @@ public String transform(IDatabasePlatform platform, DataContext context,
sql.append(quote);
sql.append(keyNames[i]);
sql.append(quote);
sql.append("=? ");
if (value == null) {
sql.append("is null ");
} else {
sql.append("=? ");
}
}
}

Expand Down
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit 17b357c

Please sign in to comment.