sqlite

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sqlite registers the SQLite driver (via mattn/go-sqlite3) and provides a Grammar implementation. Importing this package is enough to make `sqlite` and `sqlite3` available to database.Manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grammar

type Grammar struct{}

Grammar implements database.Grammar for SQLite.

func (Grammar) CompileType

func (Grammar) CompileType(kind string, opts database.ColumnTypeOptions) string

CompileType renders a column type for SQLite.

func (Grammar) LastInsertIDStrategy

func (Grammar) LastInsertIDStrategy() database.InsertIDStrategy

LastInsertIDStrategy returns the strategy used to retrieve the insert ID.

func (Grammar) Name

func (Grammar) Name() string

Name returns the driver name.

func (Grammar) Placeholder

func (Grammar) Placeholder(_ int) string

Placeholder returns "?" for any index — SQLite uses positional placeholders.

func (Grammar) Quote

func (Grammar) Quote(ident string) string

Quote wraps an identifier in double quotes. Double-quoted identifiers are the SQL standard and are supported by SQLite.

func (Grammar) SupportsReturning

func (Grammar) SupportsReturning() bool

SupportsReturning indicates SQLite ≥ 3.35 supports RETURNING. We default to false to keep ID retrieval via LastInsertId broadly compatible.

Jump to

Keyboard shortcuts

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