2023-04-09 00:25:43 +03:00
|
|
|
# CHANGELOG
|
2022-11-20 18:14:53 +03:00
|
|
|
|
|
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
|
|
|
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
|
|
2023-04-10 04:33:00 +03:00
|
|
|
## [v0.32.0] - 2023-04-09
|
2023-04-09 17:44:27 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- [#187]: For `csv` sources, `sq` will now try to auto-detect if the CSV file
|
|
|
|
has a header row or not. Previously, this needed to be explicitly specified
|
|
|
|
via an awkward syntax:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ sq add ./actor.csv --opts=header=true`
|
|
|
|
````
|
|
|
|
This change makes working with CSV files significantly lower friction.
|
|
|
|
A command like the below now almost always works as expected:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ cat ./actor.csv | sq .data
|
|
|
|
```
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- `sq` is now better at detecting the (data) kind of CSV fields. It now more
|
|
|
|
accurately distinguishes between `Decimal` and `Int`, and knows how to
|
|
|
|
handle `Datetime`.
|
|
|
|
|
2023-04-10 04:33:00 +03:00
|
|
|
- [#189]: `sq` now treats CSV empty fields as `NULL`.
|
|
|
|
|
2023-04-08 22:19:06 +03:00
|
|
|
## [v0.31.0] - 2023-03-08
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- [#173]: Predefined variables via `--arg`
|
|
|
|
flag ([docs](https://sq.io/docs/query/#predefined-variables)):
|
|
|
|
```shell
|
|
|
|
$ sq --arg first TOM '.actor | .first_name == $first'
|
|
|
|
```
|
|
|
|
|
|
|
|
### Changes
|
|
|
|
- Use `--md` instead of `--markdown` for outputting Markdown.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- [#185]: `sq inspect` now better handles "too many connections" situations.
|
|
|
|
- `go.mod`: Moved to `jackc/pgx` `v5`.
|
|
|
|
- Refactor: switched to [`slog`](https://pkg.go.dev/golang.org/x/exp/slog) logging library.
|
|
|
|
|
|
|
|
## [v0.30.0] - 2023-03-27
|
2023-03-28 09:48:24 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- [#164]: Implemented `unique` function ([docs](https://sq.io/docs/query#unique)):
|
|
|
|
```shell
|
2023-04-08 22:19:06 +03:00
|
|
|
$ sq '.actor | .first_name | unique'
|
2023-03-28 09:48:24 +03:00
|
|
|
```
|
|
|
|
This is equivalent to:
|
|
|
|
```sql
|
|
|
|
SELECT DISTINCT first_name FROM actor
|
|
|
|
```
|
|
|
|
- Implemented `count_unique` function ([docs](https://sq.io/docs/query#count_unique)).
|
|
|
|
```shell
|
|
|
|
$ sq '.actor | count_unique(.first_name)'
|
|
|
|
```
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
- The `count` function has been changed ([docs](https://sq.io/docs/query#count))
|
|
|
|
- Added no-args version: `.actor | count` equivalent to `SELECT COUNT(*) AS "count" FROM "actor"`.
|
|
|
|
- **BREAKING CHANGE**: The "star" version (`.actor | count(*)`) is no longer supported; use the
|
|
|
|
naked version instead.
|
|
|
|
- Function columns are now named according to the `sq` token, not the SQL token.
|
|
|
|
```shell
|
|
|
|
# previous behavior
|
|
|
|
$ sq '.actor | max(.actor_id)'
|
|
|
|
max("actor_id")
|
|
|
|
200
|
|
|
|
|
|
|
|
# now
|
|
|
|
$ sq '.actor | max(.actor_id)'
|
|
|
|
max(.actor_id)
|
|
|
|
200
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2023-03-27 05:09:53 +03:00
|
|
|
## [v0.29.0] - 2023-03-26
|
2023-03-27 05:09:32 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- [#162]: `group_by` now accepts [function arguments](https://sq.io/docs/query/#group_by).
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
- Renamed `groupby` to `group_by` to match jq.
|
|
|
|
- Renamed `orderby` to `order_by` to match jq.
|
|
|
|
|
2023-03-26 11:01:41 +03:00
|
|
|
## [v0.28.0] - 2023-03-26
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-03-27 05:09:32 +03:00
|
|
|
- [#160]: Use `groupby()` to group results. See [query guide](https://sq.io/docs/query/#group_by).
|
2023-03-26 11:01:41 +03:00
|
|
|
|
2023-03-26 04:20:53 +03:00
|
|
|
## [v0.27.0] - 2023-03-25
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-03-27 05:09:32 +03:00
|
|
|
- [#158]: Use `orderby()` to order results. See [query guide](https://sq.io/docs/query/#order_by).
|
2023-03-26 04:20:53 +03:00
|
|
|
|
2023-03-22 09:17:34 +03:00
|
|
|
## [v0.26.0] - 2023-03-22
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-03-26 05:58:43 +03:00
|
|
|
- [#98]: Whitespace is now allowed in SLQ selector names. You can
|
2023-03-22 09:17:34 +03:00
|
|
|
do `@sakila | ."film actor" | ."actor id"`.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- [#155]: `sq inspect` now populates `schema` field in JSON for MySQL,
|
|
|
|
SQLite, and SQL Server (Postgres already worked).
|
|
|
|
|
2023-03-19 10:51:05 +03:00
|
|
|
## [v0.25.1] - 2023-03-19
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- [#153]: Improved formatting of text table with long lines.
|
|
|
|
|
2023-03-19 09:18:54 +03:00
|
|
|
## [v0.25.0] - 2023-03-19
|
2023-03-19 07:58:00 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-03-19 09:18:54 +03:00
|
|
|
- [#15]: Column Aliases. You can now change specify an alias for a column (or column expression
|
2023-03-19 07:58:00 +03:00
|
|
|
such as a function). For example: `sq '.actor | .first_name:given_name`, or `sq .actor | count(*):quantity`.
|
2023-03-19 09:18:54 +03:00
|
|
|
- [#151]: `sq add` now has a `--active` flag, which immediately sets the new source
|
|
|
|
as the active source.
|
2023-03-19 07:58:00 +03:00
|
|
|
|
2023-03-15 10:46:52 +03:00
|
|
|
## [v0.24.4] - 2023-03-15
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- Fixed typos in `sq sql` command help.
|
|
|
|
|
2023-03-15 08:04:49 +03:00
|
|
|
## [v0.24.3] - 2023-03-14
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- When a CSV source has explicit column names (via `--opts cols=A,B,C`), `sq` now verifies
|
|
|
|
that the CSV data record field count matches the number of explicit columns.
|
|
|
|
|
2023-03-14 06:52:58 +03:00
|
|
|
## [v0.24.2] - 2023-03-13
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- [#142]: Improved error handling when Postgres `current_schema()` is unavailable.
|
|
|
|
|
2023-03-12 07:21:05 +03:00
|
|
|
## [v0.24.1] - 2023-03-11
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- [#144]: Handle corrupted config active source.
|
|
|
|
|
2023-01-01 09:04:15 +03:00
|
|
|
## [v0.24.0] - 2022-12-31
|
2023-01-01 09:00:07 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- `sq ping` now respects `--json` flag.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- Improved handling of file paths on Windows.
|
|
|
|
|
2023-01-01 06:17:44 +03:00
|
|
|
## [v0.23.0] - 2022-12-31
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-01-01 09:00:07 +03:00
|
|
|
- `sq ls` now respects `--json` flag.
|
|
|
|
- `sq rm` now respects `--json` flag.
|
2023-03-26 05:58:43 +03:00
|
|
|
- `sq add` now respects `--json` flag.\`
|
2023-01-01 06:17:44 +03:00
|
|
|
- CI pipeline now verifies install packages after publish.
|
2022-12-30 20:10:56 +03:00
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
2023-01-01 06:17:44 +03:00
|
|
|
- `sq rm` can delete multiple sources.
|
|
|
|
- `sq rm` doesn't print output unless `--verbose`.
|
|
|
|
- Redacted snipped is now `xxxxx` instead of `****`, to match stdlib `url.URL.Redacted()`.
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- Fixed crash on Fedora systems (needed `--tags=netgo`).
|
|
|
|
|
|
|
|
## [v0.21.3] - 2022-12-30
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2022-12-30 20:10:56 +03:00
|
|
|
- `sq version` respects `--json` flag.
|
2023-01-01 06:17:44 +03:00
|
|
|
- `sq version` respects `--verbose` flag.
|
2022-12-30 20:10:56 +03:00
|
|
|
- `sq version` shows `latest_version` info when `--verbose` and there's a newer version available.
|
|
|
|
|
2023-01-01 06:17:44 +03:00
|
|
|
### Changed
|
|
|
|
|
|
|
|
- `sq version` shows less info when `--verbose` is not set.
|
|
|
|
|
2022-12-30 05:02:10 +03:00
|
|
|
## [v0.20.0] - 2022-12-29
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-03-15 10:46:52 +03:00
|
|
|
- `sq` now generates manpages (and installs them).
|
2022-12-30 05:02:10 +03:00
|
|
|
|
2022-12-30 01:06:43 +03:00
|
|
|
## [v0.19.0] - 2022-12-29
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
2023-03-15 10:46:52 +03:00
|
|
|
- Installer for [Arch Linux](https://archlinux.org),
|
|
|
|
via [Arch User Repository](https://aur.archlinux.org).
|
2022-12-30 01:06:43 +03:00
|
|
|
|
2022-12-25 13:43:01 +03:00
|
|
|
## [v0.18.2] - 2022-12-25
|
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- The build pipeline now produces `.apk` packages for [Alpine Linux](https://www.alpinelinux.org),
|
|
|
|
and `install.sh` has been updated accordingly. However, the `.apk` files
|
|
|
|
are not yet published to a repository, so it's necessary to run `apk` against
|
|
|
|
the downloaded `.apk` file (`install.sh` does this for you).
|
|
|
|
|
2022-12-25 07:39:39 +03:00
|
|
|
## [v0.18.0] - 2022-12-24
|
2022-12-25 07:04:18 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- [#95]: `sq add` now has a `--password` (`-p`) flag that prompts the user for the data source
|
|
|
|
password, instead of putting it in the location string. It will also read from stdin
|
|
|
|
if there's input there.
|
|
|
|
|
2022-12-24 08:58:40 +03:00
|
|
|
## [v0.17.0] - 2022-12-23
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
- More or less every `go.mod` dependency has been updated to latest. This includes
|
|
|
|
drivers for `sqlite` and `sqlserver`. The driver updates led to some broken
|
|
|
|
things, which have been fixed.
|
|
|
|
|
|
|
|
## [v0.16.1] - 2022-12-23
|
2022-12-18 02:11:33 +03:00
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
2022-12-25 07:39:39 +03:00
|
|
|
- [#123]: Shell completion is better behaved when a source is offline.
|
2022-12-18 02:11:33 +03:00
|
|
|
|
2022-12-17 08:31:22 +03:00
|
|
|
## [v0.16.0] - 2022-12-16
|
2022-12-17 06:46:37 +03:00
|
|
|
|
|
|
|
### Added
|
|
|
|
|
|
|
|
- `--verbose` flag is now global
|
2022-12-17 08:31:22 +03:00
|
|
|
- `install.sh` install script.
|
2022-12-17 06:46:37 +03:00
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
2022-12-17 08:31:22 +03:00
|
|
|
- Improved GH workflow
|
2022-12-17 06:46:37 +03:00
|
|
|
- `sq inspect` shows less output by default (use `-v` to restore previous behavior)
|
|
|
|
|
|
|
|
### Fixed
|
|
|
|
|
|
|
|
- `sq inspect` can now deal with Postgres sources that have null values for constraint fields
|
|
|
|
|
2022-11-20 18:14:53 +03:00
|
|
|
## [v0.15.11] - 2022-11-06
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
|
|
|
- Yet more changes to GitHub workflow.
|
|
|
|
|
|
|
|
## [v0.15.4] - 2021-09-18
|
|
|
|
|
|
|
|
### Changed
|
2021-02-27 17:47:24 +03:00
|
|
|
|
2021-09-19 06:48:28 +03:00
|
|
|
- Bug fixes
|
|
|
|
|
2022-11-20 18:14:53 +03:00
|
|
|
## [v0.15.3] - 2021-03-13
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
2022-12-25 07:04:18 +03:00
|
|
|
- [#91]: MySQL driver options no longer stripped
|
2021-03-13 20:08:53 +03:00
|
|
|
|
2022-11-20 18:14:53 +03:00
|
|
|
## [v0.15.2] - 2021-03-08
|
|
|
|
|
|
|
|
### Changed
|
|
|
|
|
2022-12-25 07:04:18 +03:00
|
|
|
- [#89]: Bug with SQL generated for joins.
|
2021-03-08 09:37:37 +03:00
|
|
|
|
2023-04-10 04:33:00 +03:00
|
|
|
[#189]: https://github.com/neilotoole/sq/issues/189
|
2023-04-09 17:44:27 +03:00
|
|
|
[#187]: https://github.com/neilotoole/sq/issues/187
|
2023-04-08 22:19:06 +03:00
|
|
|
[#185]: https://github.com/neilotoole/sq/issues/185
|
|
|
|
[#173]: https://github.com/neilotoole/sq/issues/173
|
2023-03-28 09:48:24 +03:00
|
|
|
[#164]: https://github.com/neilotoole/sq/issues/164
|
2023-03-27 05:09:32 +03:00
|
|
|
[#162]: https://github.com/neilotoole/sq/issues/162
|
2022-12-23 19:39:38 +03:00
|
|
|
[#123]: https://github.com/neilotoole/sq/issues/123
|
2023-03-26 05:58:43 +03:00
|
|
|
[#142]: https://github.com/neilotoole/sq/issues/142
|
|
|
|
[#144]: https://github.com/neilotoole/sq/issues/144
|
|
|
|
[#151]: https://github.com/neilotoole/sq/issues/151
|
|
|
|
[#153]: https://github.com/neilotoole/sq/issues/153
|
|
|
|
[#155]: https://github.com/neilotoole/sq/issues/155
|
|
|
|
[#158]: https://github.com/neilotoole/sq/issues/158
|
2023-03-26 11:01:41 +03:00
|
|
|
[#15]: https://github.com/neilotoole/sq/issues/15
|
|
|
|
[#160]: https://github.com/neilotoole/sq/issues/160
|
2023-03-26 05:58:43 +03:00
|
|
|
[#89]: https://github.com/neilotoole/sq/pull/89
|
|
|
|
[#91]: https://github.com/neilotoole/sq/pull/91
|
|
|
|
[#95]: https://github.com/neilotoole/sq/issues/93
|
|
|
|
[#98]: https://github.com/neilotoole/sq/issues/98
|
|
|
|
[v0.15.11]: https://github.com/neilotoole/sq/compare/v0.15.4...v0.15.11
|
|
|
|
[v0.15.2]: https://github.com/neilotoole/sq/releases/tag/v0.15.2
|
|
|
|
[v0.15.3]: https://github.com/neilotoole/sq/compare/v0.15.2...v0.15.3
|
|
|
|
[v0.15.4]: https://github.com/neilotoole/sq/compare/v0.15.3...v0.15.4
|
|
|
|
[v0.16.0]: https://github.com/neilotoole/sq/compare/v0.15.11...v0.16.0
|
|
|
|
[v0.16.1]: https://github.com/neilotoole/sq/compare/v0.16.0...v0.16.1
|
|
|
|
[v0.17.0]: https://github.com/neilotoole/sq/compare/v0.16.1...v0.17.0
|
|
|
|
[v0.18.0]: https://github.com/neilotoole/sq/compare/v0.17.0...v0.18.0
|
|
|
|
[v0.18.2]: https://github.com/neilotoole/sq/compare/v0.18.0...v0.18.2
|
|
|
|
[v0.19.0]: https://github.com/neilotoole/sq/compare/v0.18.2...v0.19.0
|
|
|
|
[v0.20.0]: https://github.com/neilotoole/sq/compare/v0.19.0...v0.20.0
|
|
|
|
[v0.21.3]: https://github.com/neilotoole/sq/compare/v0.20.0...v0.21.3
|
|
|
|
[v0.23.0]: https://github.com/neilotoole/sq/compare/v0.21.3...v0.23.0
|
|
|
|
[v0.24.0]: https://github.com/neilotoole/sq/compare/v0.23.0...v0.24.0
|
|
|
|
[v0.24.1]: https://github.com/neilotoole/sq/compare/v0.24.0...v0.24.1
|
|
|
|
[v0.24.2]: https://github.com/neilotoole/sq/compare/v0.24.1...v0.24.2
|
|
|
|
[v0.24.3]: https://github.com/neilotoole/sq/compare/v0.24.2...v0.24.3
|
|
|
|
[v0.24.4]: https://github.com/neilotoole/sq/compare/v0.24.3...v0.24.4
|
|
|
|
[v0.25.0]: https://github.com/neilotoole/sq/compare/v0.24.4...v0.25.0
|
|
|
|
[v0.25.1]: https://github.com/neilotoole/sq/compare/v0.25.0...v0.25.1
|
|
|
|
[v0.26.0]: https://github.com/neilotoole/sq/compare/v0.25.1...v0.26.0
|
|
|
|
[v0.27.0]: https://github.com/neilotoole/sq/compare/v0.26.0...v0.27.0
|
2023-03-26 11:01:41 +03:00
|
|
|
[v0.28.0]: https://github.com/neilotoole/sq/compare/v0.27.0...v0.28.0
|
2023-03-27 05:09:32 +03:00
|
|
|
[v0.29.0]: https://github.com/neilotoole/sq/compare/v0.28.0...v0.29.0
|
2023-03-28 09:48:24 +03:00
|
|
|
[v0.30.0]: https://github.com/neilotoole/sq/compare/v0.29.0...v0.30.0
|
2023-04-08 22:19:06 +03:00
|
|
|
[v0.31.0]: https://github.com/neilotoole/sq/compare/v0.30.0...v0.31.0
|
2023-04-09 17:44:27 +03:00
|
|
|
[v0.32.0]: https://github.com/neilotoole/sq/compare/v0.31.0...v0.32.0
|