Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataEntity / System / Data / Map / ViewGeneration / CqlGeneration / ExtentCqlBlock.cs / 1 / ExtentCqlBlock.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //--------------------------------------------------------------------- using System.Text; using System.Collections.Generic; using System.Data.Mapping.ViewGeneration.Structures; using System.Data.Common.Utils; using System.Data.Metadata.Edm; namespace System.Data.Mapping.ViewGeneration.CqlGeneration { // A class that corresponds to the leaf CQL Blocks in the CqlBlock tree internal class ExtentCqlBlock : CqlBlock { private static readonly ListEmptyChildren = new List (); #region Constructors // effects: Creates an Extent CqlBlock corresponding to // "extent" (the FROM part). SELECT is given by slots, WHERE by // whereClause and AS by blockAliasNum internal ExtentCqlBlock(EntitySetBase extent, SlotInfo[] slots, BoolExpression whereClause, CqlIdentifiers identifiers, int blockAliasNum) : base(slots, EmptyChildren, whereClause, identifiers, blockAliasNum) { m_extent = extent; m_nodeTableAlias = identifiers.GetBlockAlias(); } #endregion #region Fields private EntitySetBase m_extent; // The extent for which we have this block private string m_nodeTableAlias; #endregion #region Methods // effects: See CqlBlock.AsCql internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel) { // The SELECT part GenerateProjectedtList(builder, indentLevel, m_nodeTableAlias, false); // Get the FROM part builder.Append("FROM "); // Get the extent object in C-Space (if m_extent is an S space object) CqlWriter.AppendEscapedQualifiedName(builder, m_extent.EntityContainer.Name, m_extent.Name); builder.Append(" AS ") .Append(m_nodeTableAlias); // Get the WHERE part only when the expression is not simply TRUE if (false == BoolExpression.EqualityComparer.Equals(WhereClause, BoolExpression.True)) { StringUtil.IndentNewLine(builder, indentLevel); builder.Append("WHERE "); WhereClause.AsCql(builder, m_nodeTableAlias); } 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.Text; using System.Collections.Generic; using System.Data.Mapping.ViewGeneration.Structures; using System.Data.Common.Utils; using System.Data.Metadata.Edm; namespace System.Data.Mapping.ViewGeneration.CqlGeneration { // A class that corresponds to the leaf CQL Blocks in the CqlBlock tree internal class ExtentCqlBlock : CqlBlock { private static readonly ListEmptyChildren = new List (); #region Constructors // effects: Creates an Extent CqlBlock corresponding to // "extent" (the FROM part). SELECT is given by slots, WHERE by // whereClause and AS by blockAliasNum internal ExtentCqlBlock(EntitySetBase extent, SlotInfo[] slots, BoolExpression whereClause, CqlIdentifiers identifiers, int blockAliasNum) : base(slots, EmptyChildren, whereClause, identifiers, blockAliasNum) { m_extent = extent; m_nodeTableAlias = identifiers.GetBlockAlias(); } #endregion #region Fields private EntitySetBase m_extent; // The extent for which we have this block private string m_nodeTableAlias; #endregion #region Methods // effects: See CqlBlock.AsCql internal override StringBuilder AsCql(StringBuilder builder, bool isTopLevel, int indentLevel) { // The SELECT part GenerateProjectedtList(builder, indentLevel, m_nodeTableAlias, false); // Get the FROM part builder.Append("FROM "); // Get the extent object in C-Space (if m_extent is an S space object) CqlWriter.AppendEscapedQualifiedName(builder, m_extent.EntityContainer.Name, m_extent.Name); builder.Append(" AS ") .Append(m_nodeTableAlias); // Get the WHERE part only when the expression is not simply TRUE if (false == BoolExpression.EqualityComparer.Equals(WhereClause, BoolExpression.True)) { StringUtil.IndentNewLine(builder, indentLevel); builder.Append("WHERE "); WhereClause.AsCql(builder, m_nodeTableAlias); } 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
- DisplayInformation.cs
- RouteValueDictionary.cs
- ClientSettings.cs
- SystemBrushes.cs
- FreezableOperations.cs
- IdentityValidationException.cs
- ChannelFactory.cs
- SystemThemeKey.cs
- StartUpEventArgs.cs
- UIElementParaClient.cs
- NumericUpDownAcceleration.cs
- DataFormats.cs
- MultiByteCodec.cs
- WindowsFont.cs
- AssemblyInfo.cs
- Version.cs
- UIPermission.cs
- VisualProxy.cs
- ContentHostHelper.cs
- FunctionDetailsReader.cs
- MetadataException.cs
- DataRow.cs
- EntityTemplateUserControl.cs
- GlobalItem.cs
- DataGrid.cs
- KeyTime.cs
- ChannelManager.cs
- FunctionMappingTranslator.cs
- GregorianCalendar.cs
- PropertyRef.cs
- ContainerParaClient.cs
- ItemChangedEventArgs.cs
- BooleanProjectedSlot.cs
- ListSortDescription.cs
- PreviewPrintController.cs
- SamlAssertion.cs
- HexParser.cs
- WindowsTooltip.cs
- EndEvent.cs
- DateTime.cs
- graph.cs
- TypeInitializationException.cs
- StickyNoteHelper.cs
- ImageSource.cs
- SendMailErrorEventArgs.cs
- EventMappingSettingsCollection.cs
- ModifierKeysConverter.cs
- XamlBuildTaskServices.cs
- RangeExpression.cs
- BindingExpression.cs
- NameValueFileSectionHandler.cs
- OleDbSchemaGuid.cs
- Calendar.cs
- XmlQueryOutput.cs
- VectorAnimationBase.cs
- ReliableMessagingHelpers.cs
- MetabaseReader.cs
- DataView.cs
- ScriptBehaviorDescriptor.cs
- GuidTagList.cs
- BaseParser.cs
- XmlCustomFormatter.cs
- TextEditorSelection.cs
- UnsafeNativeMethods.cs
- Cloud.cs
- RetrieveVirtualItemEventArgs.cs
- WindowsPrincipal.cs
- ApplicationDirectoryMembershipCondition.cs
- PrintPageEvent.cs
- DataObject.cs
- StyleBamlTreeBuilder.cs
- RangeValuePatternIdentifiers.cs
- ViewStateChangedEventArgs.cs
- Vector3D.cs
- WindowsSlider.cs
- SmiEventSink_Default.cs
- ContentElement.cs
- XmlAtomicValue.cs
- InputBindingCollection.cs
- PolicyUnit.cs
- EnumMemberAttribute.cs
- XsltArgumentList.cs
- XmlnsCache.cs
- DataGridItem.cs
- DurableEnlistmentState.cs
- InheritanceContextHelper.cs
- ApplicationServiceHelper.cs
- SimpleApplicationHost.cs
- IndexerNameAttribute.cs
- ProxySimple.cs
- ServiceActivationException.cs
- ComplexLine.cs
- TitleStyle.cs
- WindowsRegion.cs
- TextEditorMouse.cs
- PtsCache.cs
- SwitchAttribute.cs
- SqlParameter.cs
- peersecurityelement.cs
- ChannelDispatcherCollection.cs