pounard / goat-query

Goat SQL query builder built over a PHP to SQL and SQL to PHP type converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Provide a few columnExpression() with aggregates

pounard opened this issue · comments

Most commonly used aggregate (or not) expressions are the following as of now:

  • ->columnExpression('true') and ->columnExpression('false')
  • ->columnExpression('1')
  • ->columnExpression("count(some_column)") and ->columnExpression("count(*)")
  • ->columnExpression(ExpressionRaw::create('array_agg(some_column)'))
  • ->columnExpression(ExpressionRaw::create('coalesce(col1, col2, ...)'), 'alias')

Duplicate of #65