MCPcopy Create free account
hub / github.com/HKUDS/OpenSpace / count

Method count

openspace/skill_engine/store.py:894–903  ·  view source on GitHub ↗

Total number of skill records.

(self, *, active_only: bool = False)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 2

_readerMethod · 0.95
executeMethod · 0.45

Tested by

no test coverage detected