コード例 #1
0
 /// <summary>
 /// Appends a word HAVING COUNT and a conditional field to the SQL Query Statement.
 /// </summary>
 /// <param name="queryField">The conditional field object used for composition.</param>
 /// <param name="index">The parameter index.</param>
 /// <param name="dbSetting">The currently in used <see cref="IDbSetting"/> object.</param>
 /// <returns>The current instance.</returns>
 public QueryBuilder HavingCountFrom(QueryField queryField,
                                     int index,
                                     IDbSetting dbSetting)
 {
     return(Append(string.Concat("HAVING COUNT(", queryField.Field.Name, ") ", queryField.GetOperationText(), ", ", queryField.AsParameter(index, dbSetting))));
 }
コード例 #2
0
ファイル: QueryBuilder.cs プロジェクト: tengtium/RepoDb
 /// <summary>
 /// Appends a word HAVING COUNT and a conditional field to the SQL Query Statement.
 /// </summary>
 /// <param name="queryField">The conditional field object used for composition.</param>
 /// <returns>The current instance.</returns>
 public QueryBuilder <TEntity> HavingCountFrom(QueryField queryField)
 {
     return(Append(string.Concat("HAVING COUNT(", queryField.Field.AsField(), ") ", queryField.GetOperationText(), ", ", queryField.AsParameter())));
 }
コード例 #3
0
 /// <summary>
 /// Appends a word HAVING COUNT and a conditional field to the SQL Query Statement.
 /// </summary>
 /// <param name="queryField">The conditional field object used for composition.</param>
 /// <param name="index">The parameter index.</param>
 /// <param name="prefix">The prefix to the parameters.</param>
 /// <returns>The current instance.</returns>
 public QueryBuilder HavingCountFrom(QueryField queryField, int index = 0, string prefix = Constant.DefaultParameterPrefix)
 {
     return(Append(string.Concat("HAVING COUNT(", queryField.Field.Name, ") ", queryField.GetOperationText(), ", ", queryField.AsParameter(index, prefix))));
 }
コード例 #4
0
ファイル: QueryBuilder.cs プロジェクト: tommyannguyen/RepoDb
 /// <summary>
 /// Appends a word HAVING COUNT and a conditional field to the SQL Query Statement.
 /// </summary>
 /// <param name="queryField">The conditional field object used for composition.</param>
 /// <returns>The current instance.</returns>
 public QueryBuilder <TEntity> HavingCountFrom(QueryField queryField)
 {
     return(Append($"HAVING COUNT({queryField.Field.AsField()}) {queryField.GetOperationText()} {queryField.AsParameter()}"));
 }