Пример #1
0
 public static Having Having(this GroupBy groupBy, string clause)
 {
     return(new Having(groupBy, clause));
 }
Пример #2
0
 public static OrderBy OrderBy(this GroupBy groupBy, string orderByColumn, SortOrder?sortOrder = null)
 {
     return(CreateOrderBy(groupBy, orderByColumn, sortOrder));
 }
Пример #3
0
        /// <summary>
        /// Selects on GroupBy asynchronously
        /// </summary>
        /// <typeparam name="T">The type representing the database table or view.</typeparam>
        /// <param name="groupBy">GroupBy clause</param>
        /// <param name="ticket">An ITicket to uniquely id the query.</param>
        /// <param name="transaction">The transaction (optional).</param>
        /// <returns>Returns <see cref="IEnumerable{T}"/></returns>
        public static async Task <IEnumerable <T> > SelectAsync <T>(this GroupBy groupBy, string selectClause, IDbTransaction transaction = null, ITicket ticket = null)
        {
            string sql = Select <T>(groupBy, selectClause, ticket, true);

            return(await groupBy.Connection.QueryAsync <T>(sql, null, transaction).ConfigureAwait(false));
        }
Пример #4
0
 /// <summary>
 /// Selects on GroupBy
 /// </summary>
 /// <typeparam name="T">The type representing the database table or view.</typeparam>
 /// <param name="groupBy">GroupBy clause</param>
 /// <param name="selectClause">Select clause</param>
 /// <param name="ticket">An ITicket to uniquely id the query.</param>
 /// <returns></returns>
 public static string SelectAsString <T>(this GroupBy groupBy, string selectClause, ITicket ticket = null)
 {
     return(Select <T>(groupBy, selectClause, ticket));
 }
Пример #5
0
        /// <summary>
        /// Selects on GroupBy
        /// </summary>
        /// <typeparam name="T">The type representing the database table or view.</typeparam>
        /// <param name="groupBy">GroupBy clause</param>
        /// <param name="selectClause"></param>
        /// <param name="transaction">The transaction (optional).</param>
        /// <param name="ticket">An ITicket to uniquely id the query.</param>
        /// <returns>Returns <see cref="IEnumerable{T}"/></returns>
        public static IEnumerable <T> Select <T>(this GroupBy groupBy, string selectClause, IDbTransaction transaction = null, ITicket ticket = null)
        {
            string sql = Select <T>(groupBy, selectClause, ticket, true);

            return(groupBy.Connection.Query <T>(sql, null, transaction));
        }