db_open_nocgo.go 619 B

1234567891011121314151617181920212223
  1. // Copyright (C) 2025 The Syncthing Authors.
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this file,
  5. // You can obtain one at https://mozilla.org/MPL/2.0/.
  6. //go:build !cgo && !wazero
  7. package sqlite
  8. import (
  9. "github.com/syncthing/syncthing/lib/build"
  10. _ "modernc.org/sqlite" // register sqlite database driver
  11. )
  12. const (
  13. dbDriver = "sqlite"
  14. commonOptions = "_pragma=foreign_keys(1)&_pragma=recursive_triggers(1)&_pragma=cache_size(-65536)&_pragma=synchronous(1)"
  15. )
  16. func init() {
  17. build.AddTag("modernc-sqlite")
  18. }