This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
using Strata.SqlTools.SqlBreakdown.Classes;
|
||||
using Strata.SqlTools.SqlBreakdown.Expressions;
|
||||
|
||||
namespace Strata.SqlTools.SqlBreakdown.Tests.RegisteredTables;
|
||||
|
||||
/// <summary>
|
||||
/// Helper utilities for retrieving registered table column expressions.
|
||||
/// Provides mock implementations for testing purposes.
|
||||
/// </summary>
|
||||
public static class RegisteredTableColumns
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a registered table column expression for the specified data column ID.
|
||||
/// Currently returns mock column definitions for testing purposes.
|
||||
/// </summary>
|
||||
/// <param name="dataColumnId">The data column identifier (1=DEPARTMENT_ID, 2=NAME, 3=REVENUE, 4=DISCHARGE_DATE).</param>
|
||||
/// <returns>A registered table column expression for the specified column ID.</returns>
|
||||
/// <remarks>This is a mock implementation and should be replaced with actual column lookup logic.</remarks>
|
||||
public static RegisteredTableColumnExpression GetColumn(int dataColumnId)
|
||||
{
|
||||
var tableSource = new RegisteredTableSource(1001, "FW", "DEPARTMENT", "DEPT");
|
||||
return dataColumnId switch
|
||||
{
|
||||
1 => new RegisteredTableColumnExpression(dataColumnId, "DEPARTMENT_ID", tableSource),
|
||||
2 => new RegisteredTableColumnExpression(dataColumnId, "NAME", tableSource),
|
||||
3 => new RegisteredTableColumnExpression(dataColumnId, "REVENUE", tableSource),
|
||||
4 => new RegisteredTableColumnExpression(dataColumnId, "DISCHARGE_DATE", tableSource),
|
||||
_ => new RegisteredTableColumnExpression(dataColumnId, "FOOBAR", tableSource)
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user