mirror of
https://github.com/Wisser/Jailer.git
synced 2026-02-21 10:18:32 -06:00
Support for qualified tables in DbUnit datasets
git-svn-id: https://svn.code.sf.net/p/jailer/code/trunk@518 3dd849cd-670e-4645-a7cd-dd197c8d0e81
This commit is contained in:
@@ -14,6 +14,7 @@ find -iname ".svn" -exec rm -rf '{}' \;
|
||||
find -iname ".cvs*" -exec rm -rf '{}' \;
|
||||
ant package
|
||||
rm -rf admin
|
||||
rm -rf doc
|
||||
rm -rf out
|
||||
rm svn-commit.tmp
|
||||
mv datamodel.def datamodel
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
2.8.2
|
||||
- Support for qualified tables in DbUnit datasets.
|
||||
|
||||
2.8.1
|
||||
- Support for MySQL's SET and ENUM column type
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Jailer {
|
||||
/**
|
||||
* The Jailer version.
|
||||
*/
|
||||
public static final String VERSION = "2.8.1";
|
||||
public static final String VERSION = "2.8.2";
|
||||
|
||||
/**
|
||||
* The relational data model.
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.util.Map;
|
||||
|
||||
import javax.xml.transform.sax.TransformerHandler;
|
||||
|
||||
import net.sf.jailer.CommandLineParser;
|
||||
import net.sf.jailer.database.ExportTransformer;
|
||||
import net.sf.jailer.database.SQLDialect;
|
||||
import net.sf.jailer.database.StatementExecutor.ResultSetReader;
|
||||
@@ -88,9 +89,26 @@ public class FlatXMLTransformer implements ResultSetReader {
|
||||
public FlatXMLTransformer(Table table, TransformerHandler transformerHandler, DatabaseMetaData metaData) throws SQLException {
|
||||
this.table = table;
|
||||
this.transformerHandler = transformerHandler;
|
||||
this.rowElementName = table.getUnqualifiedName();
|
||||
this.rowElementName = qualifiedTableName(table);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets qualified table name.
|
||||
*
|
||||
* @param t the table
|
||||
* @return qualified name of t
|
||||
*/
|
||||
private String qualifiedTableName(Table t) {
|
||||
String schema = t.getSchema("");
|
||||
String mappedSchema = CommandLineParser.getInstance().getSchemaMapping().get(schema);
|
||||
if (mappedSchema != null) {
|
||||
schema = mappedSchema;
|
||||
}
|
||||
if (schema.length() == 0) {
|
||||
return t.getUnqualifiedName();
|
||||
}
|
||||
return schema + "." + t.getUnqualifiedName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads result-set and writes into export-script.
|
||||
*/
|
||||
|
||||
@@ -110,7 +110,7 @@ public class ExportDialog extends javax.swing.JDialog {
|
||||
|
||||
Map<JTextField, String> defaults = new HashMap<JTextField, String>();
|
||||
|
||||
if (!ScriptFormat.SQL.equals(scriptFormat)) {
|
||||
if ((!ScriptFormat.SQL.equals(scriptFormat)) && (!ScriptFormat.DBUNIT_FLAT_XML.equals(scriptFormat))) {
|
||||
schemaMappingPanel.setVisible(false);
|
||||
} else {
|
||||
schemaMappingPanel.setVisible(true);
|
||||
|
||||
@@ -49,7 +49,6 @@ import net.sf.jailer.datamodel.Association;
|
||||
import net.sf.jailer.datamodel.DataModel;
|
||||
import net.sf.jailer.datamodel.Table;
|
||||
import net.sf.jailer.render.HtmlDataModelRenderer;
|
||||
import net.sf.jailer.util.PrintUtil;
|
||||
|
||||
/**
|
||||
* Main frame of Extraction-Model-Editor.
|
||||
@@ -652,16 +651,16 @@ public class ExtractionModelFrame extends javax.swing.JFrame {
|
||||
|
||||
private void tutorialActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tutorialActionPerformed
|
||||
try {
|
||||
BrowserLauncher.openURL(new File("doc" + File.separator + "web" + File.separator + "exporting-data.htm").getCanonicalPath());
|
||||
} catch (IOException e) {
|
||||
BrowserLauncher.openURL(new URI("http://jailer.sourceforge.net/doc/exporting-data.htm"));
|
||||
} catch (Exception e) {
|
||||
UIUtil.showException(this, "Error", e);
|
||||
}
|
||||
}//GEN-LAST:event_tutorialActionPerformed
|
||||
|
||||
private void helpContentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_helpContentActionPerformed
|
||||
try {
|
||||
BrowserLauncher.openURL(new File("doc" + File.separator + "web" + File.separator + "home.htm").getCanonicalPath());
|
||||
} catch (IOException e) {
|
||||
BrowserLauncher.openURL(new URI("http://jailer.sourceforge.net/doc/home.htm"));
|
||||
} catch (Exception e) {
|
||||
UIUtil.showException(this, "Error", e);
|
||||
}
|
||||
}//GEN-LAST:event_helpContentActionPerformed
|
||||
|
||||
Reference in New Issue
Block a user