30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
using System;
|
|
|
|
namespace BCG
|
|
{
|
|
/// <summary>
|
|
/// Serves as the row for left join operations. Differs the regular joinrow as the referencedRow can be
|
|
/// null resulting in DBNulls to be returned when indeces corresponding to the referenced rows are accessed
|
|
/// </summary>
|
|
public class LightLeftForeignJoinRow : LightForeignJoinRow
|
|
{
|
|
public LightLeftForeignJoinRow (IBlueRow reDRow, IBlueRow rinGRow, IBlueTableSchema schema)
|
|
: base (reDRow, rinGRow, schema)
|
|
{}
|
|
|
|
public override object? this [int index] {
|
|
get
|
|
{
|
|
if (index == mySchema.columnNames.Length - 1)
|
|
return myRingGRow["id"];
|
|
if (index < myRingGRow.Count)
|
|
return myRingGRow[index];
|
|
else if (index >= myRingGRow.Count && index < mySchema.columnNames.Length - 1)
|
|
return myReDRow == null ? DBNull.Value : myReDRow[index - myRingGRow.Count];
|
|
// BlueEventLog.logAssert (false, "Incorrect index in JoinRow");
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|