Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / CqlGeneration / UnionCqlBlock.cs / 1305376 / UnionCqlBlock.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System.Collections.Generic;
using System.Text;
using System.Data.Mapping.ViewGeneration.Structures;
using System.Data.Common.Utils;
namespace System.Data.Mapping.ViewGeneration.CqlGeneration
{
// This class corresponds to Union nodes in the tree
internal class UnionCqlBlock : CqlBlock
{
#region Constructor
// effects: Creates a union CqlBlock with SELECT (slotinfos), FROM
// (children), WHERE (true), AS (blockAliasNum)
internal UnionCqlBlock(SlotInfo[] slotInfos, List children, CqlIdentifiers identifiers, int blockAliasNum) :
base(slotInfos, children, BoolExpression.True, identifiers, blockAliasNum)
{
}
#endregion
#region Methods
// effects: See CqlBlock.AsCql
internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel)
{
// Simply get the Cql versions of the children and add the union
// operator between them
bool isFirst = true;
foreach (CqlBlock child in Children)
{
if (false == isFirst)
{
StringUtil.IndentNewLine(builder, indentLevel + 1);
builder.Append(OpCellTreeNode.OpToCql(CellTreeOpType.Union));
}
isFirst = false;
builder.Append(" (");
child.AsCql(builder, isTopLevel, indentLevel + 1);
builder.Append(')');
}
return builder;
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebHttpSecurity.cs
- NotEqual.cs
- OleDbConnectionInternal.cs
- ManipulationPivot.cs
- XmlReaderSettings.cs
- StringToken.cs
- AnchoredBlock.cs
- CoTaskMemSafeHandle.cs
- ShaderEffect.cs
- XmlNamespaceMapping.cs
- StaticExtensionConverter.cs
- StylusPointPropertyUnit.cs
- LicenseProviderAttribute.cs
- BaseDataListComponentEditor.cs
- DelegateBodyWriter.cs
- XmlWellformedWriterHelpers.cs
- XmlSchemaValidationException.cs
- IntermediatePolicyValidator.cs
- SystemColorTracker.cs
- panel.cs
- PageParser.cs
- MDIControlStrip.cs
- _NegoStream.cs
- Label.cs
- ListViewCommandEventArgs.cs
- TypeDescriptionProviderAttribute.cs
- EncryptedXml.cs
- RegistrySecurity.cs
- PackagePart.cs
- DataSvcMapFile.cs
- DataBindingExpressionBuilder.cs
- HttpListener.cs
- ListViewItemMouseHoverEvent.cs
- NonClientArea.cs
- ManagementEventWatcher.cs
- XmlEncoding.cs
- HorizontalAlignConverter.cs
- ZoneLinkButton.cs
- SystemFonts.cs
- Binding.cs
- CustomError.cs
- TemporaryBitmapFile.cs
- CompilationSection.cs
- MediaElement.cs
- FaultPropagationRecord.cs
- XmlElementElementCollection.cs
- TypeInfo.cs
- SQLByte.cs
- IDispatchConstantAttribute.cs
- RenderOptions.cs
- BinaryKeyIdentifierClause.cs
- cookie.cs
- _TransmitFileOverlappedAsyncResult.cs
- FontClient.cs
- RuntimeArgument.cs
- NetCodeGroup.cs
- ControlBuilder.cs
- DBSqlParserColumn.cs
- KeyValueConfigurationElement.cs
- GeometryModel3D.cs
- HttpDebugHandler.cs
- SchemaObjectWriter.cs
- HealthMonitoringSection.cs
- TargetConverter.cs
- IndexedGlyphRun.cs
- Listbox.cs
- CheckBoxFlatAdapter.cs
- BinaryWriter.cs
- EntitySetDataBindingList.cs
- SerializerWriterEventHandlers.cs
- ToolStripItemImageRenderEventArgs.cs
- XmlMembersMapping.cs
- GenericTypeParameterBuilder.cs
- RSAPKCS1KeyExchangeFormatter.cs
- UpdateManifestForBrowserApplication.cs
- EntityTypeEmitter.cs
- PerfCounters.cs
- InstanceValue.cs
- ExpressionBuilder.cs
- WebPartConnectionsEventArgs.cs
- TextBlockAutomationPeer.cs
- AdornerLayer.cs
- PropertyDescriptor.cs
- PackageDigitalSignature.cs
- RequestQueryProcessor.cs
- Lazy.cs
- PersonalizableAttribute.cs
- HwndSourceKeyboardInputSite.cs
- EmbossBitmapEffect.cs
- BaseInfoTable.cs
- MessageQueuePermissionEntryCollection.cs
- AppDomainUnloadedException.cs
- GatewayIPAddressInformationCollection.cs
- DataColumn.cs
- RoutedEventConverter.cs
- OpenTypeLayout.cs
- Decorator.cs
- SoapTypeAttribute.cs
- DBSchemaRow.cs
- TitleStyle.cs