MCPcopy Create free account
hub / github.com/FastLED/FastLED / get_all

Method get_all

ci/docker_utils/container_db.py:249–275  ·  view source on GitHub ↗

Get all container records. Returns: List of ContainerRecord objects

(self)

Source from the content-addressed store, hash-verified

247 conn.close()
248
249 def get_all(self) -> list[ContainerRecord]:
250 """Get all container records.
251
252 Returns:
253 List of ContainerRecord objects
254 """
255 conn = self._get_connection()
256 try:
257 cursor = conn.cursor()
258 cursor.execute(
259 "SELECT container_id, container_name, image_name, owner_pid, created_at, config_hash, platform_type FROM containers"
260 )
261 rows = cursor.fetchall()
262 return [
263 ContainerRecord(
264 container_id=row[0],
265 container_name=row[1],
266 image_name=row[2],
267 owner_pid=row[3],
268 created_at=row[4],
269 config_hash=row[5] if len(row) > 5 else "",
270 platform_type=row[6] if len(row) > 6 else "",
271 )
272 for row in rows
273 ]
274 finally:
275 conn.close()
276
277 def get_by_config_hash(self, config_hash: str) -> Optional[ContainerRecord]:
278 """Get container record by configuration hash.

Callers 2

test_orphan_detectionFunction · 0.95

Calls 4

_get_connectionMethod · 0.95
ContainerRecordClass · 0.85
executeMethod · 0.80
closeMethod · 0.45

Tested by 1

test_orphan_detectionFunction · 0.76