Commit Graph

91 Commits

Author SHA1 Message Date
Neil O'Toole
039cfdc285
Shell completion improvements (#389)
* Handle shell completion filter by group

* completion: added TestCompleteAllCobraRequestCmds

* completion: added TestCompleteFilterActiveGroup

* Tests are written

* Switched most proj.Abs calls to proj.Rel
2024-01-31 12:25:40 -07:00
Neil O'Toole
c7ab3ed79e
Shell completion fixes (#388)
* Now correctly handling cobra.ShellCompNoDescRequestCmd in cli.ExecuteWith

* wip: partially moved to new 'completion' cmd impl

* More comments clarification

* make fmt

* rename .completions.sh -> .generate-completions.sh

* Deleted unused cli/cmd_completion.go
2024-01-30 23:04:10 -07:00
Neil O'Toole
fd070eefd3
More file closing issues (test) (#386)
* Refactored tu.TempDir

* More files fiddling
2024-01-29 19:34:10 -07:00
Neil O'Toole
20b71c91b9
Moved time/tzdata import to main (#385) 2024-01-29 15:30:26 -07:00
Neil O'Toole
d8d5eb34df
Comments cleanup (#381) 2024-01-29 09:43:06 -07:00
Neil O'Toole
9a0b9b7a9c
Ingest checksum issue (#378)
- Refactor `Downloader.Get`.
2024-01-28 23:55:25 -07:00
Neil O'Toole
1b57138d72
More file closing (#376)
* file cleanup order
2024-01-28 07:58:46 -07:00
Neil O'Toole
54be3d614b
Linting (#373)
* More linting
2024-01-27 06:43:17 -07:00
Neil O'Toole
7c56377b40
Struct alignment (#369)
* Field alignment
2024-01-27 00:11:24 -07:00
Neil O'Toole
0841e7154f
tu.SkipIssue mechanism (#370)
* tu.SkipIssue mechanism
2024-01-26 22:36:04 -07:00
Neil O'Toole
452a91547c
Better handling of download cache refresh (#366)
* A failed download cache refresh no longer destroys the previous cache.
2024-01-26 15:18:38 -07:00
Neil O'Toole
cf0908abfa
JSON ingest performance (#365)
* Implement json ingestion stmt caching
2024-01-25 09:21:56 -07:00
Neil O'Toole
2898a92983
Refactor sqlmodel pkg (#364)
* Refactor sqlmodel pkg
2024-01-25 00:42:51 -07:00
Neil O'Toole
26f0c9a381
Refactor source.Files (#363)
* Moved `source.Files` to its own package, thus the type is now `files.Files`.
* Moved much of the location functionality from pkg `source` to its own package `location`.
2024-01-24 23:29:55 -07:00
Neil O'Toole
bb4a4edaab
Switch downloads to use streamcache. (#361)
* Switch downloads to use neilotoole/streamcache.
2024-01-24 21:01:24 -07:00
Neil O'Toole
db55986980
#307: Ingest cache (#354)
- Support for ingest cache, download cache, and progress bars.
2024-01-14 18:45:34 -07:00
Neil O'Toole
f85da722ad
#335 decimal type support (#336)
* Now using a dedicated `decimal.Decimal` type instead of float/string.
2023-11-21 14:49:52 -07:00
Neil O'Toole
096e209a01
sq inspect now has --schemata and --catalogs modes (#334)
* Add --schemata and --catalogs flags to "sq inspect"
2023-11-20 14:42:38 -07:00
Neil O'Toole
2de993acaa
Sort imports using goimports-reviser (#331) 2023-11-19 18:06:36 -07:00
Neil O'Toole
82727b3890
Refactor/rename database to pool (#328)
* Renamed `driver.Database` to `driver.Pool` (and related things)

* workflow: Update tparse version

* workflow: Update golangci-lint version
2023-11-18 19:21:14 -07:00
Neil O'Toole
f07edef14d
Add flag --src.schema (#326)
* Support for --src.schema in commands "slq", "sql", and "inspect"
2023-11-18 17:05:48 -07:00
Neil O'Toole
6b613d9adc
#279: SQLite virtual tables (#304)
* sqlite: initial extensions support, including virtual tables and fts5
* sqlite: virtual table columns now report type
2023-08-21 10:05:17 -06:00
Neil O'Toole
edc933d897
#200: Feature/200 excel driver (#301)
* Switch to excelize driver
2023-08-16 09:09:50 -06:00
Neil O'Toole
c7bba4dfe4
go1.21: changes to support slog as part of stdlib (#299)
* go1.21: changes to support slog as part of stdlib

* Removed accidentially checked-in line of code

* Fixed minor linting issues; reenable typecheck

* go1.21: switched to stdlib slices pkg
2023-08-12 12:54:14 -06:00
Neil O'Toole
21c1dea9c4
#200: Switch excel driver for output (#291)
* Switched from xlsxw to excelw for Excel outpt
2023-07-26 22:19:11 -06:00
Neil O'Toole
6ca26f4e4f
Column rename: template now has Alpha field. (#285)
* wip: refactor col name mungeing

* Finished refactoring FieldMeta

* Renamed tpl .AlphaIndex to .Alpha

* wip: debugging source config override

* Source config override passing tests

* CHANGELOG update
2023-07-08 19:34:53 -06:00
Neil O'Toole
9c5836ef1c
#191: XLSX driver auto-detects header row (#284)
* xlsx driver now detects header row.
2023-07-08 09:21:27 -06:00
Neil O'Toole
4ffaae925f
#99: Rename duplicate ingest headers (#283)
* CSV now renames duplicate ingest headers

* Fix broken test

* xlsx ingester now handles duplicate col names

* Update CHANGELOG

* Additional tests for ingest.column.rename

* Removed dead comment in grammar
2023-07-04 11:31:47 -06:00
neilotoole
82dc378612 Disable XLSX test on windows 2023-06-22 12:30:38 -06:00
Neil O'Toole
a5c4f9d6bd
#263: Inspect --overview; improved output (#273)
* Refactor tablew md writer

* wip: cmd inspect -v

* cmd inspect output improved

* cmd inspect tests

* cmd inspect: help text
2023-06-21 23:48:58 -06:00
Neil O'Toole
44d27207f8
#256: column-only queries (#257)
* Column-only queries
2023-06-17 19:28:11 -06:00
Neil O'Toole
9cb42bf579
#244: shell completion for "sq add LOCATION" (#246)
- Shell completion for `sq add LOCATION`.
2023-06-13 10:06:18 -06:00
Neil O'Toole
3ecdde5595
record.Record elements are now values, not pointers (#243)
* Updated record pkg

* sqlite migrated

* postgres migrated

* All DBs migrated

* CSV working

* Tests passing
2023-05-27 07:57:07 -06:00
neilotoole
4eb917f276 Make testh.OptLongOpen even longer 2023-05-25 23:02:11 -06:00
Neil O'Toole
2f2dfd6e47
#229: More diff (#233)
- Implement `sq diff --data`.
2023-05-22 09:08:14 -06:00
Neil O'Toole
1ea24dac4a
#229: sq diff core (#230)
* "sq diff" initial implementation

* Refactor "cli" pkg.
2023-05-19 08:24:18 -06:00
Neil O'Toole
c5cf6c0cc0
#217: Configurable timestamp format (#218)
* Moved time functions from pkg stringz to pkg timez

* Refactor options.Opt

* wip: initial work on configurable time layout

* wip: most printers now respect format.datetime and friends

* Folded pkg timefmt into timez

* Refactor options.Opt; refine options

* Add 'sq config set OPTION --help' mechanism

* Finished completion of OptDateFormatAsNumber and OptTimeFormatAsNumber
2023-05-06 20:36:34 -06:00
Neil O'Toole
964417dba7
Use flag --compact instead of --pretty (#216) 2023-05-05 11:41:22 -06:00
Neil O'Toole
3180334c0c
#199: Config overhaul (#214)
* refactor: partially moved over driver.Tuning params to options

* All knobs moved to options

* sq config edit: now has comments for options

* Major work complete on config/options overhaul

* Major work complete on config/options overhaul

* Updated help text for 'sq version'
2023-05-03 06:36:10 -06:00
Neil O'Toole
4521008b72
#199: sq config set (#212)
* Initial impl of 'sq config set'

* Verbose output for 'sq config get'

* config/options: refining 'sq config get'

* Refine 'sq config get': now prints defaults when --verbose

* cli: 'sq config get option.key' implemented

* cli: initial impl of 'sq config get --src'

* cli: refine 'sq config get'

* cli: 'sq config set --src' is implemented
2023-04-30 21:59:34 -06:00
Neil O'Toole
e5db7990bc
#199: Kill RunContext.Log (#211)
* refactor: RunContext.Log is dead

* Fiddling with options

* Changed default max conns to zero (no limit)

* Linting
2023-04-30 08:18:56 -06:00
Neil O'Toole
5e31da4644
Refactor config options (#209)
* Refactor config and options.
2023-04-26 09:16:42 -06:00
Neil O'Toole
a766340382
Pass context to config.Store (#207) 2023-04-22 07:37:07 -06:00
Neil O'Toole
81f631e135
Refactoring (#206)
* Renamed source.Type to source.DriverType for clarity

* More renaming wrt source.DriverType

* Renamed output.Formatting to output.Printing
2023-04-21 21:36:32 -06:00
neilotoole
c1b71fa68a Renamed testh.OptLongDB to testh.OptLongOpen; added it to other tests. 2023-04-19 08:08:26 -06:00
neilotoole
a6e033d26d Added OptLongDB to TestQuerySQL_Smoke 2023-04-19 07:23:46 -06:00
Neil O'Toole
98b47a2666
#199 - Config, refactoring (#204)
* refactor: moved cli flags to pkg cli/flag

* testh: add OptLongDB for long-running tests

* implement 'sq config dir'

* legacy dir migration: probably a bad idea

* cleanup

* Refactored SQ_CONFIG and --config

* added yaml writer

* Dialing in tests

* YAML output for 'sq driver ls'

* Significant refactoring of config

* Minor test for ioz

* Rename source.Set to source.Collection

* Cleaning up references to source.Set
2023-04-18 23:28:09 -06:00
Neil O'Toole
958d509088
Source groups (#198)
* Implemented source groups mechanism.
2023-04-15 16:28:51 -06:00
Neil O'Toole
ebb88b3a44
CSV empty string now treated as NULL (#190) 2023-04-09 19:29:13 -06:00
Neil O'Toole
ad23d5c116
Auto-detect CSV headers (#188)
* wip: initial header detection

* wip: refactored csv driver

* wip: Fixes to kind.Detector

* typo

* Refactor pkg csv files

* Update to changelog

* workflow: now running codacy and codeql on cron, not on push/pr
2023-04-09 08:44:27 -06:00