From a1e7352a0343fe08819423d91271b708960df2e4 Mon Sep 17 00:00:00 2001 From: Richard Kettelerij Date: Thu, 25 Jan 2024 12:52:16 +0100 Subject: [PATCH] Use constants from C source --- cloud_sqlite_vfs.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/cloud_sqlite_vfs.go b/cloud_sqlite_vfs.go index 1cbe4f0..114de67 100644 --- a/cloud_sqlite_vfs.go +++ b/cloud_sqlite_vfs.go @@ -18,13 +18,6 @@ import ( "unsafe" ) -const ( - // Argument sets the maximum size of the cachefile in bytes. This option is only available for daemonless mode VFSs. - sqliteBcvCacheSize = 1 - // The argument enables (non-zero) or disables (zero) verbose libcurl logging. - sqliteBcvCurlVerbose = 4 -) - var KEY = "" // VFS represent a SQLite virtual file systems backed by (Azure/Google) cloud object storage. @@ -88,7 +81,7 @@ func NewVFS(vfsName string, storage string, account string, key string, } if curlVerbose { - C.sqlite3_bcvfs_config(pVfs, sqliteBcvCurlVerbose, 1) + C.sqlite3_bcvfs_config(pVfs, C.SQLITE_BCV_CURLVERBOSE, 1) } if C.sqlite3_bcvfs_isdaemon(pVfs) == 1 { vfs.Daemonless = false @@ -97,7 +90,7 @@ func NewVFS(vfsName string, storage string, account string, key string, if cacheSize > 0 { // cache only works in daemonless mode - C.sqlite3_bcvfs_config(pVfs, sqliteBcvCacheSize, C.longlong(cacheSize)) + C.sqlite3_bcvfs_config(pVfs, C.SQLITE_BCV_CACHESIZE, C.longlong(cacheSize)) } }