11use  ext_php_rs:: prelude:: * ; 
2- use  rust_rocksdb:: { DB ,   Options ,  WriteBatchWithTransaction } ; 
2+ use  rust_rocksdb:: { Options ,  WriteBatchWithTransaction ,   DB } ; 
33use  std:: sync:: { Arc ,  Mutex } ; 
44use  std:: time:: Duration ; 
55
@@ -13,7 +13,6 @@ pub struct RocksDBWriteBatch {
1313impl  RocksDBWriteBatch  { 
1414    #[ constructor]  
1515    pub  fn  __construct ( path :  String ,  ttl_secs :  Option < u64 > )  -> PhpResult < Self >  { 
16- 
1716        let  mut  opts = Options :: default ( ) ; 
1817        opts. create_if_missing ( true ) ; 
1918        opts. set_max_open_files ( 1000 ) ; 
@@ -42,12 +41,7 @@ impl RocksDBWriteBatch {
4241        Ok ( ( ) ) 
4342    } 
4443
45-     pub  fn  put ( 
46-         & self , 
47-         key :  String , 
48-         value :  String , 
49-         cf_name :  Option < String > , 
50-     )  -> PhpResult < ( ) >  { 
44+     pub  fn  put ( & self ,  key :  String ,  value :  String ,  cf_name :  Option < String > )  -> PhpResult < ( ) >  { 
5145        let  mut  batch = self . write_batch . lock ( ) . unwrap ( ) ; 
5246        if  let  Some ( ref  mut  wb)  = * batch { 
5347            match  cf_name { 
@@ -68,12 +62,7 @@ impl RocksDBWriteBatch {
6862        Ok ( ( ) ) 
6963    } 
7064
71-     pub  fn  merge ( 
72-         & self , 
73-         key :  String , 
74-         value :  String , 
75-         cf_name :  Option < String > , 
76-     )  -> PhpResult < ( ) >  { 
65+     pub  fn  merge ( & self ,  key :  String ,  value :  String ,  cf_name :  Option < String > )  -> PhpResult < ( ) >  { 
7766        let  mut  batch = self . write_batch . lock ( ) . unwrap ( ) ; 
7867        if  let  Some ( ref  mut  wb)  = * batch { 
7968            match  cf_name { 
0 commit comments