db

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 4 Imported by: ? 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

This section is empty.

Variables

This section is empty.

Functions

func ExecQuery

func ExecQuery(db *sql.DB, query string) ([]string, [][]string, error)

ExecQuery runs an arbitrary SQL query and returns columns + string rows. Intended for custom queries from the query popup.

func FilterColumn

func FilterColumn(db *sql.DB, table, column, query string, limit int) ([]string, [][]string, error)

FilterColumn searches a table for rows where a single column matches the query (case-insensitive LIKE). Single-column search is fast even on large tables.

func GetColumns

func GetColumns(db *sql.DB, table string) ([]string, error)

GetColumns returns column names for a table using PRAGMA table_info. This is a SQLite-specific command that returns schema metadata.

func GetRows

func GetRows(db *sql.DB, table string, limit int) ([]string, [][]string, error)

GetRows fetches up to `limit` rows from a table, returning all values as strings. This is intentionally simple — for a read-only explorer, we don't need type-specific handling.

func ListTables

func ListTables(db *sql.DB) ([]string, error)

ListTables returns the names of all user-created tables in the database. sqlite_master is a system table that stores the schema — every CREATE TABLE statement lives here as a row with type='table'.

func Open

func Open(path string) (*sql.DB, error)

Open connects to a SQLite database file. It uses the standard database/sql interface, so all the usual Query/Exec methods work.

Types

This section is empty.

Jump to

Keyboard shortcuts

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