Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / CqlGeneration / UnionCqlBlock.cs / 1 / 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, Listchildren, 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. //---------------------------------------------------------------------- // // 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, Listchildren, 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
- SQLChars.cs
- RoutingSection.cs
- TextMetrics.cs
- DatagramAdapter.cs
- FormsAuthenticationTicket.cs
- ShimAsPublicXamlType.cs
- HebrewNumber.cs
- FixedBufferAttribute.cs
- FlowNode.cs
- WindowsListViewScroll.cs
- altserialization.cs
- ToolConsole.cs
- BrowserCapabilitiesFactoryBase.cs
- DeviceSpecific.cs
- XmlSchema.cs
- PersonalizationEntry.cs
- ArraySubsetEnumerator.cs
- KnownTypesProvider.cs
- CommandHelpers.cs
- PeerMessageDispatcher.cs
- SystemParameters.cs
- ValueTypePropertyReference.cs
- RootProfilePropertySettingsCollection.cs
- BinaryFormatter.cs
- GeneralTransform3D.cs
- Context.cs
- GridViewSelectEventArgs.cs
- PrivilegeNotHeldException.cs
- WebControlAdapter.cs
- MimeWriter.cs
- CommandCollectionEditor.cs
- ValidatorUtils.cs
- HtmlWindow.cs
- ToolCreatedEventArgs.cs
- GlyphRunDrawing.cs
- XPathDescendantIterator.cs
- ToolZone.cs
- UpdatePanelControlTrigger.cs
- MenuItemStyleCollection.cs
- PointAnimationUsingKeyFrames.cs
- TextEffect.cs
- JsonSerializer.cs
- __Filters.cs
- StateInitialization.cs
- XmlBaseWriter.cs
- AutomationElementIdentifiers.cs
- ADMembershipProvider.cs
- MD5.cs
- ColumnHeader.cs
- SAPIEngineTypes.cs
- TextRangeSerialization.cs
- LinkDesigner.cs
- DiscoveryRequestHandler.cs
- GenericTypeParameterBuilder.cs
- PageThemeCodeDomTreeGenerator.cs
- SystemInfo.cs
- ScriptComponentDescriptor.cs
- OracleCommand.cs
- DataServiceHostWrapper.cs
- HtmlControlPersistable.cs
- TypeUnloadedException.cs
- EdmEntityTypeAttribute.cs
- RSAOAEPKeyExchangeFormatter.cs
- ConfigurationSectionGroup.cs
- ButtonColumn.cs
- TextFormatterImp.cs
- Message.cs
- ProfileService.cs
- WebPartVerbsEventArgs.cs
- ChtmlImageAdapter.cs
- GrammarBuilderBase.cs
- JoinElimination.cs
- Point3D.cs
- IisTraceListener.cs
- PathFigureCollection.cs
- X509AsymmetricSecurityKey.cs
- Oci.cs
- DesignColumn.cs
- ModifierKeysConverter.cs
- Code.cs
- DispatchProxy.cs
- CustomTypeDescriptor.cs
- CustomAttributeBuilder.cs
- CollectionContainer.cs
- InvalidateEvent.cs
- SimpleRecyclingCache.cs
- HttpListener.cs
- AdapterUtil.cs
- MethodBuilderInstantiation.cs
- XmlArrayItemAttribute.cs
- WindowsFormsHelpers.cs
- EntitySetBase.cs
- WebBrowserDesigner.cs
- SqlIdentifier.cs
- SQLGuidStorage.cs
- AndCondition.cs
- SystemIcons.cs
- InProcStateClientManager.cs
- DomainUpDown.cs
- Relationship.cs