File tree Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Expand file tree Collapse file tree 1 file changed +28
-5
lines changed Original file line number Diff line number Diff line change @@ -914,12 +914,35 @@ impl Connection for SqliteConnection {
914
914
}
915
915
async fn list_self_profile (
916
916
& self ,
917
- _aid : ArtifactId ,
918
- _crate_ : & str ,
919
- _profile : & str ,
920
- _scenario : & str ,
917
+ aid : ArtifactId ,
918
+ crate_ : & str ,
919
+ profile : & str ,
920
+ scenario : & str ,
921
921
) -> Vec < ( ArtifactIdNumber , i32 ) > {
922
- Vec :: new ( )
922
+ self . raw_ref ( )
923
+ . prepare (
924
+ "select aid, cid from raw_self_profile where
925
+ crate = ?1 and
926
+ profile = ?2 and
927
+ cache = ?3 and
928
+ aid = (select id from artifact where name = ?4);" ,
929
+ )
930
+ . unwrap ( )
931
+ . query_map (
932
+ params ! [
933
+ & crate_,
934
+ profile,
935
+ scenario,
936
+ & match aid {
937
+ ArtifactId :: Commit ( c) => c. sha,
938
+ ArtifactId :: Tag ( a) => a,
939
+ }
940
+ ] ,
941
+ |r| Ok ( ( ArtifactIdNumber ( r. get :: < _ , i32 > ( 0 ) ? as u32 ) , r. get ( 1 ) ?) ) ,
942
+ )
943
+ . unwrap ( )
944
+ . collect :: < Result < _ , _ > > ( )
945
+ . unwrap ( )
923
946
}
924
947
925
948
async fn get_bootstrap ( & self , aids : & [ ArtifactIdNumber ] ) -> Vec < Option < Duration > > {
You can’t perform that action at this time.
0 commit comments