Esempio n. 1
0
        private static void RenderNonScalarProperties(ASTAppender appender, FromElement fromElement, int nonscalarSize, int k)
        {
            string text = fromElement.RenderPropertySelect(nonscalarSize, k);

            appender.Append(HqlSqlWalker.SQL_TOKEN, text, false);

            if (fromElement.QueryableCollection != null && fromElement.IsFetch)
            {
                text = fromElement.RenderCollectionSelectFragment(nonscalarSize, k);
                appender.Append(HqlSqlWalker.SQL_TOKEN, text, false);
            }

            // Look through the FromElement's children to find any collections of values that should be fetched...
            ASTIterator iter = new ASTIterator(fromElement);

            foreach (FromElement child in iter)
            {
                if (child.IsCollectionOfValuesOrComponents && child.IsFetch)
                {
                    // Need a better way to define the suffixes here...
                    text = child.RenderValueCollectionSelectFragment(nonscalarSize, nonscalarSize + k);
                    appender.Append(HqlSqlWalker.SQL_TOKEN, text, false);
                }
            }
        }
Esempio n. 2
0
		private static void RenderNonScalarProperties(ASTAppender appender, FromElement fromElement, int nonscalarSize, int k)
		{
			string text = fromElement.RenderPropertySelect(nonscalarSize, k);
			appender.Append(HqlSqlWalker.SQL_TOKEN, text, false);

			if (fromElement.QueryableCollection != null && fromElement.IsFetch)
			{
				text = fromElement.RenderCollectionSelectFragment(nonscalarSize, k);
				appender.Append(HqlSqlWalker.SQL_TOKEN, text, false);
			}

			// Look through the FromElement's children to find any collections of values that should be fetched...
			ASTIterator iter = new ASTIterator(fromElement);
			foreach (FromElement child in iter)
			{
				if (child.IsCollectionOfValuesOrComponents && child.IsFetch)
				{
					// Need a better way to define the suffixes here...
					text = child.RenderValueCollectionSelectFragment(nonscalarSize, nonscalarSize + k);
					appender.Append(HqlSqlWalker.SQL_TOKEN, text, false);
				}
			}
		}