Skip to content

Commit

Permalink
add buildAggregateQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
svenklemm committed Mar 14, 2018
1 parent 64fa1ce commit 0c3afd0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/app/plugins/datasource/postgres/query_builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,12 @@ export class PostgresQueryBuilder {
return query;
}

buildAggregateQuery() {
var query = "SELECT DISTINCT proname FROM pg_aggregate ";
query += "INNER JOIN pg_proc ON pg_aggregate.aggfnoid = pg_proc.oid ";
query += "INNER JOIN pg_type ON pg_type.oid=pg_proc.prorettype ";
query += "WHERE pronargs=1 AND typname IN ('int8','float8') AND aggkind='n' ORDER BY 1";
return query;
}

}

0 comments on commit 0c3afd0

Please sign in to comment.