コード例 #1
0
ファイル: QueryObject.cs プロジェクト: theresadower/graywulf
        /// <summary>
        /// Looks up actual database instance names on the specified server instance
        /// </summary>
        /// <param name="serverInstance"></param>
        /// <param name="databaseVersion"></param>
        /// <remarks>This function call must be synchronized!</remarks>
        protected void SubstituteDatabaseNames(Guid serverInstance, string databaseVersion)
        {
            switch (ExecutionMode)
            {
            case ExecutionMode.SingleServer:
                // *** Nothing to do here?
                break;

            case ExecutionMode.Graywulf:
            {
                var ef = new Jhu.Graywulf.Registry.EntityFactory(Context);

                foreach (var tr in SelectStatement.EnumerateSourceTableReferences(true))
                {
                    if (!tr.IsUdf && !tr.IsSubquery && !tr.IsComputed)
                    {
                        SubstituteDatabaseName(tr, serverInstance, databaseVersion);
                    }
                }
            }
            break;

            default:
                throw new NotImplementedException();
            }
        }
コード例 #2
0
ファイル: QueryObject.cs プロジェクト: horvatferi/graywulf
        /// <summary>
        /// Looks up actual database instance names on the specified server instance
        /// </summary>
        /// <param name="serverInstance"></param>
        /// <param name="databaseVersion"></param>
        /// <remarks>This function call must be synchronized!</remarks>
        protected void SubstituteDatabaseNames(Guid serverInstance, string databaseVersion)
        {
            switch (ExecutionMode)
            {
                case ExecutionMode.SingleServer:
                    // *** Nothing to do here?
                    break;
                case ExecutionMode.Graywulf:
                    {
                        var ef = new Jhu.Graywulf.Registry.EntityFactory(Context);

                        foreach (var tr in SelectStatement.EnumerateSourceTableReferences(true))
                        {
                            if (!tr.IsUdf && !tr.IsSubquery && !tr.IsComputed)
                            {
                                SubstituteDatabaseName(tr, serverInstance, databaseVersion);
                            }
                        }
                    }
                    break;
                default:
                    throw new NotImplementedException();
            }
        }