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
- FileUpload.cs
- ProcessModelSection.cs
- SmtpTransport.cs
- WindowsRichEditRange.cs
- XmlElement.cs
- Win32.cs
- DbConnectionPoolGroupProviderInfo.cs
- HtmlEncodedRawTextWriter.cs
- CacheOutputQuery.cs
- Ipv6Element.cs
- DispatchOperation.cs
- Overlapped.cs
- DBParameter.cs
- IIS7UserPrincipal.cs
- DetailsViewModeEventArgs.cs
- ExceptionHelpers.cs
- XmlDocument.cs
- MatrixUtil.cs
- CommonDialog.cs
- GZipStream.cs
- MonthChangedEventArgs.cs
- DataViewSetting.cs
- TypeReference.cs
- DbRetry.cs
- SoapObjectInfo.cs
- MetadataExchangeBindings.cs
- IChannel.cs
- PageRanges.cs
- AnimationClock.cs
- ScriptControl.cs
- StyleConverter.cs
- SqlSupersetValidator.cs
- ErrorCodes.cs
- GridItemProviderWrapper.cs
- WebPartDisplayModeCollection.cs
- ObjectAnimationUsingKeyFrames.cs
- PolicyStatement.cs
- Rotation3DAnimationBase.cs
- DocumentViewerBaseAutomationPeer.cs
- DataControlPagerLinkButton.cs
- FontCacheUtil.cs
- ContainerControl.cs
- PersistNameAttribute.cs
- ValueTable.cs
- PropertyValueUIItem.cs
- cookiecollection.cs
- DocumentGrid.cs
- TextBox.cs
- NativeMethods.cs
- PriorityBindingExpression.cs
- DragDrop.cs
- ConstructorExpr.cs
- _UriTypeConverter.cs
- XsltException.cs
- Calendar.cs
- TextSegment.cs
- Version.cs
- Geometry3D.cs
- KeyToListMap.cs
- Int64Storage.cs
- TextEvent.cs
- MetafileEditor.cs
- WebServiceResponseDesigner.cs
- Command.cs
- _HTTPDateParse.cs
- GridViewItemAutomationPeer.cs
- SymLanguageVendor.cs
- EnumBuilder.cs
- CookielessHelper.cs
- RegexCompiler.cs
- basemetadatamappingvisitor.cs
- EngineSite.cs
- LongValidatorAttribute.cs
- ZoomComboBox.cs
- SqlConnection.cs
- StateItem.cs
- FixedTextSelectionProcessor.cs
- TypeConverterValueSerializer.cs
- ListViewItemSelectionChangedEvent.cs
- Brush.cs
- SiteMapDataSourceView.cs
- GridView.cs
- ProviderCollection.cs
- Interfaces.cs
- AssemblyContextControlItem.cs
- HttpDigestClientElement.cs
- AuthenticationService.cs
- BeginStoryboard.cs
- DiagnosticTrace.cs
- AbstractDataSvcMapFileLoader.cs
- DBSqlParser.cs
- XmlArrayItemAttribute.cs
- SecurityDescriptor.cs
- DbDeleteCommandTree.cs
- XsdDataContractExporter.cs
- PlaceHolder.cs
- Application.cs
- EntityDataSourceUtil.cs
- RealProxy.cs
- DataSourceCache.cs