i trying use array_agg()
function of postgresql
in django 1.8
, not bump solution of now. have come across this. function broken. no luck using raw query
, because need include primary key
of table , field want use array_agg()
not primary key. stuck. appreciated.
the function has been added in django-dev
.you can find here.
class arrayagg(aggregate): function = 'array_agg' def convert_value(self, value, expression, connection, context): if not value: return [] return value
for can add ^ custom class.
Comments
Post a Comment