Documentation
¶
Index ¶
- func ExecQuery(db *sql.DB, query string) ([]string, [][]string, error)
- func FilterColumn(db *sql.DB, table, column, query string, limit int) ([]string, [][]string, error)
- func GetColumns(db *sql.DB, table string) ([]string, error)
- func GetRows(db *sql.DB, table string, limit int) ([]string, [][]string, error)
- func ListTables(db *sql.DB) ([]string, error)
- func Open(path string) (*sql.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecQuery ¶
ExecQuery runs an arbitrary SQL query and returns columns + string rows. Intended for custom queries from the query popup.
func FilterColumn ¶
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 ¶
GetColumns returns column names for a table using PRAGMA table_info. This is a SQLite-specific command that returns schema metadata.
func GetRows ¶
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 ¶
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'.
Types ¶
This section is empty.