mirror of
https://github.com/Wisser/Jailer.git
synced 2026-05-06 19:34:45 -05:00
new cli-option "add-go-batch-separators"
This commit is contained in:
@@ -54,6 +54,12 @@ public class Clause {
|
||||
return Quoting.staticUnquote(column.name);
|
||||
}
|
||||
},
|
||||
TYPE("Column Type", String.class) {
|
||||
@Override
|
||||
public Object getSubject(Table table, Column column) {
|
||||
return column.type;
|
||||
}
|
||||
},
|
||||
TABLE_NAME("Table name", String.class) {
|
||||
@Override
|
||||
public Object getSubject(Table table, Column column) {
|
||||
@@ -63,12 +69,6 @@ public class Clause {
|
||||
}
|
||||
return Quoting.staticUnquote(schema) + "." + Quoting.staticUnquote(table.getUnqualifiedName());
|
||||
}
|
||||
},
|
||||
TYPE("Type", String.class) {
|
||||
@Override
|
||||
public Object getSubject(Table table, Column column) {
|
||||
return column.type;
|
||||
}
|
||||
};
|
||||
|
||||
public final String description;
|
||||
|
||||
@@ -988,6 +988,32 @@
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="47" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
|
||||
</Constraint>
|
||||
</Constraints>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="addGoBatchSeparator">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Insert “GO” batch terminators" noResource="true"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="Insert “GO” batch terminators. (Microsoft SQL Server / Sybase)"/>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||
<EmptyBorder bottom="0" left="0" right="0" top="0"/>
|
||||
</Border>
|
||||
</Property>
|
||||
</Properties>
|
||||
<AccessibilityProperties>
|
||||
<Property name="AccessibleContext.accessibleName" type="java.lang.String" value="Insert “GO” batch terminators"/>
|
||||
<Property name="AccessibleContext.accessibleDescription" type="java.lang.String" value="Insert “GO” batch terminators. (Microsoft SQL Server / Sybase)"/>
|
||||
</AccessibilityProperties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="addGoBatchSeparatorActionPerformed"/>
|
||||
</Events>
|
||||
<AuxValues>
|
||||
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="1"/>
|
||||
</AuxValues>
|
||||
<Constraints>
|
||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout" value="org.netbeans.modules.form.compat2.layouts.DesignGridBagLayout$GridBagConstraintsDescription">
|
||||
<GridBagConstraints gridX="1" gridY="48" gridWidth="1" gridHeight="1" fill="0" ipadX="0" ipadY="0" insetsTop="2" insetsLeft="0" insetsBottom="0" insetsRight="0" anchor="17" weightX="0.0" weightY="0.0"/>
|
||||
|
||||
@@ -364,6 +364,7 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
fields.put("transactional", transactional);
|
||||
fields.put("delete", delete);
|
||||
fields.put("localTempDir", localTempDirTextField);
|
||||
fields.put("addGoBatchSeparator", addGoBatchSeparator);
|
||||
|
||||
for (Map.Entry<String, JTextField> e: parameterEditor.textfieldsPerParameter.entrySet()) {
|
||||
fields.put("$" + e.getKey(), e.getValue());
|
||||
@@ -396,6 +397,7 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
|
||||
orderByPKCheckbox.setEnabled(ScriptFormat.SQL.equals(scriptFormat));
|
||||
orderByPKCheckbox.setVisible(ScriptFormat.SQL.equals(scriptFormat));
|
||||
addGoBatchSeparator.setVisible(ScriptFormat.SQL.equals(scriptFormat));
|
||||
|
||||
sortedCheckBox.setEnabled(ScriptFormat.SQL.equals(scriptFormat) || ScriptFormat.INTRA_DATABASE.equals(scriptFormat) || ScriptFormat.DBUNIT_FLAT_XML.equals(scriptFormat) || ScriptFormat.LIQUIBASE_XML.equals(scriptFormat));
|
||||
sortedCheckBox.setSelected(true);
|
||||
@@ -627,6 +629,7 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
transactional.addActionListener(al);
|
||||
unicode.addActionListener(al);
|
||||
sortedCheckBox.addActionListener(al);
|
||||
addGoBatchSeparator.addActionListener(al);
|
||||
orderByPKCheckbox.addActionListener(al);
|
||||
scopeGlobal.addActionListener(al);
|
||||
scopeSession.addActionListener(al);
|
||||
@@ -1388,6 +1391,7 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
unicode = new javax.swing.JCheckBox();
|
||||
confirmInsert = new javax.swing.JCheckBox();
|
||||
insertIncrementally = new javax.swing.JCheckBox();
|
||||
addGoBatchSeparator = new javax.swing.JCheckBox();
|
||||
browseInsertButton = new javax.swing.JButton();
|
||||
browseDeleteButton = new javax.swing.JButton();
|
||||
targetDBMSLabel1 = new javax.swing.JLabel();
|
||||
@@ -2110,11 +2114,28 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
});
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 48;
|
||||
gridBagConstraints.gridy = 47;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 0);
|
||||
jPanel5.add(insertIncrementally, gridBagConstraints);
|
||||
|
||||
addGoBatchSeparator.setText("Insert “GO” batch terminators"); // NOI18N
|
||||
addGoBatchSeparator.setToolTipText("Insert “GO” batch terminators. (Microsoft SQL Server / Sybase)");
|
||||
addGoBatchSeparator.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
|
||||
addGoBatchSeparator.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
addGoBatchSeparatorActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 48;
|
||||
gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
|
||||
gridBagConstraints.insets = new java.awt.Insets(2, 0, 0, 0);
|
||||
jPanel5.add(addGoBatchSeparator, gridBagConstraints);
|
||||
addGoBatchSeparator.getAccessibleContext().setAccessibleName("Insert “GO” batch terminators");
|
||||
addGoBatchSeparator.getAccessibleContext().setAccessibleDescription("Insert “GO” batch terminators. (Microsoft SQL Server / Sybase)");
|
||||
|
||||
gridBagConstraints = new java.awt.GridBagConstraints();
|
||||
gridBagConstraints.gridx = 1;
|
||||
gridBagConstraints.gridy = 37;
|
||||
@@ -2723,6 +2744,10 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
}
|
||||
}//GEN-LAST:event_browseLocalTempDirButtonActionPerformed
|
||||
|
||||
private void addGoBatchSeparatorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addGoBatchSeparatorActionPerformed
|
||||
// TODO add your handling code here:
|
||||
}//GEN-LAST:event_addGoBatchSeparatorActionPerformed
|
||||
|
||||
public boolean isOk() {
|
||||
return isOk;
|
||||
}
|
||||
@@ -2781,6 +2806,10 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
if (transactional.isSelected()) {
|
||||
args.add("-transactional");
|
||||
}
|
||||
if (addGoBatchSeparator.isSelected() && addGoBatchSeparator.isVisible()) {
|
||||
args.add("-add-go-batch-separator"); // TODO
|
||||
}
|
||||
|
||||
Object isolationLevel = isolationLevelComboBox.getSelectedItem();
|
||||
if (isolationLevel != null && !String.valueOf(Connection.TRANSACTION_NONE).equals(isolationLevel)) {
|
||||
args.add("-isolation-level");
|
||||
@@ -3071,6 +3100,7 @@ public abstract class ExportDialog extends javax.swing.JDialog {
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
public javax.swing.JCheckBox addGoBatchSeparator;
|
||||
private javax.swing.JLabel additSubsLabel;
|
||||
private javax.swing.JLabel additSubsLabelTitel;
|
||||
private javax.swing.JButton browseDeleteButton;
|
||||
|
||||
Reference in New Issue
Block a user