This commit is contained in:
2020-02-15 01:14:50 +00:00
parent 0b5d548d91
commit b157eb31cf
2 changed files with 34 additions and 16 deletions

View File

@@ -9,11 +9,16 @@ using Microsoft.Extensions.Logging;
namespace AyaNova.DataList
{
internal class SqlSelectBuilderResult
{
internal Dictionary<string, int> map { get; set; }
internal string Select { get; set; }
}
internal static class DataListSqlSelectBuilder
{
//Build the SELECT portion of a list query based on the ListView fields
internal static string Build(List<AyaDataListFieldDefinition> objectFieldsList, List<string> listViewFieldList)
internal static SqlSelectBuilderResult Build(List<AyaDataListFieldDefinition> objectFieldsList, List<string> listViewFieldList)
{
@@ -97,8 +102,9 @@ namespace AyaNova.DataList
}
}
TODO: return map and sb as composite object here
return sb.ToString();
return new SqlSelectBuilderResult() { map = map, Select = sb.ToString() };
}