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(); JArray jData = new JArray();
string sMeta = string.Empty; string sMeta = null;
#if (DEBUG && AYSHOWKPIQUERYINFO) #if (DEBUG && AYSHOWKPIQUERYINFO)
System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch(); 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"); throw new System.Exception("KPIFetcher:GetResponseAsync - unexpected failure see log");
} }
return JObject.FromObject(new if (!string.IsNullOrWhiteSpace(sMeta))
{ return JObject.FromObject(new
meta = JObject.Parse(sMeta), {
data = jData 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 GROUP BY x
ORDER BY x ASC ORDER BY x ASC
) t"; ) t";
_metaQuery = @"SELECT row_to_json(t) as res from ( _metaQuery = string.Empty;
select name from auser where id = 10 // @"SELECT row_to_json(t) as res from (
) t"; // select name from auser where id = 10
// ) t";
} }