// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information.
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 SampleEntityFrameworkProvider
{
///
/// This class is like StringBuilder. While traversing the tree for the first time,
/// we do not know all the strings that need to be appended e.g. things that need to be
/// renamed, nested select statements etc. So, we use a builder that can collect
/// all kinds of sql fragments.
///
internal sealed class SqlBuilder : ISqlFragment
{
private List