/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }
/// <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)); }