Loading
feat(datastore): container_tags store (S12 Step 4)
Why
Implements S12 Step 4 per the OCI Local plan. Provides ContainerTagStore CRUD and case-insensitive keyset pagination for S12 AC-18. Foundation for S12 Steps 12 (manifest-push tag upsert), 14 (manifest-delete tag cascade), and 15 (GET tags/list handler).
What
hasMore from ListByImage reports cursor-predicate match even when limit=0. The handler's n=0 Link-header policy is fixed by S12 (no Link); hasMore exists for handler visibility, not Link emission.
Context for LLM agents
Rationale
- Keyset predicate
LOWER(name) > LOWER(?) OR (LOWER(name) = LOWER(?) AND name > ?). RejectedLOWER(name) >= LOWER(?) AND name > ?because the latter requires a sort after the seek; the chosen shape lets the planner pick the(namespace_id, container_image_id, LOWER(name))index. EXPLAIN-asserted at 50 seed rows withenable_seqscan=offon a dedicated*sql.Conn, rather than seeding tens of thousands of rows to coax the planner naturally. Create,Delete, andFindByNameaccept callerqrm.DB(transaction-capable).ListByImagereads throughs.client.DB()because the Step 15 GET handler does not run in a tx.FindByNamewas extended in this round per jdrpereira's review. Earlier it only accepteds.client.DB().
Non-goals
- Bulk
DeleteByManifestfor the Step 14 cascade. S12 Step 14 will add it withRowsAffected. Createreturn type carryingCreatedAt/UpdatedAt. Callers needing them useFindByName.- Named-query metric emission. TODO markers reference
#54. Emission lands when S03's helper does.
Edited by Hayley Swimelar