Versions in this module Expand all Collapse all v1 v1.21.0 Oct 10, 2026 v1.20.3 Aug 31, 2026 v1.20.2 Aug 21, 2026 v1.20.1 Aug 14, 2026 v1.20.0 Aug 14, 2026 v1.2.0-alpha.1 Aug 13, 2026 v1.2.0-alpha Aug 13, 2026 v1.1.2 Aug 3, 2026 Changes in this version + func DefaultFilePath() string + func GetXSQLAttrEnv() string + func ParseAttrs(cliAttrs []string, envAttr string) map[string]string + func ValidateAttr(key, value string) error + func ValidateAttrs(attrs map[string]string) error + type AggregatedRecord struct + Attrs map[string]string + AvgMs int64 + Cmd string + Fail int + OK int + Profile string + func Query(records []*Record, filter Filter) []*AggregatedRecord + type Filter struct + Attrs map[string]string + Cmd string + Profile string + Since *time.Time + Until *time.Time + type LogResult struct + Records []Record + Total int + type Record struct + Attrs map[string]string + Cmd string + DurationMs int64 + ErrorCode string + OK bool + Profile string + SQL string + Timestamp time.Time + type StatsConfig struct + Enabled bool + FilePath string + LogSQL bool + RetentionDays int + type StatsLogTableFormatter struct + Records []Record + func (f *StatsLogTableFormatter) ToTableData() ([]string, []map[string]any, bool) + type StatsResult struct + Records []*AggregatedRecord + type StatsTableFormatter struct + Records []*AggregatedRecord + func (f *StatsTableFormatter) ToTableData() ([]string, []map[string]any, bool) + type Store struct + func NewStore(path string) *Store + func (s *Store) Append(r *Record) error + func (s *Store) Cleanup(retentionDays int) (int, error) + func (s *Store) Load() ([]*Record, error) + func (s *Store) Reset() error