1515// specific language governing permissions and limitations
1616// under the License.
1717
18- use std:: fmt:: Debug ;
1918use std:: str:: FromStr ;
19+ use std:: sync:: Arc ;
2020
2121use sqlx:: sqlite:: SqliteConnectOptions ;
2222use tokio:: sync:: OnceCell ;
@@ -136,7 +136,7 @@ impl Builder for SqliteBuilder {
136136
137137 let root = normalize_root ( self . config . root . as_deref ( ) . unwrap_or ( "/" ) ) ;
138138
139- Ok ( SqliteAccessor :: new ( SqliteCore {
139+ Ok ( SqliteBackend :: new ( SqliteCore {
140140 pool : OnceCell :: new ( ) ,
141141 config,
142142 table,
@@ -168,13 +168,13 @@ pub fn parse_sqlite_error(err: sqlx::Error) -> Error {
168168
169169/// SqliteAccessor implements Access trait directly
170170#[ derive( Debug , Clone ) ]
171- pub struct SqliteAccessor {
172- core : std :: sync :: Arc < SqliteCore > ,
171+ pub struct SqliteBackend {
172+ core : Arc < SqliteCore > ,
173173 root : String ,
174- info : std :: sync :: Arc < AccessorInfo > ,
174+ info : Arc < AccessorInfo > ,
175175}
176176
177- impl SqliteAccessor {
177+ impl SqliteBackend {
178178 fn new ( core : SqliteCore ) -> Self {
179179 let info = AccessorInfo :: default ( ) ;
180180 info. set_scheme ( Scheme :: Sqlite . into ( ) ) ;
@@ -193,9 +193,9 @@ impl SqliteAccessor {
193193 } ) ;
194194
195195 Self {
196- core : std :: sync :: Arc :: new ( core) ,
196+ core : Arc :: new ( core) ,
197197 root : "/" . to_string ( ) ,
198- info : std :: sync :: Arc :: new ( info) ,
198+ info : Arc :: new ( info) ,
199199 }
200200 }
201201
@@ -206,13 +206,13 @@ impl SqliteAccessor {
206206 }
207207}
208208
209- impl Access for SqliteAccessor {
209+ impl Access for SqliteBackend {
210210 type Reader = Buffer ;
211211 type Writer = SqliteWriter ;
212212 type Lister = ( ) ;
213213 type Deleter = oio:: OneShotDeleter < SqliteDeleter > ;
214214
215- fn info ( & self ) -> std :: sync :: Arc < AccessorInfo > {
215+ fn info ( & self ) -> Arc < AccessorInfo > {
216216 self . info . clone ( )
217217 }
218218
@@ -331,7 +331,7 @@ mod test {
331331 value_field : "value" . to_string ( ) ,
332332 } ;
333333
334- let accessor = SqliteAccessor :: new ( core) ;
334+ let accessor = SqliteBackend :: new ( core) ;
335335
336336 // Verify basic properties
337337 assert_eq ! ( accessor. root, "/" ) ;
@@ -355,7 +355,7 @@ mod test {
355355 value_field : "value" . to_string ( ) ,
356356 } ;
357357
358- let accessor = SqliteAccessor :: new ( core) . with_normalized_root ( "/test/" . to_string ( ) ) ;
358+ let accessor = SqliteBackend :: new ( core) . with_normalized_root ( "/test/" . to_string ( ) ) ;
359359
360360 assert_eq ! ( accessor. root, "/test/" ) ;
361361 assert_eq ! ( accessor. info. root( ) , "/test/" . into( ) ) ;
0 commit comments