Skip to content

Commit 2ed22a3

Browse files
authored
DSN editor: add option for payload compression (#202)
This commit adds a drop-down to allow the payload compression strategy (one value in: "auto", "on", "off"). The option is encoded in the DSN as the attribute "Compression".
1 parent eb04bae commit 2ed22a3

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

dsneditor/EsOdbcDsnEditor/DSNEditorForm.Designer.cs

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dsneditor/EsOdbcDsnEditor/DSNEditorForm.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ public DsnEditorForm(
158158
numericUpDownBodySize.Text = Builder.ContainsKey("MaxBodySizeMB") ? Builder["MaxBodySizeMB"].ToString().StripBraces() : "100";
159159
comboBoxFloatsFormat.Text = Builder.ContainsKey("ScientificFloats") ? Builder["ScientificFloats"].ToString().StripBraces() : "default";
160160
comboBoxDataEncoding.Text = Builder.ContainsKey("Packing") ? Builder["Packing"].ToString() : "JSON";
161+
comboBoxDataCompression.Text = Builder.ContainsKey("Compression") ? Builder["Compression"].ToString() : "auto";
161162

162163
string[] noes = {"no", "false", "0"};
163164
checkBoxFollowRedirects.Checked = !noes.Contains(Builder.ContainsKey("Follow") ? Builder["Follow"].ToString().StripBraces() : "yes");
@@ -171,6 +172,7 @@ public DsnEditorForm(
171172
toolTipBodySize.SetToolTip(numericUpDownBodySize, "The maximum number of megabytes that the driver will accept for one page.");
172173
toolTipFloatsFormat.SetToolTip(comboBoxFloatsFormat, "How should the floating point numbers be printed, when these are converted to string by the driver.");
173174
toolTipDataEncoding.SetToolTip(comboBoxDataEncoding, "How should the data between the server and the driver be encoded as.");
175+
toolTipDataCompression.SetToolTip(comboBoxDataCompression, "Should the data between the server and the driver be compressed?");
174176
toolTipFollowRedirects.SetToolTip(checkBoxFollowRedirects, "Should the driver follow HTTP redirects of the requests to the server?");
175177
toolTipApplyTZ.SetToolTip(checkBoxApplyTZ, "Should the driver use machine's local timezone? The default is UTC.");
176178
toolTipAutoEscapePVA.SetToolTip(checkBoxAutoEscapePVA, "Should the driver auto-escape the pattern-value arguments?");
@@ -286,6 +288,7 @@ private bool RebuildAndValidateDsn()
286288
Builder["MaxBodySizeMB"] = numericUpDownBodySize.Text;
287289
Builder["ScientificFloats"] = comboBoxFloatsFormat.Text;
288290
Builder["Packing"] = comboBoxDataEncoding.Text;
291+
Builder["Compression"] = comboBoxDataCompression.Text;
289292
Builder["Follow"] = checkBoxFollowRedirects.Checked ? "true" : "false";
290293
Builder["ApplyTZ"] = checkBoxApplyTZ.Checked ? "true" : "false";
291294
Builder["AutoEscapePVA"] = checkBoxAutoEscapePVA.Checked ? "true" : "false";

dsneditor/EsOdbcDsnEditor/DSNEditorForm.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,6 +2837,9 @@
28372837
<metadata name="toolTipDataEncoding.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
28382838
<value>854, 213</value>
28392839
</metadata>
2840+
<metadata name="toolTipDataCompression.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
2841+
<value>1046, 215</value>
2842+
</metadata>
28402843
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
28412844
<value>314</value>
28422845
</metadata>

0 commit comments

Comments
 (0)