1 //---------------------------------------------------------------------
2 // <copyright file="QualifiedCellIdBoolean.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // @backupOwner Microsoft
8 //---------------------------------------------------------------------
10 using System.Data.Common.CommandTrees;
11 using System.Data.Mapping.ViewGeneration.CqlGeneration;
12 using System.Diagnostics;
15 namespace System.Data.Mapping.ViewGeneration.Structures
18 /// A class that denotes "block_alias.booleanVar", e.g., "T1._from2".
19 /// It is a subclass of <see cref="CellIdBoolean"/> with an added block alias.
21 internal sealed class QualifiedCellIdBoolean : CellIdBoolean
25 /// Creates a boolean of the form "<paramref name="block"/>.<paramref name="originalCellNum"/>".
27 internal QualifiedCellIdBoolean(CqlBlock block, CqlIdentifiers identifiers, int originalCellNum)
28 : base(identifiers, originalCellNum)
35 private readonly CqlBlock m_block;
39 internal override StringBuilder AsEsql(StringBuilder builder, string blockAlias, bool skipIsNotNull)
41 // QualifiedCellIdBoolean is only used during JOIN processing where there is no single input, hence blockAlias is expected to be null.
42 Debug.Assert(blockAlias == null, "QualifiedCellIdBoolean: blockAlias mismatch");
43 return base.AsEsql(builder, m_block.CqlAlias, skipIsNotNull);
46 internal override DbExpression AsCqt(DbExpression row, bool skipIsNotNull)
48 return base.AsCqt(m_block.GetInput(row), skipIsNotNull);