github.com/ncruces/go-sqlite3@v0.15.1-0.20240520133447-53eef1510ff0/vfs/shm_other.go (about)

     1  //go:build !(darwin || linux) || !(amd64 || arm64 || riscv64) || sqlite3_flock || sqlite3_noshm || sqlite3_nosys
     2  
     3  package vfs
     4  
     5  // SupportsSharedMemory is false on platforms that do not support shared memory.
     6  // To use [WAL without shared-memory], you need to set [EXCLUSIVE locking mode].
     7  //
     8  // [WAL without shared-memory]: https://sqlite.org/wal.html#noshm
     9  // [EXCLUSIVE locking mode]: https://sqlite.org/pragma.html#pragma_locking_mode
    10  const SupportsSharedMemory = false
    11  
    12  // NewSharedMemory returns a shared-memory WAL-index
    13  // backed by a file with the given path.
    14  // It will return nil if shared-memory is not supported,
    15  // or not appropriate for the given flags.
    16  // Only [OPEN_MAIN_DB] databases may need a WAL-index.
    17  // You must ensure all concurrent accesses to a database
    18  // use shared-memory instances created with the same path.
    19  func NewSharedMemory(path string, flags OpenFlag) SharedMemory {
    20  	return nil
    21  }