Files
lettersoup-online/002_source/cms/src/db/QuizLPQuestions/GetAllCount.tsx
louiscklaw 59cdf7257b ```
update Implement standardized documentation for all database modules, including purpose, rules, and requirements for each CRUD operation; refactor existing comments to follow new documentation standard
```
2025-05-17 10:02:05 +00:00

19 lines
420 B
TypeScript

//
// PURPOSE:
// Get total count of all QuizLPQuestions records
// REQ0006
//
// RULES:
// returns 0 on error
// contain definition to collection only
//
import { COL_QUIZ_LP_QUESTIONS } from '@/constants';
import { pb } from '@/lib/pb';
export default async function GetAllCount(): Promise<number> {
const { totalItems: count } = await pb.collection(COL_QUIZ_LP_QUESTIONS).getList(1, 9999, {});
return count;
}