This commit is contained in:
@@ -53,10 +53,7 @@ namespace AyaNova.Api.Controllers
|
||||
<pre>{AySchema.currentSchema.ToString()}</pre>
|
||||
<h4>Server time</h4>
|
||||
<pre>{DateUtil.ServerDateTimeString(System.DateTime.UtcNow)}</pre>
|
||||
<pre>{TimeZoneInfo.Local.Id}</pre>
|
||||
<pre>Test datetime.now to string {System.DateTime.Now.ToString()}</pre>
|
||||
<pre>Test datetime.UtcNow to string {System.DateTime.UtcNow.ToString()}</pre>
|
||||
<pre>Test datetime.Now then converted to universaltime then to string {System.DateTime.Now.ToUniversalTime().ToString()}</pre>
|
||||
<pre>{TimeZoneInfo.Local.Id}</pre>
|
||||
<h4>Server logs</h4>
|
||||
<pre>{ServerBootConfig.AYANOVA_LOG_PATH}</pre>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,7 @@ using Microsoft.Extensions.Logging;
|
||||
namespace AyaNova.Biz
|
||||
{
|
||||
public static class FilterSqlCriteriaBuilder
|
||||
{
|
||||
//"SELECT *, xmin FROM AWIDGET name Like 'BoolDataFilterTest%' AND active = true AND "
|
||||
{
|
||||
public static string DataFilterToSQLCriteria(AyaNova.Models.DataFilter dataFilter, FilterOptions filterOptions, long userId)
|
||||
{
|
||||
|
||||
@@ -282,11 +281,11 @@ namespace AyaNova.Biz
|
||||
//So this is the core date time to work off of
|
||||
DateTime RelativeToday = DateTime.Today;
|
||||
DateTime RelativeNow = DateTime.Now;
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("FilterSqlCriteriaBuilder::DataFilterToColumnCriteria");
|
||||
log.LogInformation("RelativeToday (before adjustment):");
|
||||
log.LogInformation(RelativeToday.ToString());
|
||||
log.LogInformation("RelativeNow (before adjustment):");
|
||||
log.LogInformation(RelativeNow.ToString());
|
||||
// ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("FilterSqlCriteriaBuilder::DataFilterToColumnCriteria");
|
||||
// log.LogInformation("RelativeToday (before adjustment):");
|
||||
// log.LogInformation(RelativeToday.ToString());
|
||||
// log.LogInformation("RelativeNow (before adjustment):");
|
||||
// log.LogInformation(RelativeNow.ToString());
|
||||
|
||||
|
||||
if (sValue.StartsWith("{[") && sValue.EndsWith("]}"))
|
||||
@@ -306,12 +305,12 @@ namespace AyaNova.Biz
|
||||
//TESTING:
|
||||
//LOG THE CRIT AND QUERY
|
||||
// ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("FilterSqlCriteriaBuilder::DataFilterToColumnCriteria");
|
||||
log.LogInformation("RelativeToday (adjusted):");
|
||||
log.LogInformation(RelativeToday.ToString());
|
||||
log.LogInformation("RelativeNow (adjusted):");
|
||||
log.LogInformation(RelativeNow.ToString());
|
||||
log.LogInformation("Offset used:");
|
||||
log.LogInformation(u.tz.ToString());
|
||||
// log.LogInformation("RelativeToday (adjusted):");
|
||||
// log.LogInformation(RelativeToday.ToString());
|
||||
// log.LogInformation("RelativeNow (adjusted):");
|
||||
// log.LogInformation(RelativeNow.ToString());
|
||||
// log.LogInformation("Offset used:");
|
||||
// log.LogInformation(u.tz.ToString());
|
||||
|
||||
#region Build criteria for date RANGE TOKEN specified
|
||||
//Used as the basis point
|
||||
|
||||
@@ -189,13 +189,13 @@ namespace AyaNova.Biz
|
||||
q = q + FilterSqlCriteriaBuilder.DataFilterToSQLCriteria(TheFilter, WidgetBiz.FilterOptions(), UserId);
|
||||
|
||||
//TESTING:
|
||||
//TODO: remove this from production build
|
||||
//LOG THE CRIT AND QUERY
|
||||
ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("WidgetBiz::GetManyAsync");
|
||||
log.LogInformation("Filter criteria:");
|
||||
log.LogInformation(TheFilter.Filter);
|
||||
log.LogInformation("Generated SQL:");
|
||||
log.LogInformation(q);
|
||||
// //TODO: remove this from production build
|
||||
// //LOG THE CRIT AND QUERY
|
||||
// ILogger log = AyaNova.Util.ApplicationLogging.CreateLogger("WidgetBiz::GetManyAsync");
|
||||
// log.LogInformation("Filter criteria:");
|
||||
// log.LogInformation(TheFilter.Filter);
|
||||
// log.LogInformation("Generated SQL:");
|
||||
// log.LogInformation(q);
|
||||
}
|
||||
|
||||
//BUILD ORDER BY AND APPEND IT
|
||||
|
||||
Reference in New Issue
Block a user