@@ -4,12 +4,11 @@ use crate::{
44 commons:: exception:: connect_exception:: ConnectException ,
55 domain:: {
66 collection:: {
7- collection_definition:: CollectionDefinition ,
8- generate_collection_query:: GenerateCollectionQuery ,
7+ collection_data:: CollectionData , collection_definition:: CollectionDefinition , generate_collection_query:: GenerateCollectionQuery
98 } ,
109 data_base:: generate_database_query:: GenerateDatabaseQuery ,
1110 document:: { document_data:: DocumentData , document_schema:: DocumentSchema } ,
12- filter:: data_base_query:: DataBaseQuery ,
11+ filter:: { collection_query :: CollectionQuery , data_base_query:: DataBaseQuery , document_query :: DocumentQuery } ,
1312 table:: table_data_group:: TableDataGroup ,
1413 } ,
1514} ;
@@ -26,23 +25,20 @@ pub trait IDBRepository: Clone + Send + Sync {
2625 async fn data_base_drop ( & self , query : & GenerateDatabaseQuery ) -> Result < String , ConnectException > ;
2726
2827 async fn collection_accept_schema ( & self ) -> Result < CollectionDefinition , ConnectException > ;
29- async fn collection_metadata ( & self , query : & DataBaseQuery ) -> Result < Vec < TableDataGroup > , ConnectException > ;
28+ async fn collection_metadata ( & self , query : & CollectionQuery ) -> Result < Vec < TableDataGroup > , ConnectException > ;
3029 async fn collection_find_all ( & self , query : & DataBaseQuery ) -> Result < Vec < String > , ConnectException > ;
31- async fn collection_exists ( & self , query : & DataBaseQuery ) -> Result < bool , ConnectException > ;
30+ async fn collection_exists ( & self , query : & CollectionQuery ) -> Result < bool , ConnectException > ;
3231 async fn collection_create ( & self , query : & GenerateCollectionQuery ) -> Result < String , ConnectException > ;
3332 async fn collection_drop ( & self , query : & GenerateCollectionQuery ) -> Result < String , ConnectException > ;
34- async fn collection_rename ( & self , query : & DataBaseQuery , name : & str ) -> Result < String , ConnectException > ;
35- async fn collection_export ( & self , query : & DataBaseQuery ) -> Result < Vec < DocumentData > , ConnectException > ;
36- async fn collection_import ( & self , query : & DataBaseQuery , documents : Vec < String > ) -> Result < String , ConnectException > ;
37-
38- async fn find_query_lite ( & self , query : & DataBaseQuery ) -> Result < Vec < String > , ConnectException > ;
39- async fn find_query ( & self , query : & DataBaseQuery ) -> Result < Vec < DocumentData > , ConnectException > ;
40-
41- async fn find_all_lite ( & self , query : & DataBaseQuery ) -> Result < Vec < String > , ConnectException > ;
42- async fn find_all ( & self , query : & DataBaseQuery ) -> Result < Vec < DocumentData > , ConnectException > ;
43- async fn find ( & self , query : & DataBaseQuery ) -> Result < Option < DocumentData > , ConnectException > ;
44- async fn schema ( & self , query : & DataBaseQuery ) -> Result < DocumentSchema , ConnectException > ;
45- async fn insert ( & self , query : & DataBaseQuery , value : & str ) -> Result < DocumentData , ConnectException > ;
46- async fn update ( & self , query : & DataBaseQuery , value : & str ) -> Result < Vec < DocumentData > , ConnectException > ;
47- async fn delete ( & self , query : & DataBaseQuery ) -> Result < Vec < DocumentData > , ConnectException > ;
33+ async fn collection_rename ( & self , query : & CollectionQuery , name : & str ) -> Result < String , ConnectException > ;
34+ async fn collection_export ( & self , query : & CollectionQuery ) -> Result < Vec < DocumentData > , ConnectException > ;
35+ async fn collection_import ( & self , query : & CollectionQuery , documents : Vec < String > ) -> Result < String , ConnectException > ;
36+
37+ async fn find_all ( & self , query : & DocumentQuery ) -> Result < CollectionData , ConnectException > ;
38+ async fn find_query ( & self , query : & DocumentQuery ) -> Result < CollectionData , ConnectException > ;
39+ async fn find ( & self , query : & DocumentQuery ) -> Result < Option < DocumentData > , ConnectException > ;
40+ async fn schema ( & self , query : & CollectionQuery ) -> Result < DocumentSchema , ConnectException > ;
41+ async fn insert ( & self , query : & CollectionQuery , value : & str ) -> Result < DocumentData , ConnectException > ;
42+ async fn update ( & self , query : & DocumentQuery , value : & str ) -> Result < Vec < DocumentData > , ConnectException > ;
43+ async fn delete ( & self , query : & DocumentQuery ) -> Result < Vec < DocumentData > , ConnectException > ;
4844}
0 commit comments