add: ver()

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-08 11:31:40 +08:00
parent 0e4cd86119
commit bb7e8fde08
29 changed files with 2234 additions and 780 deletions
+7 -4
View File
@@ -27,7 +27,8 @@ const computedAttributes = [
literal: `(
SELECT CAST(COUNT(*) AS INTEGER)
FROM "units"
WHERE "units"."course_id" = "Course"."course_id"
INNER JOIN "course_units" ON "course_units"."unit_id" = "units"."unit_id"
WHERE "course_units"."course_id" = "Course"."course_id"
AND "units"."deletedAt" IS NULL
)`,
filterable: false,
@@ -38,10 +39,12 @@ const computedAttributes = [
type: "number",
order: 6,
literal: `(
SELECT CAST(COUNT(*) AS INTEGER)
SELECT CAST(COUNT(DISTINCT "lessons"."lesson_id") AS INTEGER)
FROM "lessons"
INNER JOIN "units" ON "lessons"."unit_id" = "units"."unit_id"
WHERE "units"."course_id" = "Course"."course_id"
INNER JOIN "unit_lessons" ON "unit_lessons"."lesson_id" = "lessons"."lesson_id"
INNER JOIN "units" ON "unit_lessons"."unit_id" = "units"."unit_id" AND "units"."deletedAt" IS NULL
INNER JOIN "course_units" ON "course_units"."unit_id" = "units"."unit_id"
WHERE "course_units"."course_id" = "Course"."course_id"
AND "lessons"."deletedAt" IS NULL
)`,
filterable: false,