aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-03 12:16:21 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-08-03 12:16:21 +0300
commitbd1221e36ee3e493dc25bd32559f846519fe60d0 (patch)
treee4462d6672223b1fb43ee017e256e13301cec9f2 /Software/Visual_Studio/PPC/Tango.PPC.Common/SQL
parent99cbacc067251a3841fc1aca99e029146ed11c15 (diff)
downloadTango-bd1221e36ee3e493dc25bd32559f846519fe60d0.tar.gz
Tango-bd1221e36ee3e493dc25bd32559f846519fe60d0.zip
Refactored RemoteSQL on procedures.
Fixed issue with generic types display on code editor. Added line wrap toggle to procedure designer output.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/SQL')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs23
1 files changed, 3 insertions, 20 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
index 986c4d062..e5ac43d3f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/SQL/DefaultRemoteSqlService.cs
@@ -27,7 +27,7 @@ namespace Tango.PPC.Common.SQL
{
this.ThrowIfDisabled();
- List<Dictionary<String, Object>> rows = new List<Dictionary<string, object>>();
+ RemoteSqlDataSet dataSet = new RemoteSqlDataSet();
int affected = 0;
using (ObservablesContext db = ObservablesContext.CreateDefault())
@@ -40,30 +40,13 @@ namespace Tango.PPC.Common.SQL
SqlDataReader reader = command.ExecuteReader();
affected = reader.RecordsAffected;
- try
- {
- while (reader.Read())
- {
- Dictionary<String, Object> row = new Dictionary<string, object>();
-
- for (int i = 0; i < reader.FieldCount; i++)
- {
- row[reader.GetName(i)] = reader.GetValue(i);
- }
-
- rows.Add(row);
- }
- }
- finally
- {
- reader.Close();
- }
+ dataSet = await RemoteSqlDataSet.Load(reader);
}
}
await receiver.SendGenericResponse(new ExecuteSqlResponse()
{
- Rows = rows,
+ DataSet = dataSet,
AffectedRecords = affected
}, token);
}