This commit is contained in:
2022-02-27 17:20:47 +00:00
parent 25188519d9
commit 13c4f56dc2
2 changed files with 16 additions and 9 deletions

View File

@@ -52,7 +52,7 @@ namespace AyaNova.KPI
JArray jData = new JArray();
string sMeta = string.Empty;
string sMeta = null;
#if (DEBUG && AYSHOWKPIQUERYINFO)
System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch();
@@ -133,11 +133,17 @@ namespace AyaNova.KPI
throw new System.Exception("KPIFetcher:GetResponseAsync - unexpected failure see log");
}
return JObject.FromObject(new
{
meta = JObject.Parse(sMeta),
data = jData
});
if (!string.IsNullOrWhiteSpace(sMeta))
return JObject.FromObject(new
{
meta = JObject.Parse(sMeta),
data = jData
});
else
return JObject.FromObject(new
{
data = jData
});
}
}

View File

@@ -48,9 +48,10 @@ namespace AyaNova.KPI
GROUP BY x
ORDER BY x ASC
) t";
_metaQuery = @"SELECT row_to_json(t) as res from (
select name from auser where id = 10
) t";
_metaQuery = string.Empty;
// @"SELECT row_to_json(t) as res from (
// select name from auser where id = 10
// ) t";
}