Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataEntity / System / Data / SqlClient / SqlGen / SymbolPair.cs / 1305376 / SymbolPair.cs
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Data.SqlClient;
using System.Data.Metadata.Edm;
using System.Data.Common.CommandTrees;
namespace System.Data.SqlClient.SqlGen
{
///
/// The SymbolPair exists to solve the record flattening problem.
///
/// Consider a property expression D(v, "j3.j2.j1.a.x")
/// where v is a VarRef, j1, j2, j3 are joins, a is an extent and x is a columns.
/// This has to be translated eventually into {j'}.{x'}
///
/// The source field represents the outermost SqlStatement representing a join
/// expression (say j2) - this is always a Join symbol.
///
/// The column field keeps moving from one join symbol to the next, until it
/// stops at a non-join symbol.
///
/// This is returned by ,
/// but never makes it into a SqlBuilder.
///
class SymbolPair : ISqlFragment
{
public Symbol Source;
public Symbol Column;
public SymbolPair(Symbol source, Symbol column)
{
this.Source = source;
this.Column = column;
}
#region ISqlFragment Members
public void WriteSql(SqlWriter writer, SqlGenerator sqlGenerator)
{
// Symbol pair should never be part of a SqlBuilder.
Debug.Assert(false);
}
#endregion
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//----------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// @owner [....]
// @backupOwner [....]
//---------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Data.SqlClient;
using System.Data.Metadata.Edm;
using System.Data.Common.CommandTrees;
namespace System.Data.SqlClient.SqlGen
{
///
/// The SymbolPair exists to solve the record flattening problem.
///
/// Consider a property expression D(v, "j3.j2.j1.a.x")
/// where v is a VarRef, j1, j2, j3 are joins, a is an extent and x is a columns.
/// This has to be translated eventually into {j'}.{x'}
///
/// The source field represents the outermost SqlStatement representing a join
/// expression (say j2) - this is always a Join symbol.
///
/// The column field keeps moving from one join symbol to the next, until it
/// stops at a non-join symbol.
///
/// This is returned by ,
/// but never makes it into a SqlBuilder.
///
class SymbolPair : ISqlFragment
{
public Symbol Source;
public Symbol Column;
public SymbolPair(Symbol source, Symbol column)
{
this.Source = source;
this.Column = column;
}
#region ISqlFragment Members
public void WriteSql(SqlWriter writer, SqlGenerator sqlGenerator)
{
// Symbol pair should never be part of a SqlBuilder.
Debug.Assert(false);
}
#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
- XmlConvert.cs
- OdbcParameter.cs
- ContextInformation.cs
- Parameter.cs
- UnsafeNativeMethodsPenimc.cs
- SignedInfo.cs
- storepermissionattribute.cs
- PolicyUnit.cs
- HttpPostProtocolImporter.cs
- FlowDocumentFormatter.cs
- BaseDataBoundControl.cs
- CompositeScriptReference.cs
- MembershipValidatePasswordEventArgs.cs
- ItemsPresenter.cs
- TopClause.cs
- BitmapEffectInput.cs
- ComContractElementCollection.cs
- ColumnResult.cs
- FusionWrap.cs
- TemplateControlParser.cs
- TextLine.cs
- TransportSecurityHelpers.cs
- ObjectListDesigner.cs
- WasEndpointConfigContainer.cs
- Span.cs
- Mapping.cs
- ServiceBuildProvider.cs
- PaginationProgressEventArgs.cs
- FamilyMap.cs
- GeneralEndpointIdentity.cs
- MetabaseServerConfig.cs
- NativeMethods.cs
- EnumUnknown.cs
- iisPickupDirectory.cs
- ForEach.cs
- PassportAuthenticationModule.cs
- XmlDigitalSignatureProcessor.cs
- DateTimeFormatInfo.cs
- Ray3DHitTestResult.cs
- Token.cs
- ScriptHandlerFactory.cs
- LabelAutomationPeer.cs
- LoadMessageLogger.cs
- StrokeDescriptor.cs
- LineInfo.cs
- _SslSessionsCache.cs
- HtmlInputHidden.cs
- Parser.cs
- TimeSpanFormat.cs
- ResizeGrip.cs
- EntityStoreSchemaGenerator.cs
- DataViewSetting.cs
- RayHitTestParameters.cs
- AssemblyNameProxy.cs
- FieldCollectionEditor.cs
- SoapDocumentMethodAttribute.cs
- ListViewItemCollectionEditor.cs
- XmlUTF8TextWriter.cs
- OledbConnectionStringbuilder.cs
- InputLanguageEventArgs.cs
- MessageLoggingFilterTraceRecord.cs
- MemberHolder.cs
- FontStyle.cs
- Propagator.ExtentPlaceholderCreator.cs
- ScriptingAuthenticationServiceSection.cs
- GridViewDeletedEventArgs.cs
- SyndicationSerializer.cs
- ExpiredSecurityTokenException.cs
- RuntimeIdentifierPropertyAttribute.cs
- PassportAuthenticationModule.cs
- HttpsChannelFactory.cs
- Identifier.cs
- QilBinary.cs
- FacetValueContainer.cs
- GeneralTransformCollection.cs
- MasterPage.cs
- MembershipSection.cs
- RuntimeCompatibilityAttribute.cs
- DragDrop.cs
- UserCancellationException.cs
- Error.cs
- InternalTypeHelper.cs
- GridViewActionList.cs
- CircleEase.cs
- TypeExtension.cs
- DBBindings.cs
- StateMachineWorkflowInstance.cs
- CodeIdentifier.cs
- UnsafeNativeMethods.cs
- translator.cs
- SecurityTimestamp.cs
- MimeTextImporter.cs
- FilterQuery.cs
- SqlCachedBuffer.cs
- Pipe.cs
- ConfigDefinitionUpdates.cs
- ReferencedType.cs
- FlowDocumentPage.cs
- ComponentResourceManager.cs
- ServicesUtilities.cs