Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- ProcessStartInfo.cs
- returneventsaver.cs
- GridView.cs
- BindingSource.cs
- MessageBox.cs
- WebServiceErrorEvent.cs
- _NTAuthentication.cs
- _DomainName.cs
- InvalidProgramException.cs
- Message.cs
- ResourcesBuildProvider.cs
- WpfSharedXamlSchemaContext.cs
- ErrorTolerantObjectWriter.cs
- XmlCustomFormatter.cs
- DbConvert.cs
- SelectorItemAutomationPeer.cs
- ServiceDescriptionImporter.cs
- FixedSOMContainer.cs
- FixedStringLookup.cs
- AttributeQuery.cs
- ArrangedElement.cs
- ResponseStream.cs
- DataGridViewRowCollection.cs
- Convert.cs
- NativeMethods.cs
- CommandID.cs
- DebuggerAttributes.cs
- ObjectAnimationBase.cs
- DataRecordInternal.cs
- NoneExcludedImageIndexConverter.cs
- AnonymousIdentificationSection.cs
- ConfigurationManagerHelper.cs
- SafeHandle.cs
- _IPv6Address.cs
- HttpProfileBase.cs
- documentation.cs
- GeneralTransform3DGroup.cs
- SpeechUI.cs
- FixedDocument.cs
- DataMember.cs
- DataGridViewBindingCompleteEventArgs.cs
- LinqDataSourceUpdateEventArgs.cs
- AdRotator.cs
- BoolExpression.cs
- SqlNodeAnnotations.cs
- SpellerStatusTable.cs
- CodeNamespace.cs
- ToolStripItemTextRenderEventArgs.cs
- WhiteSpaceTrimStringConverter.cs
- ResourceSet.cs
- ResourceCategoryAttribute.cs
- InputReport.cs
- CancelEventArgs.cs
- MasterPageCodeDomTreeGenerator.cs
- ConnectionPoolManager.cs
- CollectionAdapters.cs
- SiblingIterators.cs
- HostProtectionPermission.cs
- SerialPinChanges.cs
- XPathArrayIterator.cs
- CngAlgorithmGroup.cs
- WebServiceData.cs
- ParseHttpDate.cs
- RegexCapture.cs
- FontCacheUtil.cs
- Schema.cs
- EntityProviderServices.cs
- TransformerInfoCollection.cs
- ConstraintCollection.cs
- IChannel.cs
- TextRenderingModeValidation.cs
- CheckBoxRenderer.cs
- HitTestResult.cs
- StylusCollection.cs
- AsymmetricSecurityBindingElement.cs
- EventHandlerList.cs
- DataControlFieldTypeEditor.cs
- DuplicateMessageDetector.cs
- HostingMessageProperty.cs
- SafeTokenHandle.cs
- HtmlShim.cs
- OracleDataAdapter.cs
- DesignerAttribute.cs
- GridLengthConverter.cs
- ParameterCollection.cs
- WmpBitmapDecoder.cs
- PropertyFilterAttribute.cs
- COM2ExtendedBrowsingHandler.cs
- SspiWrapper.cs
- QueryLifecycle.cs
- CompiledQueryCacheEntry.cs
- VectorCollection.cs
- ButtonChrome.cs
- FontCollection.cs
- RegisteredArrayDeclaration.cs
- ValidationHelpers.cs
- SoapIncludeAttribute.cs
- ProfileInfo.cs
- RecognizeCompletedEventArgs.cs
- Stopwatch.cs