MCPcopy
hub / github.com/gunthercox/ChatterBot / count

Method count

chatterbot/storage/sql_storage.py:138–149  ·  view source on GitHub ↗

Return the number of entries in the database.

(self)

Source from the content-addressed store, hash-verified

136 return StatementObject(**statement.serialize())
137
138 def count(self) -> int:
139 """
140 Return the number of entries in the database.
141 """
142 Statement = self.get_model('statement')
143
144 session = self.Session()
145 try:
146 statement_count = session.query(Statement).count()
147 return statement_count
148 finally:
149 session.close()
150
151 def remove(self, statement_text):
152 """

Callers 2

get_randomMethod · 0.95
filterMethod · 0.45

Calls 2

get_modelMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected