Documentation
¶
Index ¶
- func RunCheck(w io.Writer, dbPath string, opts Options) error
- func RunColumns(w io.Writer, dbPath, table string, opts Options) error
- func RunDump(w io.Writer, dbPath, table string, opts Options) error
- func RunImport(w io.Writer, dbPath, sqlFile string, opts Options) error
- func RunIndexes(w io.Writer, dbPath string, opts Options) error
- func RunQuery(w io.Writer, dbPath, query string, opts Options) error
- func RunSchema(w io.Writer, dbPath, table string, opts Options) error
- func RunStats(w io.Writer, dbPath string, opts Options) error
- func RunTables(w io.Writer, dbPath string, opts Options) error
- func RunVacuum(w io.Writer, dbPath string, opts Options) error
- type ColumnInfo
- type IndexInfo
- type Options
- type StatsResult
- type TableInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunColumns ¶
RunColumns shows table columns
func RunIndexes ¶
RunIndexes lists all indexes
Types ¶
type ColumnInfo ¶
type ColumnInfo struct {
CID int `json:"cid"`
Name string `json:"name"`
Type string `json:"type"`
NotNull bool `json:"notnull"`
Default any `json:"default"`
PrimaryKey bool `json:"pk"`
}
ColumnInfo represents column information for JSON output
type IndexInfo ¶
type IndexInfo struct {
Name string `json:"name"`
Table string `json:"table"`
Unique bool `json:"unique"`
Columns string `json:"columns"`
}
IndexInfo represents index information for JSON output
type Options ¶
type Options struct {
JSON bool // --json: output as JSON
Header bool // --header: show column headers
Separator string // --separator: column separator
Mode string // --mode: output mode (column, csv, line, etc)
Logger *logger.Logger // optional logger for query logging
LogData bool // --log-data: include result data in logs (careful with large results)
}
Options configures sqlite command behavior
type StatsResult ¶
type StatsResult struct {
Path string `json:"path"`
Size int64 `json:"size"`
Tables int `json:"tables"`
Indexes int `json:"indexes"`
Views int `json:"views"`
Triggers int `json:"triggers"`
PageSize int64 `json:"page_size"`
PageCount int64 `json:"page_count"`
FreePages int64 `json:"free_pages"`
SchemaVer int64 `json:"schema_version"`
UserVer int64 `json:"user_version"`
WALEnabled bool `json:"wal_enabled"`
}
StatsResult represents database statistics for JSON output
Click to show internal directories.
Click to hide internal directories.