File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,12 @@ impl Loader {
173173 Self { db }
174174 }
175175
176+ /// Find a row using [`Self::find_row`] and return the column `"result"`.
176177 async fn find ( & self , sql : & str ) -> anyhow:: Result < String > {
177178 Ok ( self . find_row ( sql) . await ?. get ( "result" ) )
178179 }
179180
181+ /// Find a row, errors when none was found
180182 async fn find_row ( & self , sql : & str ) -> anyhow:: Result < PgRow > {
181183 let mut db = crate :: db:: connect ( & self . db ) . await ?;
182184
@@ -185,6 +187,7 @@ impl Loader {
185187 . ok_or_else ( || anyhow ! ( "nothing found" ) )
186188 }
187189
190+ /// Find all rows
188191 async fn find_rows ( & self , sql : & str ) -> anyhow:: Result < Vec < PgRow > > {
189192 let mut db = crate :: db:: connect ( & self . db ) . await ?;
190193
@@ -212,7 +215,8 @@ order by
212215limit 1
213216"# ,
214217 )
215- . await ?;
218+ . await
219+ . context ( "large_sbom" ) ?;
216220
217221 Ok ( ( row. get ( "id" ) , row. get ( "sha" ) ) )
218222 }
You can’t perform that action at this time.
0 commit comments