diff --git a/CSProject/CSProject.sln b/CSProject/CSProject.sln
index 9a49b7e215ce14828cafe833e6e3ef2385e23ba2..c83fd4d94522322b58ba3ddbbdcd5471be7802f7 100644
--- a/CSProject/CSProject.sln
+++ b/CSProject/CSProject.sln
@@ -13,7 +13,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsgPackStruct", "MsgPackStr
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelectDB", "SelectDB\SelectDB.csproj", "{979E1422-3779-4C40-8E62-71FEFD9C5393}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessTrace", "ProcessTrace\ProcessTrace.csproj", "{840B9E7D-52BB-4406-ABC4-106C8B10312A}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProcessFile", "ProcessTrace\ProcessFile.csproj", "{840B9E7D-52BB-4406-ABC4-106C8B10312A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/CSProject/CSProject/CSProject.csproj b/CSProject/CSProject/CSProject.csproj
index 4183bc233ba82912adf8cb680265b68bc0081ba0..beca1473a1e1175c6ad760e406afe37400867040 100644
--- a/CSProject/CSProject/CSProject.csproj
+++ b/CSProject/CSProject/CSProject.csproj
@@ -65,9 +65,9 @@
{a6dfe6a9-cc17-416d-96ce-bbbb97ad8301}
MsgPackStruct
-
+
{840b9e7d-52bb-4406-abc4-106c8b10312a}
- ProcessTrace
+ ProcessFile
{979e1422-3779-4c40-8e62-71fefd9c5393}
diff --git a/CSProject/CSProject/Program.cs b/CSProject/CSProject/Program.cs
index 1fbe8532ce73e0827a6227af484ed1f4386ba5e1..dd6ebedcde3eda160bcb5461ceab3a3ca843df36 100644
--- a/CSProject/CSProject/Program.cs
+++ b/CSProject/CSProject/Program.cs
@@ -20,8 +20,8 @@ namespace CSProject
log.Debug("start");
ConnDB.Connect connDB = new ConnDB.Connect();
- var connect_result = connDB.ConnectDB();
- bool isConnect = connect_result.Item1; // return database connection status
+ ConnDB.Struct.ConnStateStc connect_result = connDB.ConnectDB();
+ bool isConnect = connect_result.is_connect; // return database connection status
if (!isConnect)
{
log.Error("db connect fail");
@@ -30,7 +30,7 @@ namespace CSProject
Console.WriteLine("### db connect ###");
- ProcessCommand(connect_result.Item2); // processing user command
+ ProcessCommand(connect_result.connection); // processing user command
}
// processing user command
@@ -52,20 +52,15 @@ namespace CSProject
if (action.Length == 5)
{
// data processing
- var process_result = select_database.ProcessSelect(action, connection);
- String select_result = ReturnResult(process_result.Item1, process_result.Item2); // return result data
- path = String.Format("C:\\Users\\hwajin\\source\\repos\\CSProject\\CSProject\\dat\\{0}_{1}_", process_result.Item1.schema, process_result.Item1.table) + System.DateTime.Now.ToString("yyyyMMddHHmmss");
+ SelectDB.Struct.ProcessStc process_result = select_database.ProcessSelect(action, connection);
+ String select_result = ReturnResult(process_result); // return result data
+ path = String.Format("C:\\Users\\hwajin\\source\\repos\\CSProject\\CSProject\\dat\\{0}_{1}_", process_result.def_struct.schema, process_result.def_struct.table) + System.DateTime.Now.ToString("yyyyMMddHHmmss");
- // result write on file
- using (var fs = new FileStream(path + ".dat", FileMode.Create, FileAccess.Write))
- {
- StreamWriter writer = new StreamWriter(fs);
- writer.WriteLine(select_result);
- writer.Flush();
- writer.Close();
- }
+ byte[] dat_buffer = Encoding.UTF8.GetBytes(select_result);
+ byte[] trc_buffer = MessagePack.MessagePackSerializer.Serialize(process_result.row_list_struct);
- process_trace.CreateTrace(path + ".trc", process_result.Item2);
+ process_trace.CreateFile(path + ".dat", dat_buffer);
+ process_trace.CreateFile(path + ".trc", trc_buffer);
Console.WriteLine();
Console.WriteLine(select_result);
@@ -91,25 +86,25 @@ namespace CSProject
}
// processing result data
- public static String ReturnResult(SelectDB.Struct.DefStc defStc, MsgPackStruct.MsgStruct.RowListStc rowListStc)
+ public static String ReturnResult(SelectDB.Struct.ProcessStc process_result)
{
- String result = String.Format("# def info\nschema : {0}, table : {1}\n", defStc.schema, defStc.table);
+ String result = String.Format("# def info\nschema : {0}, table : {1}\n", process_result.def_struct.schema, process_result.def_struct.table);
// def data
- for (int i = 0; i < defStc.col_list.Count; i++)
+ for (int i = 0; i < process_result.def_struct.col_list.Count; i++)
{
- result += String.Format("col{0} name : {1},\ttype : {2},\tlength : {3},\tpk : {4}\n", i + 1, defStc.col_list[i].colmn_name, defStc.col_list[i].colmn_type, defStc.col_list[i].colmn_length, defStc.col_list[i].colmn_pk_yn);
+ result += String.Format("col{0} name : {1},\ttype : {2},\tlength : {3},\tpk : {4}\n", i + 1, process_result.def_struct.col_list[i].colmn_name, process_result.def_struct.col_list[i].colmn_type, process_result.def_struct.col_list[i].colmn_length, process_result.def_struct.col_list[i].colmn_pk_yn);
}
result += "\n# row data\n";
int k = 1;
// row data
- for (int i = 0; i < rowListStc.row_list.Count; i++)
+ for (int i = 0; i < process_result.row_list_struct.row_list.Count; i++)
{
result += String.Format("row{0}", k++);
- for (int j = 0; j < rowListStc.row_list[i].data_list.Count; j++)
+ for (int j = 0; j < process_result.row_list_struct.row_list[i].data_list.Count; j++)
{
- result += String.Format(" {0} : {1} ", rowListStc.row_list[i].data_list[j].col_name, rowListStc.row_list[i].data_list[j].col_data);
+ result += String.Format(" {0} : {1} ", process_result.row_list_struct.row_list[i].data_list[j].col_name, process_result.row_list_struct.row_list[i].data_list[j].col_data);
}
result += "\n";
}
diff --git a/CSProject/CSProject/bin/Debug/CSProject.exe b/CSProject/CSProject/bin/Debug/CSProject.exe
index c5b47e33181416bf132a0c702dc40ddd6d84264e..b88c98305b9a53b8b1c757bfaef2a721ddcea9c3 100644
Binary files a/CSProject/CSProject/bin/Debug/CSProject.exe and b/CSProject/CSProject/bin/Debug/CSProject.exe differ
diff --git a/CSProject/CSProject/bin/Debug/CSProject.pdb b/CSProject/CSProject/bin/Debug/CSProject.pdb
index 8f1a89ec644af76b77bfd09f5df0fc7d6c96609d..b1697648e4f21bd4407222eddeebd8664d9b54a6 100644
Binary files a/CSProject/CSProject/bin/Debug/CSProject.pdb and b/CSProject/CSProject/bin/Debug/CSProject.pdb differ
diff --git a/CSProject/CSProject/bin/Debug/ConnDB.dll b/CSProject/CSProject/bin/Debug/ConnDB.dll
index fb05bcf6745ea2ec3240914b4298f109445e3abc..a30d4f9ad9339165587471d148e2266bf513047a 100644
Binary files a/CSProject/CSProject/bin/Debug/ConnDB.dll and b/CSProject/CSProject/bin/Debug/ConnDB.dll differ
diff --git a/CSProject/CSProject/bin/Debug/ConnDB.pdb b/CSProject/CSProject/bin/Debug/ConnDB.pdb
index 3fe2a8a4505487fffa52351094b936ad65cb3b68..df13cc282159d84f30edb10c6ac906fed1db4483 100644
Binary files a/CSProject/CSProject/bin/Debug/ConnDB.pdb and b/CSProject/CSProject/bin/Debug/ConnDB.pdb differ
diff --git a/CSProject/CSProject/bin/Debug/ProcessTrace.dll b/CSProject/CSProject/bin/Debug/ProcessTrace.dll
index 7591682e85de15f7fec1fe37e1f412916ea02e59..2a797ac3505397d6ac2edd17bdd77256b59059e2 100644
Binary files a/CSProject/CSProject/bin/Debug/ProcessTrace.dll and b/CSProject/CSProject/bin/Debug/ProcessTrace.dll differ
diff --git a/CSProject/CSProject/bin/Debug/ProcessTrace.pdb b/CSProject/CSProject/bin/Debug/ProcessTrace.pdb
index 6335713774a697fb4318dd87b9c5793ebf2bd252..148dd984e43709588168a7cb79b132bcbab75e87 100644
Binary files a/CSProject/CSProject/bin/Debug/ProcessTrace.pdb and b/CSProject/CSProject/bin/Debug/ProcessTrace.pdb differ
diff --git a/CSProject/CSProject/bin/Debug/SelectDB.dll b/CSProject/CSProject/bin/Debug/SelectDB.dll
index 758c6d132188a3f6b6b7bd460c7f9d08d475da47..ba773e8c507693a7203e3ad6d4f57197f65eee23 100644
Binary files a/CSProject/CSProject/bin/Debug/SelectDB.dll and b/CSProject/CSProject/bin/Debug/SelectDB.dll differ
diff --git a/CSProject/CSProject/bin/Debug/SelectDB.pdb b/CSProject/CSProject/bin/Debug/SelectDB.pdb
index 8b3504cc05988fd605ef826e9e0ebeb4ad5d3fd6..bd62056c60f615867a1e8bceee9a543110c53938 100644
Binary files a/CSProject/CSProject/bin/Debug/SelectDB.pdb and b/CSProject/CSProject/bin/Debug/SelectDB.pdb differ
diff --git a/CSProject/CSProject/bin/Debug/logs/agent.log b/CSProject/CSProject/bin/Debug/logs/agent.log
index 0caef40ea0d2fed744ea80affb634781d567dc9c..39ed88147af1dcd98050bd67d7675d63b3d4b429 100644
--- a/CSProject/CSProject/bin/Debug/logs/agent.log
+++ b/CSProject/CSProject/bin/Debug/logs/agent.log
@@ -718,3 +718,6 @@ Error Number:102,State:1,Class:15
2021-03-25 15:40:21.7196 [16628] [DEBUG] start
2021-03-25 15:40:35.1057 [9228] [DEBUG] start
2021-03-25 16:22:19.3518 [2504] [DEBUG] start
+2021-03-25 17:10:19.5079 [3752] [DEBUG] start
+2021-03-25 17:12:12.0300 [4372] [DEBUG] start
+2021-03-25 17:13:10.6310 [16072] [DEBUG] start
diff --git a/CSProject/CSProject/dat/schtest_test_20210325171023.dat b/CSProject/CSProject/dat/schtest_test_20210325171023.dat
new file mode 100644
index 0000000000000000000000000000000000000000..7badad390b5d1e215a61374bb140f7c8b5a53648
--- /dev/null
+++ b/CSProject/CSProject/dat/schtest_test_20210325171023.dat
@@ -0,0 +1 @@
+System.Byte[]
diff --git a/CSProject/CSProject/dat/schtest_test_20210325171023.trc b/CSProject/CSProject/dat/schtest_test_20210325171023.trc
new file mode 100644
index 0000000000000000000000000000000000000000..7badad390b5d1e215a61374bb140f7c8b5a53648
--- /dev/null
+++ b/CSProject/CSProject/dat/schtest_test_20210325171023.trc
@@ -0,0 +1 @@
+System.Byte[]
diff --git a/CSProject/CSProject/dat/schtest_test_20210325171234.dat b/CSProject/CSProject/dat/schtest_test_20210325171234.dat
new file mode 100644
index 0000000000000000000000000000000000000000..7badad390b5d1e215a61374bb140f7c8b5a53648
--- /dev/null
+++ b/CSProject/CSProject/dat/schtest_test_20210325171234.dat
@@ -0,0 +1 @@
+System.Byte[]
diff --git a/CSProject/CSProject/dat/schtest_test_20210325171234.trc b/CSProject/CSProject/dat/schtest_test_20210325171234.trc
new file mode 100644
index 0000000000000000000000000000000000000000..7badad390b5d1e215a61374bb140f7c8b5a53648
--- /dev/null
+++ b/CSProject/CSProject/dat/schtest_test_20210325171234.trc
@@ -0,0 +1 @@
+System.Byte[]
diff --git a/CSProject/CSProject/dat/schtest_test_20210325171311.dat b/CSProject/CSProject/dat/schtest_test_20210325171311.dat
new file mode 100644
index 0000000000000000000000000000000000000000..7badad390b5d1e215a61374bb140f7c8b5a53648
--- /dev/null
+++ b/CSProject/CSProject/dat/schtest_test_20210325171311.dat
@@ -0,0 +1 @@
+System.Byte[]
diff --git a/CSProject/CSProject/dat/schtest_test_20210325171311.trc b/CSProject/CSProject/dat/schtest_test_20210325171311.trc
new file mode 100644
index 0000000000000000000000000000000000000000..7badad390b5d1e215a61374bb140f7c8b5a53648
--- /dev/null
+++ b/CSProject/CSProject/dat/schtest_test_20210325171311.trc
@@ -0,0 +1 @@
+System.Byte[]
diff --git a/CSProject/CSProject/obj/Debug/CSProject.csprojAssemblyReference.cache b/CSProject/CSProject/obj/Debug/CSProject.csprojAssemblyReference.cache
index 79d7618bb80eea42e5035c6a8b79772c8c576c0a..111eda55f21a725ddb548e778e1439a1de9542f9 100644
Binary files a/CSProject/CSProject/obj/Debug/CSProject.csprojAssemblyReference.cache and b/CSProject/CSProject/obj/Debug/CSProject.csprojAssemblyReference.cache differ
diff --git a/CSProject/CSProject/obj/Debug/CSProject.exe b/CSProject/CSProject/obj/Debug/CSProject.exe
index c5b47e33181416bf132a0c702dc40ddd6d84264e..b88c98305b9a53b8b1c757bfaef2a721ddcea9c3 100644
Binary files a/CSProject/CSProject/obj/Debug/CSProject.exe and b/CSProject/CSProject/obj/Debug/CSProject.exe differ
diff --git a/CSProject/CSProject/obj/Debug/CSProject.pdb b/CSProject/CSProject/obj/Debug/CSProject.pdb
index 8f1a89ec644af76b77bfd09f5df0fc7d6c96609d..b1697648e4f21bd4407222eddeebd8664d9b54a6 100644
Binary files a/CSProject/CSProject/obj/Debug/CSProject.pdb and b/CSProject/CSProject/obj/Debug/CSProject.pdb differ
diff --git a/CSProject/ConnDB/Connect.cs b/CSProject/ConnDB/Connect.cs
index f6993f0230cdba26e048b08ea59adcc84060a303..286f99b7cced82c5ca2af85adf659403f4e73807 100644
--- a/CSProject/ConnDB/Connect.cs
+++ b/CSProject/ConnDB/Connect.cs
@@ -15,10 +15,11 @@ namespace ConnDB
{
Logger log = LogManager.GetLogger("agent_logger");
- public Tuple ConnectDB()
+ public Struct.ConnStateStc ConnectDB()
{
- bool connResult = true;
- Struct.ConnStc connStc = new Struct.ConnStc();
+ bool conn_result = true;
+ Struct.ConnInfoStc conn_info_struct = new Struct.ConnInfoStc();
+ Struct.ConnStateStc conn_state_struct = new Struct.ConnStateStc();
SqlConnection connection = new SqlConnection();
try
@@ -31,30 +32,33 @@ namespace ConnDB
String[] conn = readContents.Split('"');
- connStc.ip = conn[1];
- connStc.port = conn[3];
- connStc.dbname = conn[5];
- connStc.username = conn[7];
- connStc.password = conn[9];
+ conn_info_struct.ip = conn[1];
+ conn_info_struct.port = conn[3];
+ conn_info_struct.dbname = conn[5];
+ conn_info_struct.username = conn[7];
+ conn_info_struct.password = conn[9];
// db connect
- String dataSource = String.Format(@"{0},{1}", connStc.ip, connStc.port);
+ String dataSource = String.Format(@"{0},{1}", conn_info_struct.ip, conn_info_struct.port);
connection.ConnectionString = String.Format("DATA SOURCE={0};Initial Catalog={1};User id={2};Password={3};Pooling={4};Connection TImeout={5};Min Pool Size={6};Max pool Size={7}",
- dataSource, connStc.dbname, connStc.username, connStc.password, "true", 120, 1, 10);
+ dataSource, conn_info_struct.dbname, conn_info_struct.username, conn_info_struct.password, "true", 120, 1, 10);
connection.Open();
if (connection.State == ConnectionState.Broken || connection.State == ConnectionState.Closed)
{
- connResult = false;
+ conn_result = false;
}
}
catch (Exception e)
{
log.Error(e.ToString);
- connResult = false;
+ conn_result = false;
}
- return new Tuple(connResult, connection);
+ conn_state_struct.is_connect = conn_result;
+ conn_state_struct.connection = connection;
+
+ return conn_state_struct;
}
}
}
diff --git a/CSProject/ConnDB/Struct.cs b/CSProject/ConnDB/Struct.cs
index 2d475467b8e198ec93d327c8bc4d5773bfc4c4ec..4180159836b73c68d78e86c0b1f1f7e3cb75440f 100644
--- a/CSProject/ConnDB/Struct.cs
+++ b/CSProject/ConnDB/Struct.cs
@@ -4,11 +4,13 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Data.SqlClient; // SqlConnection
+
namespace ConnDB
{
public class Struct
{
- public class ConnStc
+ public class ConnInfoStc
{
public string ip;
public string port;
@@ -16,5 +18,11 @@ namespace ConnDB
public string username;
public string password;
}
+
+ public class ConnStateStc
+ {
+ public bool is_connect;
+ public SqlConnection connection;
+ }
}
}
diff --git a/CSProject/ConnDB/bin/Debug/ConnDB.dll b/CSProject/ConnDB/bin/Debug/ConnDB.dll
index fb05bcf6745ea2ec3240914b4298f109445e3abc..a30d4f9ad9339165587471d148e2266bf513047a 100644
Binary files a/CSProject/ConnDB/bin/Debug/ConnDB.dll and b/CSProject/ConnDB/bin/Debug/ConnDB.dll differ
diff --git a/CSProject/ConnDB/bin/Debug/ConnDB.pdb b/CSProject/ConnDB/bin/Debug/ConnDB.pdb
index 3fe2a8a4505487fffa52351094b936ad65cb3b68..df13cc282159d84f30edb10c6ac906fed1db4483 100644
Binary files a/CSProject/ConnDB/bin/Debug/ConnDB.pdb and b/CSProject/ConnDB/bin/Debug/ConnDB.pdb differ
diff --git a/CSProject/ConnDB/obj/Debug/ConnDB.dll b/CSProject/ConnDB/obj/Debug/ConnDB.dll
index fb05bcf6745ea2ec3240914b4298f109445e3abc..a30d4f9ad9339165587471d148e2266bf513047a 100644
Binary files a/CSProject/ConnDB/obj/Debug/ConnDB.dll and b/CSProject/ConnDB/obj/Debug/ConnDB.dll differ
diff --git a/CSProject/ConnDB/obj/Debug/ConnDB.pdb b/CSProject/ConnDB/obj/Debug/ConnDB.pdb
index 3fe2a8a4505487fffa52351094b936ad65cb3b68..df13cc282159d84f30edb10c6ac906fed1db4483 100644
Binary files a/CSProject/ConnDB/obj/Debug/ConnDB.pdb and b/CSProject/ConnDB/obj/Debug/ConnDB.pdb differ
diff --git a/CSProject/ProcessTrace/ProcessFile.csproj b/CSProject/ProcessTrace/ProcessFile.csproj
new file mode 100644
index 0000000000000000000000000000000000000000..69aafa053f91e67f391a08afb486b92ce416be4d
--- /dev/null
+++ b/CSProject/ProcessTrace/ProcessFile.csproj
@@ -0,0 +1,66 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {840B9E7D-52BB-4406-ABC4-106C8B10312A}
+ Library
+ ProcessTrace
+ ProcessTrace
+ v4.6.1
+ 512
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {73eaebfd-aeac-4073-a6ad-d162f891b7ef}
+ MessagePack
+
+
+ {a6dfe6a9-cc17-416d-96ce-bbbb97ad8301}
+ MsgPackStruct
+
+
+
+
\ No newline at end of file
diff --git a/CSProject/ProcessTrace/Trace.cs b/CSProject/ProcessTrace/Trace.cs
index 2731127189613901af1a6812f5c91890b966dce6..3ee270a4af61a9c6f1a89342c580766de2b79bfb 100644
--- a/CSProject/ProcessTrace/Trace.cs
+++ b/CSProject/ProcessTrace/Trace.cs
@@ -10,16 +10,16 @@ namespace ProcessTrace
{
public class Trace
{
- public void CreateTrace(String trc_path, MsgPackStruct.MsgStruct.RowListStc rowListStc)
+ public void CreateFile(String path, byte[] data_buffer)
{
- // struct serialize
- byte[] data_buffer = MessagePack.MessagePackSerializer.Serialize(rowListStc);
- using (var fs = new FileStream(trc_path, FileMode.Create, FileAccess.Write))
+ using (var fs = new FileStream(path, FileMode.Create, FileAccess.Write))
{
StreamWriter writer = new StreamWriter(fs);
writer.WriteLine(data_buffer);
writer.Flush();
writer.Close();
+ Console.WriteLine("file create success");
+ Console.WriteLine();
}
}
}
diff --git a/CSProject/ProcessTrace/bin/Debug/ProcessTrace.dll b/CSProject/ProcessTrace/bin/Debug/ProcessTrace.dll
index 7591682e85de15f7fec1fe37e1f412916ea02e59..2a797ac3505397d6ac2edd17bdd77256b59059e2 100644
Binary files a/CSProject/ProcessTrace/bin/Debug/ProcessTrace.dll and b/CSProject/ProcessTrace/bin/Debug/ProcessTrace.dll differ
diff --git a/CSProject/ProcessTrace/bin/Debug/ProcessTrace.pdb b/CSProject/ProcessTrace/bin/Debug/ProcessTrace.pdb
index 6335713774a697fb4318dd87b9c5793ebf2bd252..148dd984e43709588168a7cb79b132bcbab75e87 100644
Binary files a/CSProject/ProcessTrace/bin/Debug/ProcessTrace.pdb and b/CSProject/ProcessTrace/bin/Debug/ProcessTrace.pdb differ
diff --git a/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.CopyComplete b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.CopyComplete
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.CoreCompileInputs.cache b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.CoreCompileInputs.cache
new file mode 100644
index 0000000000000000000000000000000000000000..477be2b654530a710135bd540eda7bc6927220ce
--- /dev/null
+++ b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.CoreCompileInputs.cache
@@ -0,0 +1 @@
+ce0c1bf96ba209d3e2fb122b4a240cb626f0b98a
diff --git a/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.FileListAbsolute.txt b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.FileListAbsolute.txt
new file mode 100644
index 0000000000000000000000000000000000000000..73fbb7d1d05df2cb63ae85b5267ab3cb24caee86
--- /dev/null
+++ b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csproj.FileListAbsolute.txt
@@ -0,0 +1,15 @@
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\ProcessTrace.dll.config
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\ProcessTrace.dll
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\ProcessTrace.pdb
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\MessagePack.dll
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\MsgPackStruct.dll
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\System.Threading.Tasks.Extensions.dll
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\System.ValueTuple.dll
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\MessagePack.pdb
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\MsgPackStruct.pdb
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\bin\Debug\MsgPackStruct.dll.config
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\obj\Debug\ProcessFile.csprojAssemblyReference.cache
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\obj\Debug\ProcessFile.csproj.CoreCompileInputs.cache
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\obj\Debug\ProcessFile.csproj.CopyComplete
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\obj\Debug\ProcessTrace.dll
+C:\Users\hwajin\source\repos\CSProject\ProcessTrace\obj\Debug\ProcessTrace.pdb
diff --git a/CSProject/ProcessTrace/obj/Debug/ProcessFile.csprojAssemblyReference.cache b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csprojAssemblyReference.cache
new file mode 100644
index 0000000000000000000000000000000000000000..3261ef63a815f5291bea90ab56ab084db9d04de4
Binary files /dev/null and b/CSProject/ProcessTrace/obj/Debug/ProcessFile.csprojAssemblyReference.cache differ
diff --git a/CSProject/ProcessTrace/obj/Debug/ProcessTrace.dll b/CSProject/ProcessTrace/obj/Debug/ProcessTrace.dll
index 7591682e85de15f7fec1fe37e1f412916ea02e59..2a797ac3505397d6ac2edd17bdd77256b59059e2 100644
Binary files a/CSProject/ProcessTrace/obj/Debug/ProcessTrace.dll and b/CSProject/ProcessTrace/obj/Debug/ProcessTrace.dll differ
diff --git a/CSProject/ProcessTrace/obj/Debug/ProcessTrace.pdb b/CSProject/ProcessTrace/obj/Debug/ProcessTrace.pdb
index 6335713774a697fb4318dd87b9c5793ebf2bd252..148dd984e43709588168a7cb79b132bcbab75e87 100644
Binary files a/CSProject/ProcessTrace/obj/Debug/ProcessTrace.pdb and b/CSProject/ProcessTrace/obj/Debug/ProcessTrace.pdb differ
diff --git a/CSProject/SelectDB/Select.cs b/CSProject/SelectDB/Select.cs
index 3773020212107e66295ffb9db7b3d593b22b96e7..a7178c80eb410ea0cc03c5cf9ac849a66bbebd51 100644
--- a/CSProject/SelectDB/Select.cs
+++ b/CSProject/SelectDB/Select.cs
@@ -11,9 +11,10 @@ namespace SelectDB
{
public class Select
{
- public Tuple ProcessSelect(String[] str, SqlConnection connection)
+ public Struct.ProcessStc ProcessSelect(String[] str, SqlConnection connection)
{
SqlCommand cmd = null;
+ Struct.ProcessStc processStc = new Struct.ProcessStc();
Struct.DefStc defStc = new Struct.DefStc();
MsgPackStruct.MsgStruct.RowListStc rowListStc = new MsgPackStruct.MsgStruct.RowListStc();
@@ -21,22 +22,24 @@ namespace SelectDB
{
// table column info
cmd = SelectCommand('D', str, null, connection);
- var def_result = SelectResult('D', cmd);
- defStc = def_result.Item2;
+ Struct.ProcessStc def_result = SelectResult('D', cmd);
+ defStc = def_result.def_struct;
defStc.schema = str[1];
defStc.table = str[2];
// table row data
- cmd = SelectCommand('R', str, def_result.Item1, connection);
- var row_result = SelectResult('R', cmd);
- rowListStc = row_result.Item3;
+ cmd = SelectCommand('R', str, def_result.pk_colmn, connection);
+ Struct.ProcessStc row_result = SelectResult('R', cmd);
+ rowListStc = row_result.row_list_struct;
}
catch (Exception e)
{
//log.Error(e.ToString());
}
- return new Tuple(defStc, rowListStc);
+ processStc.def_struct = defStc;
+ processStc.row_list_struct = rowListStc;
+ return processStc;
}
// select command
@@ -69,16 +72,17 @@ namespace SelectDB
}
// select process result
- public Tuple SelectResult(Char type, SqlCommand cmd)
+ public Struct.ProcessStc SelectResult(Char type, SqlCommand cmd)
{
String pk_colmn = "";
Struct.DefStc defStc = new Struct.DefStc();
+ Struct.ProcessStc processStc = new Struct.ProcessStc();
MsgPackStruct.MsgStruct.RowListStc rowListStc = new MsgPackStruct.MsgStruct.RowListStc();
// table column info
if (type == 'D')
{
- String pkYn = "X"; // Presence of primary key
+ String pk_yn = "X"; // Presence of primary key
Struct.ColStc colStc = new Struct.ColStc(); // column data
List col_list = new List();
SqlDataReader readData = cmd.ExecuteReader();
@@ -90,20 +94,20 @@ namespace SelectDB
// primary key
if (readData[3].ToString() == "PK")
{
- pkYn = "O";
+ pk_yn = "O";
pk_colmn = readData[0].ToString();
}
// no primary key
else
{
- pkYn = "X";
+ pk_yn = "X";
}
colStc.colmn_name = readData[0].ToString();
colStc.colmn_type = readData[1].ToString();
colStc.colmn_length = int.Parse(readData[2].ToString());
- colStc.colmn_pk_yn = pkYn;
+ colStc.colmn_pk_yn = pk_yn;
col_list.Add(colStc);
}
@@ -136,7 +140,12 @@ namespace SelectDB
rowListStc.row_list.Add(dataListStc);
}
}
- return new Tuple(pk_colmn, defStc, rowListStc);
+
+ processStc.pk_colmn = pk_colmn;
+ processStc.def_struct = defStc;
+ processStc.row_list_struct = rowListStc;
+
+ return processStc;
}
}
}
diff --git a/CSProject/SelectDB/Struct.cs b/CSProject/SelectDB/Struct.cs
index 2de8c3bb4f522ab356af74f4ea92220b2ebebdb1..ede8fe32ff13fef83d1e4414f7086ac38e845b10 100644
--- a/CSProject/SelectDB/Struct.cs
+++ b/CSProject/SelectDB/Struct.cs
@@ -22,5 +22,12 @@ namespace SelectDB
public string table;
public List col_list;
}
+
+ public struct ProcessStc
+ {
+ public MsgPackStruct.MsgStruct.RowListStc row_list_struct;
+ public DefStc def_struct;
+ public String pk_colmn;
+ }
}
}
diff --git a/CSProject/SelectDB/bin/Debug/SelectDB.dll b/CSProject/SelectDB/bin/Debug/SelectDB.dll
index 758c6d132188a3f6b6b7bd460c7f9d08d475da47..ba773e8c507693a7203e3ad6d4f57197f65eee23 100644
Binary files a/CSProject/SelectDB/bin/Debug/SelectDB.dll and b/CSProject/SelectDB/bin/Debug/SelectDB.dll differ
diff --git a/CSProject/SelectDB/bin/Debug/SelectDB.pdb b/CSProject/SelectDB/bin/Debug/SelectDB.pdb
index 8b3504cc05988fd605ef826e9e0ebeb4ad5d3fd6..bd62056c60f615867a1e8bceee9a543110c53938 100644
Binary files a/CSProject/SelectDB/bin/Debug/SelectDB.pdb and b/CSProject/SelectDB/bin/Debug/SelectDB.pdb differ
diff --git a/CSProject/SelectDB/obj/Debug/SelectDB.csprojAssemblyReference.cache b/CSProject/SelectDB/obj/Debug/SelectDB.csprojAssemblyReference.cache
index daf174110567b17d9d9399dd4f6232752e57ad50..9803277acd3a841ad3660bfc67c7dab9d0eb9b75 100644
Binary files a/CSProject/SelectDB/obj/Debug/SelectDB.csprojAssemblyReference.cache and b/CSProject/SelectDB/obj/Debug/SelectDB.csprojAssemblyReference.cache differ
diff --git a/CSProject/SelectDB/obj/Debug/SelectDB.dll b/CSProject/SelectDB/obj/Debug/SelectDB.dll
index 758c6d132188a3f6b6b7bd460c7f9d08d475da47..ba773e8c507693a7203e3ad6d4f57197f65eee23 100644
Binary files a/CSProject/SelectDB/obj/Debug/SelectDB.dll and b/CSProject/SelectDB/obj/Debug/SelectDB.dll differ
diff --git a/CSProject/SelectDB/obj/Debug/SelectDB.pdb b/CSProject/SelectDB/obj/Debug/SelectDB.pdb
index 8b3504cc05988fd605ef826e9e0ebeb4ad5d3fd6..bd62056c60f615867a1e8bceee9a543110c53938 100644
Binary files a/CSProject/SelectDB/obj/Debug/SelectDB.pdb and b/CSProject/SelectDB/obj/Debug/SelectDB.pdb differ