Exemplo n.º 1
0
        /// <summary>
        /// SQL 'GROUP BY' clause extensions. Add new 'GROUP BY' in clause.
        /// </summary>
        /// <param name="command">The command.</param>
        /// <param name="phrase">The Expression phrase.</param>
        /// <returns>The command.</returns>
        public static APSqlSelectCommand group_by_add(this APSqlSelectCommand command, APSqlExprPhrase phrase)
        {
            if (command.GroupByClause == null || command.GroupByClause.Next == null)
            {
                command.GroupByClause = new APSqlGroupByClause(phrase);
            }
            else
            {
                APSqlExprPhrase exist = command.FromClause.Last as APSqlExprPhrase;
                exist.SetNext(phrase);
            }

            return(command);
        }
Exemplo n.º 2
0
		/// <summary>
		/// Create a new 'GROUP BY' clause with one 'expression' phrase.
		/// </summary>
		/// <param name="phrase">'SELECT' phrase.</param>
		public APSqlGroupByClause(APSqlExprPhrase phrase)
		{
			SetNext(phrase);
		}
Exemplo n.º 3
0
 /// <summary>
 /// SQL 'GROUP BY' clause extensions.
 /// </summary>
 /// <param name="command">The command.</param>
 /// <param name="phrase">The Expression phrase.</param>
 /// <returns>The command.</returns>
 public static APSqlSelectCommand group_by(this APSqlSelectCommand command, APSqlExprPhrase phrase)
 {
     command.GroupByClause = new APSqlGroupByClause(phrase);
     return(command);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Create a new 'GROUP BY' clause with one 'expression' phrase.
 /// </summary>
 /// <param name="phrase">'SELECT' phrase.</param>
 public APSqlGroupByClause(APSqlExprPhrase phrase)
 {
     SetNext(phrase);
 }