()
| 164 | } |
| 165 | |
| 166 | async function getTotalCourseSections() { |
| 167 | "use cache" |
| 168 | cacheTag(getCourseSectionGlobalTag()) |
| 169 | |
| 170 | const [data] = await db |
| 171 | .select({ totalCourseSections: count(CourseSectionTable.id) }) |
| 172 | .from(CourseSectionTable) |
| 173 | if (data == null) return 0 |
| 174 | return data.totalCourseSections |
| 175 | } |
no test coverage detected