query

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildLoadSQL

func BuildLoadSQL(opts LoadOptions) string

func ExpandArchiveGlobs

func ExpandArchiveGlobs(archiveGlobs []string) ([]string, error)

func ListPresets

func ListPresets() []string

func LoadArchive

func LoadArchive(ctx context.Context, conn *sql.Conn, opts LoadOptions) error

func NormalizeQueryForValidation added in v0.0.4

func NormalizeQueryForValidation(sqlText string) (string, error)

func NormalizeValue

func NormalizeValue(value any) any

func OpenConnection

func OpenConnection(ctx context.Context, dbPath string) (*sql.DB, *sql.Conn, error)

func ResolvePresetSQL

func ResolvePresetSQL(name string, tableName string) (string, error)

func ResolveSQL

func ResolveSQL(presetName string, inlineSQL string, sqlFile string, tableName string) (string, error)

func RunIntoProcessor

func RunIntoProcessor(ctx context.Context, conn *sql.Conn, sqlText string, gp middlewares.Processor) error

func ValidateIdentifier

func ValidateIdentifier(identifier string) error

func ValidateReadOnlyQuery added in v0.0.4

func ValidateReadOnlyQuery(sqlText string) error

Types

type LoadOptions

type LoadOptions struct {
	ArchiveGlobs  []string
	TableName     string
	PersistLoaded bool
}

type PresetEntry added in v0.0.6

type PresetEntry struct {
	Name   string
	Folder string
	Path   string
	File   string
}

func ListPresetEntries added in v0.0.6

func ListPresetEntries() []PresetEntry

Jump to

Keyboard shortcuts

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