|
|
|
@ -56,7 +56,6 @@ public class QueryDataServiceApi : IQueryService<QueryDto>{
|
|
|
|
|
|
|
|
|
|
resultList.Add(row);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string resultJson = JsonConvert.SerializeObject(resultList);
|
|
|
|
|
|
|
|
|
|
QueryDto queryDto = new QueryDto { Result = resultJson };
|
|
|
|
@ -104,10 +103,10 @@ public class QueryDataServiceApi : IQueryService<QueryDto>{
|
|
|
|
|
tableNames.Add(reader["table_name"].ToString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Dictionary<string, string> tablesDict = new Dictionary<string, string>();
|
|
|
|
|
List<object> tablesDict = new List<object>();
|
|
|
|
|
foreach (string tableName in tableNames)
|
|
|
|
|
{
|
|
|
|
|
tablesDict[tableName] = tableName;
|
|
|
|
|
tablesDict.Add(new { TableName = tableName});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string tablesJson = JsonConvert.SerializeObject(tablesDict);
|
|
|
|
@ -157,13 +156,13 @@ public class QueryDataServiceApi : IQueryService<QueryDto>{
|
|
|
|
|
columnsNames.Add(reader["column_name"].ToString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Dictionary<string, string> columnsDict = new Dictionary<string, string>();
|
|
|
|
|
/*List<object> columnsDict = new List<object>();
|
|
|
|
|
foreach (string colName in columnsNames)
|
|
|
|
|
{
|
|
|
|
|
columnsDict[colName] = colName;
|
|
|
|
|
}
|
|
|
|
|
columnsDict.Add(new { ColumnName = colName});
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
string tablesJson = JsonConvert.SerializeObject(columnsDict);
|
|
|
|
|
string tablesJson = JsonConvert.SerializeObject(columnsNames);
|
|
|
|
|
|
|
|
|
|
Console.WriteLine(tablesJson);
|
|
|
|
|
|
|
|
|
|