{"record":{"id":"5e33483f22d4ac1a","repo":"JuliusBrussee/caveman","slug":"ccr-typed-object-currentness-rows-w","errorCode":null,"errorMessage":"ccr typed object currentness rows: %w","messagePattern":"ccr typed object currentness rows: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"engine/ccr/store_sqlite.go","lineNumber":594,"sourceCode":"\t\treturn Object{}, ErrNotFound\n\t}\n\tif err != nil {\n\t\treturn Object{}, fmt.Errorf(\"ccr typed object get: %w\", err)\n\t}\n\treturn obj, nil\n}\n\nfunc (s *Store) SetObjectCurrentness(id string, currentness Currentness) error {\n\tif err := validateCurrentness(currentness); err != nil {\n\t\treturn err\n\t}\n\tresult, err := s.db.Exec(`UPDATE typed_objects SET currentness = ? WHERE object_id = ?`, currentness, id)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object currentness: %w\", err)\n\t}\n\tn, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object currentness rows: %w\", err)\n\t}\n\tif n == 0 {\n\t\treturn ErrNotFound\n\t}\n\treturn nil\n}\n\nfunc (s *Store) SetObjectLifecycle(id string, lifecycle Lifecycle) error {\n\tif err := validateLifecycle(lifecycle); err != nil {\n\t\treturn err\n\t}\n\tresult, err := s.db.Exec(`UPDATE typed_objects SET lifecycle = ? WHERE object_id = ?`, lifecycle, id)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object lifecycle: %w\", err)\n\t}\n\tn, err := result.RowsAffected()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"ccr typed object lifecycle rows: %w\", err)","sourceCodeStart":576,"sourceCodeEnd":612,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/766dce6b1394ebb56a3090748d5a0240a5aefb36/engine/ccr/store_sqlite.go#L576-L612","documentation":"Wraps the RowsAffected read after the currentness UPDATE in SetObjectCurrentness. The update executed but its effect count could not be determined, so the caller cannot know whether the object was found; the operation fails rather than guessing.","triggerScenarios":"Thrown at engine/ccr/store_sqlite.go:594 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped driver error","Retry the idempotent update","Verify the sqlite driver reports RowsAffected correctly for UPDATE"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"766dce6b1394ebb56a3090748d5a0240a5aefb36","analyzedAt":"2026-08-18T03:14:35.516Z","contentChangedAt":"2026-08-18T03:14:35.516Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}