예제 #1
0
		/// <summary>
		/// Set next phrase.
		/// </summary>
		/// <param name="phrase">The next phrase.</param>
		/// <returns>The next phrase.</returns>
		public override IAPSqlPhrase SetNext(IAPSqlPhrase phrase)
		{
			if (phrase is APSqlWherePhrase || phrase == null)
				return base.SetNext(phrase);

			throw new APDataException(APResource.GetString(APResource.APData_PhraseNextError,
				GetType().Name, phrase.GetType().Name, typeof(APSqlWherePhrase).Name));
		}
예제 #2
0
        /// <summary>
        /// Set next phrase.
        /// </summary>
        /// <param name="phrase">The next phrase.</param>
        /// <returns>The next phrase.</returns>
        public override IAPSqlPhrase SetNext(IAPSqlPhrase phrase)
        {
            if (phrase is APSqlOrderPhrase || phrase == null)
            {
                return(base.SetNext(phrase));
            }

            throw new APDataException(APResource.GetString(APResource.APData_PhraseNextError,
                                                           GetType().Name, phrase.GetType().Name, typeof(APSqlOrderPhrase).Name));
        }
예제 #3
0
		/// <summary>
		/// Set next phrase.
		/// </summary>
		/// <param name="phrase">The next phrase.</param>
		/// <returns>The next phrase.</returns>
		public override IAPSqlPhrase SetNext(IAPSqlPhrase phrase)
		{
			if (phrase is APSqlSelectPhrase)
				return base.SetNext(phrase);
			else if (phrase == null)
				return base.SetNext(new APSqlSelectPhrase(APSqlNullExpr.Expr));

			string typeName = phrase.GetType().Name;
			throw new APDataException(APResource.GetString(APResource.APData_PhraseNextError,
				GetType().Name, typeName, typeof(APSqlSelectPhrase).Name));
		}
예제 #4
0
        /// <summary>
        /// Set next phrase.
        /// </summary>
        /// <param name="phrase">The next phrase.</param>
        /// <returns>The next phrase.</returns>
        public override IAPSqlPhrase SetNext(IAPSqlPhrase phrase)
        {
            if (phrase is APSqlWherePhrase || phrase == null)
            {
                return(base.SetNext(phrase));
            }

            //string typeName = phrase == null ? "null" : phrase.GetType().Name;
            string typeName = phrase.GetType().Name;

            throw new APDataException(APResource.GetString(APResource.APData_PhraseNextError,
                                                           GetType().Name, typeName, typeof(APSqlWherePhrase).Name));
        }
예제 #5
0
        /// <summary>
        /// Set next phrase.
        /// </summary>
        /// <param name="phrase">The next phrase.</param>
        /// <returns>The next phrase.</returns>
        public override IAPSqlPhrase SetNext(IAPSqlPhrase phrase)
        {
            if (phrase is APSqlSelectPhrase)
            {
                return(base.SetNext(phrase));
            }
            else if (phrase == null)
            {
                return(base.SetNext(new APSqlSelectPhrase(APSqlNullExpr.Expr)));
            }

            throw new APDataException(APResource.GetString(APResource.APData_PhraseNextError,
                                                           GetType().Name, phrase.GetType().Name, typeof(APSqlSelectPhrase).Name));
        }