1.2.11.11 Golf Markers, Logs

This commit is contained in:
2024-06-19 17:19:26 +01:00
parent 8f73e616ca
commit 780e6778e5
21 changed files with 827 additions and 176 deletions
@@ -311,7 +311,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr.Reference
query.Add("(");
query.Add("Select 0 UsgaCourseId, 0 UsgaMarkerId, '' Caption, 0 Holes, '' HolesCaption, '' Tee, '' Gender, 0 SlopeRating, 0 Par, 0 CourseRating, 0 BogeyRating, 0 Length");
foreach (UsgaMarkerData marker in markersToUpdate.ExtractRange(0, batchSize))
query.Add($"Union Select {marker.UsgaCourseId},{StringUtil.OnBlank(SysId.ToString(marker.UsgaMarkerId),"0")}," +
query.Add($"Union Select {marker.UsgaCourseId},{StringUtil.OnBlank(SysId.ToString(marker.UsgaMarkerId), "0")}," +
(marker.Caption != null ? $"'{DbQuery.FormatForCondition(marker.Caption)}'" : "Null") + "," +
$"{marker.Holes}," +
(marker.HolesCaption != null ? $"'{DbQuery.FormatForCondition(marker.HolesCaption)}'" : "Null") + "," +
@@ -505,7 +505,7 @@ namespace Saxonite.Net.Standard.Dbas.Mgr.Reference
if (prm.IdsExcluded.HasValidIds())
filter.Add($"{col_Id} NOT IN ({prm.IdsExcluded.Concat(",")})");
// Countries.
// Courses.
if (prm.CourseIdsIncluded.HasValidIds())
filter.Add($"{SaxDbDfn_Reference.GetColumnNameQual(SaxDbDfn_Reference.ColumnIdx.UsgaMarker_CourseId, aliasUsgaMarker)} IN ({prm.CourseIdsIncluded.Concat(",")})");
@@ -526,6 +526,12 @@ namespace Saxonite.Net.Standard.Dbas.Mgr.Reference
}
}
// Marker properties.
if (prm.Holes > 0)
filter.Add($"{SaxDbDfn_Reference.GetColumnNameQual(SaxDbDfn_Reference.ColumnIdx.UsgaMarker_Holes, aliasUsgaMarker)}={prm.Holes}");
if (!StringUtil.IsEmpty(prm.Gender))
filter.Add($"{SaxDbDfn_Reference.GetColumnNameQual(SaxDbDfn_Reference.ColumnIdx.UsgaMarker_Gender, aliasUsgaMarker)}='{DbQuery.FormatForLike(prm.Gender)}'");
// Notes.
if (!StringUtil.IsEmpty(prm.NotesPartial))
filter.Add($"{SaxDbDfn_Reference.GetColumnNameQual(SaxDbDfn_Reference.ColumnIdx.UsgaMarker_Notes, aliasUsgaMarker)} LIKE '%{DbQuery.FormatForLike(prm.NotesPartial)}%'");