Commit 8eed3e5
Part A (#458): Register watch command in CLI root
- Added cmd/gosqlx/cmd/watch_cmd.go with cobra command wrapping existing FileWatcher
- Supports --mode (validate|format), --debounce, --clear, --watch-verbose flags
- gosqlx watch now appears in --help output
Part B (#460): Pool utilization stats API
- Added pkg/metrics/pool_stats.go: PoolStat struct, RecordNamedPoolGet/Put, GetPoolStats, ResetPoolStats
- Instrumented tokenizer, parser, and AST pools with RecordNamedPoolGet/Put calls
- Added cmd/gosqlx/cmd/stats.go: gosqlx stats command with human-readable table and --json flag
- Added pkg/metrics/pool_stats_test.go with 8 race-safe tests including concurrent safety
Part C (#459): JSON function parsing tests
- Added pkg/sql/parser/json_functions_test.go: 12 tests covering JSON_OBJECT, JSON_BUILD_ARRAY,
JSON_EXTRACT, JSON_AGG, JSON_BUILD_OBJECT, JSON_VALUE, JSON_CONTAINS, JSON_SET, JSONB_AGG,
TO_JSON, JSON_ARRAYAGG, JSON_LENGTH, and arrow operators (all PASS)
- Parser already handles JSON functions as generic FunctionCall nodes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7a50e26 commit 8eed3e5
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
11 | 17 | | |
12 | 18 | | |
13 | 19 | | |
| |||
0 commit comments