sqlite.go 559 B

1234567891011121314151617181920212223242526
  1. //go:build sqlite
  2. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  3. // SPDX-License-Identifier: Apache-2.0
  4. package database // import "miniflux.app/v2/internal/database"
  5. import (
  6. "database/sql"
  7. "time"
  8. _ "github.com/mattn/go-sqlite3"
  9. )
  10. // NewConnectionPool configures the database connection pool.
  11. func NewConnectionPool(dsn string, _, _ int, _ time.Duration) (*sql.DB, error) {
  12. db, err := sql.Open("sqlite3", dsn)
  13. if err != nil {
  14. return nil, err
  15. }
  16. return db, nil
  17. }
  18. func getDriverStr() string {
  19. return "sqlite3"
  20. }