sqlite

package
v2.11.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package sqlite provides the SQLite driver for the SQL executor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLiteDriver

type SQLiteDriver struct {
	// contains filtered or unexported fields
}

SQLiteDriver implements the Driver interface for SQLite.

func (*SQLiteDriver) AcquireAdvisoryLock

func (d *SQLiteDriver) AcquireAdvisoryLock(_ context.Context, _ *sql.DB, _ string) (func() error, error)

AcquireAdvisoryLock is not supported for SQLite.

func (*SQLiteDriver) BuildInsertQuery

func (d *SQLiteDriver) BuildInsertQuery(table string, columns []string, rowCount int, onConflict, conflictTarget string, updateColumns []string) string

BuildInsertQuery generates a multi-row INSERT statement for SQLite. Note: SQLite uses INSERT OR IGNORE/REPLACE which doesn't need conflictTarget or updateColumns, but we accept these parameters for interface compatibility with PostgreSQL.

func (*SQLiteDriver) Connect

func (d *SQLiteDriver) Connect(ctx context.Context, cfg *sqlexec.Config) (*sql.DB, func() error, error)

Connect establishes a connection to SQLite.

func (*SQLiteDriver) ConvertNamedParams

func (d *SQLiteDriver) ConvertNamedParams(query string, params map[string]any) (string, []any, error)

ConvertNamedParams converts named parameters to SQLite positional format.

func (*SQLiteDriver) Name

func (d *SQLiteDriver) Name() string

Name returns the driver name.

func (*SQLiteDriver) PlaceholderFormat

func (d *SQLiteDriver) PlaceholderFormat() string

PlaceholderFormat returns the SQLite placeholder format.

func (*SQLiteDriver) QuoteIdentifier

func (d *SQLiteDriver) QuoteIdentifier(name string) string

QuoteIdentifier quotes a table or column name for SQLite. This handles reserved words and special characters by wrapping in double quotes.

func (*SQLiteDriver) SupportsAdvisoryLock

func (d *SQLiteDriver) SupportsAdvisoryLock() bool

SupportsAdvisoryLock returns false as SQLite doesn't support advisory locks.

Jump to

Keyboard shortcuts

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