Documentation
¶
Index ¶
- func CountFilteredRows(db *sql.DB, table, column, query string) (int, error)
- func CountRows(db *sql.DB, table string) (int, error)
- func DeleteRow(db *sql.DB, table string, rowid int64) error
- func ExecQuery(db *sql.DB, query string) ([]string, [][]string, error)
- func FilterColumn(db *sql.DB, table, column, query string, limit, offset int) ([]string, []int64, [][]string, error)
- func GetColumns(db *sql.DB, table string) ([]string, error)
- func GetRows(db *sql.DB, table string, limit, offset int) ([]string, []int64, [][]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 CountFilteredRows ¶ added in v0.1.5
CountFilteredRows returns the number of rows matching a LIKE filter.
func DeleteRow ¶ added in v0.1.9
DeleteRow removes a single row from a table identified by its rowid. Works for any default SQLite table (i.e., not declared WITHOUT ROWID).
func ExecQuery ¶
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, offset int) ([]string, []int64, [][]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 ¶
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 rowids and all values as strings. The rowid is selected separately so DELETE/UPDATE can target the exact row regardless of primary key shape.
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.