sqlite

package
v0.8.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: Apache-2.0, Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const SourceType string = "sqlite"

Variables

View Source
var MaxRows = 1000

MaxRows bounds the rows a query returns (Blitz).

Functions

This section is empty.

Types

type Config

type Config struct {
	Name         string `yaml:"name" validate:"required"`
	Type         string `yaml:"type" validate:"required"`
	Database     string `yaml:"database" validate:"required"` // Path to SQLite database file
	SQLCommenter *bool  `yaml:"sqlCommenter"`
	// ReadOnly opens the file read-only (Blitz): writes fail in SQLite
	// itself, and tools that write aren't offered.
	ReadOnly bool `yaml:"readOnly"`
}

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

func (Config) SourceConfigType

func (r Config) SourceConfigType() string

type Source

type Source struct {
	Config
	Db *sql.DB
}

func (*Source) Close

func (s *Source) Close() error

Close closes the database (Blitz: Toolbox never did).

func (*Source) IsReadOnly

func (s *Source) IsReadOnly() bool

func (*Source) RunSQL

func (s *Source) RunSQL(ctx context.Context, statement string, params []any) (any, error)

func (*Source) SQLiteDB

func (s *Source) SQLiteDB() *sql.DB

func (*Source) SourceType

func (s *Source) SourceType() string

func (*Source) ToConfig

func (s *Source) ToConfig() sources.SourceConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL