Total number of skill records.
(self, *, active_only: bool = False)
| 892 | |
| 893 | @_db_retry() |
| 894 | def count(self, *, active_only: bool = False) -> int: |
| 895 | """Total number of skill records.""" |
| 896 | with self._reader() as conn: |
| 897 | if active_only: |
| 898 | return conn.execute( |
| 899 | "SELECT COUNT(*) FROM skill_records WHERE is_active=1" |
| 900 | ).fetchone()[0] |
| 901 | return conn.execute( |
| 902 | "SELECT COUNT(*) FROM skill_records" |
| 903 | ).fetchone()[0] |
| 904 | |
| 905 | # Analytics / Summary |
| 906 | @_db_retry() |