File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -251,9 +251,21 @@ impl SysDb for SysdbService {
251251
252252 async fn create_collection (
253253 & self ,
254- _request : Request < CreateCollectionRequest > ,
254+ request : Request < CreateCollectionRequest > ,
255255 ) -> Result < Response < CreateCollectionResponse > , Status > {
256- todo ! ( )
256+ let proto_req = request. into_inner ( ) ;
257+ let internal_req: internal:: CreateCollectionRequest = proto_req
258+ . try_into ( )
259+ . map_err ( |e : SysDbError | Status :: from ( e) ) ?;
260+
261+ let backend = internal_req. assign ( & self . backends ) ;
262+ let internal_resp = internal_req. run ( backend) . await ?;
263+
264+ let proto_resp: CreateCollectionResponse = internal_resp
265+ . try_into ( )
266+ . map_err ( |e : SysDbError | Status :: from ( e) ) ?;
267+
268+ Ok ( Response :: new ( proto_resp) )
257269 }
258270
259271 async fn delete_collection (
You can’t perform that action at this time.
0 commit comments