1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-05 13:35:25 +02:00

WIP SQL Server support

This commit is contained in:
Harvey Kandola 2019-04-01 20:08:57 +01:00
parent 64403c402b
commit a41f43c380
9 changed files with 804 additions and 749 deletions

View file

@ -239,13 +239,13 @@ func (s Store) GetSpaceCategorySummary(ctx domain.RequestContext, spaceID string
GROUP BY c_groupid
) AS x INNER JOIN dmz_doc AS d ON d.c_groupid=x.c_groupid AND d.c_versionorder=x.latestversion
)
GROUP BY c_categoryid, grouptype
GROUP BY c_categoryid
UNION ALL
SELECT 'users' AS grouptype, c_refid AS categoryid, count(*) AS count
FROM dmz_permission
WHERE c_orgid=? AND c_location='category' AND c_refid IN
(SELECT c_refid FROM dmz_category WHERE c_orgid=? AND c_spaceid=?)
GROUP BY c_refid, grouptype`),
GROUP BY c_refid`),
ctx.OrgID, spaceID,
ctx.OrgID, spaceID, ctx.OrgID, spaceID,
ctx.OrgID, ctx.OrgID, spaceID)