@@ -252,49 +252,49 @@ func (fh FileHandler) DropDatabase(dbTitle string) (err error) {
252
252
}
253
253
254
254
func (fh FileHandler ) Read (file * os.File , offset int , bs * []byte , id int ) (err error ) {
255
- if strings .HasSuffix (file .Name (), "nodes.store" ) {
256
- file = globals .NodesStore
257
- }
258
- if strings .HasSuffix (file .Name (), "labels.store" ) {
259
- file = globals .LabelsStore
260
- }
261
- if strings .HasSuffix (file .Name (), "relationships.store" ) {
262
- file = globals .RelationshipsStore
263
- }
264
- if strings .HasSuffix (file .Name (), "properties.store" ) {
265
- file = globals .PropertiesStore
266
- }
267
- if strings .HasSuffix (file .Name (), "string.store" ) {
268
- file = globals .StringStore
269
- }
270
- if strings .HasSuffix (file .Name (), "double.store" ) {
271
- file = globals .DoubleStore
272
- }
255
+ // if strings.HasSuffix(file.Name(), "nodes.store") {
256
+ // file = globals.NodesStore
257
+ // }
258
+ // if strings.HasSuffix(file.Name(), "labels.store") {
259
+ // file = globals.LabelsStore
260
+ // }
261
+ // if strings.HasSuffix(file.Name(), "relationships.store") {
262
+ // file = globals.RelationshipsStore
263
+ // }
264
+ // if strings.HasSuffix(file.Name(), "properties.store") {
265
+ // file = globals.PropertiesStore
266
+ // }
267
+ // if strings.HasSuffix(file.Name(), "string.store") {
268
+ // file = globals.StringStore
269
+ // }
270
+ // if strings.HasSuffix(file.Name(), "double.store") {
271
+ // file = globals.DoubleStore
272
+ // }
273
273
bytesRead , err := file .ReadAt (* bs , int64 (offset ))
274
274
if bytesRead != len (* bs ) {
275
275
err = errors .New ("read: read less bytes than expected" )
276
276
}
277
277
return err
278
278
}
279
279
func (fh FileHandler ) Write (file * os.File , offset int , bs []byte , id int ) (err error ) {
280
- if strings .HasSuffix (file .Name (), "nodes.store" ) {
281
- file = globals .NodesStore
282
- }
283
- if strings .HasSuffix (file .Name (), "labels.store" ) {
284
- file = globals .LabelsStore
285
- }
286
- if strings .HasSuffix (file .Name (), "relationships.store" ) {
287
- file = globals .RelationshipsStore
288
- }
289
- if strings .HasSuffix (file .Name (), "properties.store" ) {
290
- file = globals .PropertiesStore
291
- }
292
- if strings .HasSuffix (file .Name (), "string.store" ) {
293
- file = globals .StringStore
294
- }
295
- if strings .HasSuffix (file .Name (), "double.store" ) {
296
- file = globals .DoubleStore
297
- }
280
+ // if strings.HasSuffix(file.Name(), "nodes.store") {
281
+ // file = globals.NodesStore
282
+ // }
283
+ // if strings.HasSuffix(file.Name(), "labels.store") {
284
+ // file = globals.LabelsStore
285
+ // }
286
+ // if strings.HasSuffix(file.Name(), "relationships.store") {
287
+ // file = globals.RelationshipsStore
288
+ // }
289
+ // if strings.HasSuffix(file.Name(), "properties.store") {
290
+ // file = globals.PropertiesStore
291
+ // }
292
+ // if strings.HasSuffix(file.Name(), "string.store") {
293
+ // file = globals.StringStore
294
+ // }
295
+ // if strings.HasSuffix(file.Name(), "double.store") {
296
+ // file = globals.DoubleStore
297
+ // }
298
298
bytesWritten , err := file .WriteAt (bs , int64 (offset ))
299
299
if bytesWritten != len (bs ) {
300
300
err = errors .New ("write: wrote less bytes than expected" )
0 commit comments