Skip to content

Commit f025ffb

Browse files
committed
Fix naming.
1 parent aa4357a commit f025ffb

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

util/vfsutil/wrap.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,18 @@ func WrapLockState(f vfs.File) vfs.LockLevel {
3838
return vfs.LOCK_EXCLUSIVE + 1 // UNKNOWN_LOCK
3939
}
4040

41-
// WrapPersistentWAL helps wrap [vfs.FilePersistentWAL].
42-
func WrapPersistentWAL(f vfs.File) bool {
43-
if f, ok := f.(vfs.FilePersistentWAL); ok {
44-
return f.PersistentWAL()
41+
// WrapPersistWAL helps wrap [vfs.FilePersistWAL].
42+
func WrapPersistWAL(f vfs.File) bool {
43+
if f, ok := f.(vfs.FilePersistWAL); ok {
44+
return f.PersistWAL()
4545
}
4646
return false
4747
}
4848

49-
// WrapSetPersistentWAL helps wrap [vfs.FilePersistentWAL].
49+
// WrapSetPersistentWAL helps wrap [vfs.FilePersistWAL].
5050
func WrapSetPersistentWAL(f vfs.File, keepWAL bool) {
51-
if f, ok := f.(vfs.FilePersistentWAL); ok {
52-
f.SetPersistentWAL(keepWAL)
51+
if f, ok := f.(vfs.FilePersistWAL); ok {
52+
f.SetPersistWAL(keepWAL)
5353
}
5454
}
5555

vfs/adiantum/hbsh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (h *hbshFile) LockState() vfs.LockLevel {
238238
}
239239

240240
func (h *hbshFile) PersistentWAL() bool {
241-
return vfsutil.WrapPersistentWAL(h.File) // notest
241+
return vfsutil.WrapPersistWAL(h.File) // notest
242242
}
243243

244244
func (h *hbshFile) SetPersistentWAL(keepWAL bool) {

vfs/api.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ type FileLockState interface {
6565
LockState() LockLevel
6666
}
6767

68-
// FilePersistentWAL extends File to implement the
68+
// FilePersistWAL extends File to implement the
6969
// SQLITE_FCNTL_PERSIST_WAL file control opcode.
7070
//
7171
// https://sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal
72-
type FilePersistentWAL interface {
72+
type FilePersistWAL interface {
7373
File
74-
PersistentWAL() bool
75-
SetPersistentWAL(bool)
74+
PersistWAL() bool
75+
SetPersistWAL(bool)
7676
}
7777

7878
// FilePowersafeOverwrite extends File to implement the

vfs/file.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ var (
142142
_ FileLockState = &vfsFile{}
143143
_ FileHasMoved = &vfsFile{}
144144
_ FileSizeHint = &vfsFile{}
145-
_ FilePersistentWAL = &vfsFile{}
145+
_ FilePersistWAL = &vfsFile{}
146146
_ FilePowersafeOverwrite = &vfsFile{}
147147
)
148148

@@ -217,6 +217,6 @@ func (f *vfsFile) HasMoved() (bool, error) {
217217

218218
func (f *vfsFile) LockState() LockLevel { return f.lock }
219219
func (f *vfsFile) PowersafeOverwrite() bool { return f.psow }
220-
func (f *vfsFile) PersistentWAL() bool { return f.keepWAL }
220+
func (f *vfsFile) PersistWAL() bool { return f.keepWAL }
221221
func (f *vfsFile) SetPowersafeOverwrite(psow bool) { f.psow = psow }
222-
func (f *vfsFile) SetPersistentWAL(keepWAL bool) { f.keepWAL = keepWAL }
222+
func (f *vfsFile) SetPersistWAL(keepWAL bool) { f.keepWAL = keepWAL }

vfs/vfs.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ func vfsFileControlImpl(ctx context.Context, mod api.Module, file File, op _Fcnt
255255
}
256256

257257
case _FCNTL_PERSIST_WAL:
258-
if file, ok := file.(FilePersistentWAL); ok {
258+
if file, ok := file.(FilePersistWAL); ok {
259259
if i := util.ReadUint32(mod, pArg); int32(i) >= 0 {
260-
file.SetPersistentWAL(i != 0)
261-
} else if file.PersistentWAL() {
260+
file.SetPersistWAL(i != 0)
261+
} else if file.PersistWAL() {
262262
util.WriteUint32(mod, pArg, 1)
263263
} else {
264264
util.WriteUint32(mod, pArg, 0)

vfs/xts/xts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func (x *xtsFile) LockState() vfs.LockLevel {
234234
}
235235

236236
func (x *xtsFile) PersistentWAL() bool {
237-
return vfsutil.WrapPersistentWAL(x.File) // notest
237+
return vfsutil.WrapPersistWAL(x.File) // notest
238238
}
239239

240240
func (x *xtsFile) SetPersistentWAL(keepWAL bool) {

0 commit comments

Comments
 (0)