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
- ColorMap.cs
- Command.cs
- PassportAuthenticationEventArgs.cs
- CfgRule.cs
- ProfileSettings.cs
- ThemeDictionaryExtension.cs
- TimeZone.cs
- FolderLevelBuildProviderAppliesToAttribute.cs
- SyndicationSerializer.cs
- XPathNodeInfoAtom.cs
- WebServiceEnumData.cs
- ScrollData.cs
- HttpCookieCollection.cs
- Vector.cs
- ExceptionDetail.cs
- AsyncWaitHandle.cs
- MailAddressParser.cs
- AssemblyCollection.cs
- DocumentXPathNavigator.cs
- HTMLTextWriter.cs
- ScriptServiceAttribute.cs
- ApplicationBuildProvider.cs
- QueryOutputWriter.cs
- PolicyUnit.cs
- NetworkInterface.cs
- ISAPIWorkerRequest.cs
- TreeViewItemAutomationPeer.cs
- EventData.cs
- KeyGestureConverter.cs
- StateManagedCollection.cs
- _NtlmClient.cs
- Storyboard.cs
- Message.cs
- AppSettingsExpressionBuilder.cs
- OuterGlowBitmapEffect.cs
- ScopelessEnumAttribute.cs
- CompositeDuplexBindingElementImporter.cs
- IResourceProvider.cs
- DSASignatureDeformatter.cs
- XmlAttributeAttribute.cs
- BitmapEffectInputData.cs
- MimeWriter.cs
- ExtensionFile.cs
- OutputCacheProfile.cs
- ClientSettingsStore.cs
- MouseOverProperty.cs
- Profiler.cs
- SqlGenerator.cs
- WebControlAdapter.cs
- FastEncoder.cs
- IERequestCache.cs
- Compress.cs
- SecurityUtils.cs
- SystemUdpStatistics.cs
- WebRequestModuleElement.cs
- DataServiceQueryException.cs
- MetadataSerializer.cs
- CodeAttachEventStatement.cs
- Debugger.cs
- WebPartHelpVerb.cs
- CompoundFileStreamReference.cs
- QuarticEase.cs
- _CookieModule.cs
- GridViewSortEventArgs.cs
- Span.cs
- OrderByQueryOptionExpression.cs
- ExceptionUtil.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- HijriCalendar.cs
- MediaTimeline.cs
- Subtract.cs
- SettingsBase.cs
- HttpHandler.cs
- ConnectionInterfaceCollection.cs
- BamlBinaryReader.cs
- ServiceContractAttribute.cs
- InvalidOleVariantTypeException.cs
- XmlAttributeCache.cs
- AuthenticationServiceManager.cs
- PersonalizationProvider.cs
- InvalidCastException.cs
- SHA1CryptoServiceProvider.cs
- ScrollBar.cs
- TranslateTransform3D.cs
- DescendantBaseQuery.cs
- TypeValidationEventArgs.cs
- TableDesigner.cs
- SimpleBitVector32.cs
- ValidationErrorCollection.cs
- OutputCacheProfile.cs
- Number.cs
- CompiledIdentityConstraint.cs
- BaseInfoTable.cs
- ApplicationDirectoryMembershipCondition.cs
- ConnectionProviderAttribute.cs
- DeflateInput.cs
- ReadOnlyCollection.cs
- GPRECT.cs
- XPathScanner.cs
- HandleInitializationContext.cs