Skip to content

Releases: tconbeer/harlequin

v1.7.2

14 Dec 23:42
ac706f8
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.7.2] - 2023-12-14

Features

  • The MySQL adapter is now installable as an extra; use pip install harlequin[mysql].

[1.7.1] - 2023-12-14

Bug Fixes

  • Fixes a crash when using harlequin-postgres and executing a select statement that returns zero records.

[1.7.0] - 2023-12-13

Features

  • AUTOCOMPLETE! Harlequin's query editor will now offer completions in a drop-down for SQL keywords, functions, and database objects (like tables, views, columns). With the autocomplete list open, use up, down, PgUp, PgDn, to select an option and enter or Tab to insert it into the editor.
  • Harlequin now uses a new TextArea widget for its code editor. This improves performance for long queries, adds line numbers in a gutter, and changes the underlying engine for syntax highlighting from Pygments to Tree Sitter (tconbeer/textual-textarea#123).
  • In the Query Editor: double-click to select a word, triple-click to select a line, and quadruple-click to select the entire query (tconbeer/textual-textarea#111, tconbeer/textual-textarea#112).

Changes

  • Changes the default theme to harlequin.

Adapter API Changes

  • Many key types are now exported from the main harlequin package: HarlequinAdapter, HarlequinConnection, HarlequinCursor, HarlequinAdapterOption, HarlequinCopyFormat, HarlequinCompletion.
  • HarlequinConnections may now (optionally) define a get_completions() method, which should return a list of HarlequinCompletion instances; each returned completion will be available to users in the autocompletion list.

Bug Fixes

  • Fixes a bug that was causing an empty line to appear at the bottom of the Query Editor pane.

[1.6.0] - 2023-12-07

Features

  • Harlequin can now be configured using a TOML file. The config file can both specify options for Harlequin (like the theme and row limit) and also for installed adapters (like the host, username, and password for a database connection). The config file can define multiple "profiles" (sets of configuration), and you can select the profile to use when starting Harlequin with the --profile option (alias -P). By default, Harlequin searches the current directory and home directories for files called either .harlequin.toml or pyproject.toml, and merges the config it finds in them. You can specify a different path using the --config-path option. Values loaded from config files can be overridden by passing CLI options (#206).
  • Harlequin now ships with a wizard to make it easy to create or update config files. Simply run Harlequin with the --config option.
  • Adds a harlequin theme. You can use it with harlequin -t harlequin.

[1.5.0] - 2023-11-28

Breaking Changes

  • The SQLite adapter no longer provides a check-same-thread option; the established connection sets this value to False to enable Harlequin features.

Features

  • The Postgres adapter is now installable as an extra; use pip install harlequin[postgres].

Bug Fixes

  • Harlequin no longer becomes unresponsive when loading a large data catalog or executing long-running queries (#236, #332, #331).
  • Fixes a flaky test that was causing intermittent CI failures.

[1.4.1] - 2023-11-20

Bug Fixes

  • Adds a py.typed file to the harlequin package.

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more ...
Read more

v1.7.1

14 Dec 17:18
8b48c76
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.7.1] - 2023-12-14

Bug Fixes

  • Fixes a crash when using harlequin-postgres and executing a select statement that returns zero records.

[1.7.0] - 2023-12-13

Features

  • AUTOCOMPLETE! Harlequin's query editor will now offer completions in a drop-down for SQL keywords, functions, and database objects (like tables, views, columns). With the autocomplete list open, use up, down, PgUp, PgDn, to select an option and enter or Tab to insert it into the editor.
  • Harlequin now uses a new TextArea widget for its code editor. This improves performance for long queries, adds line numbers in a gutter, and changes the underlying engine for syntax highlighting from Pygments to Tree Sitter (tconbeer/textual-textarea#123).
  • In the Query Editor: double-click to select a word, triple-click to select a line, and quadruple-click to select the entire query (tconbeer/textual-textarea#111, tconbeer/textual-textarea#112).

Changes

  • Changes the default theme to harlequin.

Adapter API Changes

  • Many key types are now exported from the main harlequin package: HarlequinAdapter, HarlequinConnection, HarlequinCursor, HarlequinAdapterOption, HarlequinCopyFormat, HarlequinCompletion.
  • HarlequinConnections may now (optionally) define a get_completions() method, which should return a list of HarlequinCompletion instances; each returned completion will be available to users in the autocompletion list.

Bug Fixes

  • Fixes a bug that was causing an empty line to appear at the bottom of the Query Editor pane.

[1.6.0] - 2023-12-07

Features

  • Harlequin can now be configured using a TOML file. The config file can both specify options for Harlequin (like the theme and row limit) and also for installed adapters (like the host, username, and password for a database connection). The config file can define multiple "profiles" (sets of configuration), and you can select the profile to use when starting Harlequin with the --profile option (alias -P). By default, Harlequin searches the current directory and home directories for files called either .harlequin.toml or pyproject.toml, and merges the config it finds in them. You can specify a different path using the --config-path option. Values loaded from config files can be overridden by passing CLI options (#206).
  • Harlequin now ships with a wizard to make it easy to create or update config files. Simply run Harlequin with the --config option.
  • Adds a harlequin theme. You can use it with harlequin -t harlequin.

[1.5.0] - 2023-11-28

Breaking Changes

  • The SQLite adapter no longer provides a check-same-thread option; the established connection sets this value to False to enable Harlequin features.

Features

  • The Postgres adapter is now installable as an extra; use pip install harlequin[postgres].

Bug Fixes

  • Harlequin no longer becomes unresponsive when loading a large data catalog or executing long-running queries (#236, #332, #331).
  • Fixes a flaky test that was causing intermittent CI failures.

[1.4.1] - 2023-11-20

Bug Fixes

  • Adds a py.typed file to the harlequin package.

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, [#...
Read more

v1.7.0

13 Dec 22:02
edc65ee
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.7.0] - 2023-12-13

Features

  • AUTOCOMPLETE! Harlequin's query editor will now offer completions in a drop-down for SQL keywords, functions, and database objects (like tables, views, columns). With the autocomplete list open, use up, down, PgUp, PgDn, to select an option and enter or Tab to insert it into the editor.
  • Harlequin now uses a new TextArea widget for its code editor. This improves performance for long queries, adds line numbers in a gutter, and changes the underlying engine for syntax highlighting from Pygments to Tree Sitter (tconbeer/textual-textarea#123).
  • In the Query Editor: double-click to select a word, triple-click to select a line, and quadruple-click to select the entire query (tconbeer/textual-textarea#111, tconbeer/textual-textarea#112).

Changes

  • Changes the default theme to harlequin.

Adapter API Changes

  • Many key types are now exported from the main harlequin package: HarlequinAdapter, HarlequinConnection, HarlequinCursor, HarlequinAdapterOption, HarlequinCopyFormat, HarlequinCompletion.
  • HarlequinConnections may now (optionally) define a get_completions() method, which should return a list of HarlequinCompletion instances; each returned completion will be available to users in the autocompletion list.

Bug Fixes

  • Fixes a bug that was causing an empty line to appear at the bottom of the Query Editor pane.

[1.6.0] - 2023-12-07

Features

  • Harlequin can now be configured using a TOML file. The config file can both specify options for Harlequin (like the theme and row limit) and also for installed adapters (like the host, username, and password for a database connection). The config file can define multiple "profiles" (sets of configuration), and you can select the profile to use when starting Harlequin with the --profile option (alias -P). By default, Harlequin searches the current directory and home directories for files called either .harlequin.toml or pyproject.toml, and merges the config it finds in them. You can specify a different path using the --config-path option. Values loaded from config files can be overridden by passing CLI options (#206).
  • Harlequin now ships with a wizard to make it easy to create or update config files. Simply run Harlequin with the --config option.
  • Adds a harlequin theme. You can use it with harlequin -t harlequin.

[1.5.0] - 2023-11-28

Breaking Changes

  • The SQLite adapter no longer provides a check-same-thread option; the established connection sets this value to False to enable Harlequin features.

Features

  • The Postgres adapter is now installable as an extra; use pip install harlequin[postgres].

Bug Fixes

  • Harlequin no longer becomes unresponsive when loading a large data catalog or executing long-running queries (#236, #332, #331).
  • Fixes a flaky test that was causing intermittent CI failures.

[1.4.1] - 2023-11-20

Bug Fixes

  • Adds a py.typed file to the harlequin package.

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter...
Read more

v1.6.0

07 Dec 18:20
dbdf504
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.6.0] - 2023-12-07

Features

  • Harlequin can now be configured using a TOML file. The config file can both specify options for Harlequin (like the theme and row limit) and also for installed adapters (like the host, username, and password for a database connection). The config file can define multiple "profiles" (sets of configuration), and you can select the profile to use when starting Harlequin with the --profile option (alias -P). By default, Harlequin searches the current directory and home directories for files called either .harlequin.toml or pyproject.toml, and merges the config it finds in them. You can specify a different path using the --config-path option. Values loaded from config files can be overridden by passing CLI options (#206).
  • Harlequin now ships with a wizard to make it easy to create or update config files. Simply run Harlequin with the --config option.
  • Adds a harlequin theme. You can use it with harlequin -t harlequin.

[1.5.0] - 2023-11-28

Breaking Changes

  • The SQLite adapter no longer provides a check-same-thread option; the established connection sets this value to False to enable Harlequin features.

Features

  • The Postgres adapter is now installable as an extra; use pip install harlequin[postgres].

Bug Fixes

  • Harlequin no longer becomes unresponsive when loading a large data catalog or executing long-running queries (#236, #332, #331).
  • Fixes a flaky test that was causing intermittent CI failures.

[1.4.1] - 2023-11-20

Bug Fixes

  • Adds a py.typed file to the harlequin package.

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

###...

Read more

v1.5.0

28 Nov 18:50
b29ed17
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.5.0] - 2023-11-28

Breaking Changes

  • The SQLite adapter no longer provides a check-same-thread option; the established connection sets this value to False to enable Harlequin features.

Features

  • The Postgres adapter is now installable as an extra; use pip install harlequin[postgres].

Bug Fixes

  • Harlequin no longer becomes unresponsive when loading a large data catalog or executing long-running queries (#236, #332, #331).
  • Fixes a flaky test that was causing intermittent CI failures.

[1.4.1] - 2023-11-20

Bug Fixes

  • Adds a py.typed file to the harlequin package.

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

New Features

  • Harlequin supports multiple buffers (for tabbed editing). Create a new tab with ctrl+n, close a tab with ctrl+w, and switch to the next tab with ctrl+k. Opening, saving, and running queries are operations on the current buffer and have no effect on the other buffers.

[0.0.25] - 2023-08-13

New Features

  • Harlequin now returns the result of multiple select queries to different tabs in the Results Viewer. To run multiple queries, type them into the Query Editor (separated by semicolons), then press ctrl+a to select all, and then ctrl+enter to run the selection (#34).
  • If there are multiple results tabs, you can switch between them with j and k.
  • ctrl+e exports the data from the current (visible) data table.

Bug Fixes

  • Fixes issues with the loading state when loading large result sets.

[0.0.24] - 2023-08-04

New Features

  • Adds a new CLI opti...
Read more

v1.4.1

20 Nov 22:53
4092b81
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.4.1] - 2023-11-20

Bug Fixes

  • Adds a py.typed file to the harlequin package.

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

New Features

  • Harlequin supports multiple buffers (for tabbed editing). Create a new tab with ctrl+n, close a tab with ctrl+w, and switch to the next tab with ctrl+k. Opening, saving, and running queries are operations on the current buffer and have no effect on the other buffers.

[0.0.25] - 2023-08-13

New Features

  • Harlequin now returns the result of multiple select queries to different tabs in the Results Viewer. To run multiple queries, type them into the Query Editor (separated by semicolons), then press ctrl+a to select all, and then ctrl+enter to run the selection (#34).
  • If there are multiple results tabs, you can switch between them with j and k.
  • ctrl+e exports the data from the current (visible) data table.

Bug Fixes

  • Fixes issues with the loading state when loading large result sets.

[0.0.24] - 2023-08-04

New Features

  • Adds a new CLI option, --extension or -e, which will install and load a named DuckDB extension.
  • Adds a new CLI option, --force-install-extensions, which will re-install the extensions provided
    with the -e option.
  • Adds a new CLI option, --custom-extension-repo, which enables installing extensions other than
    the official DuckDB extensions.
  • Taken together, Harlequin can now be loaded with the PRQL extension. Use PRQL with Harlequin:
    harlequin -u -e prql --custom-extension-repo welsch.lu/duckdb/prql/latest
    (#152 - thank you [@dljsjr](https://github....
Read more

v1.4.0

18 Nov 23:04
d1745c7
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.4.0] - 2023-11-18

Features

  • Harlequin now ships with an experimental SQLite adapter and can be used to query any SQLite database (including an in-memory database). You can select the adapter by starting Harlequin with harlequin -a sqlite (for an in-memory session) or harlequin -a sqlite my.db.
  • harlequin --help is all-new, with a glow-up provided by rich-click. Options for each adapter are separated into their own panels.
  • harlequin --version now shows the versions of installed database adapters (#317).

Refactoring

  • The code for the DuckDB adapter has been moved from /plugins/harlequin_duckdb to /src/harlequin_duckdb.
  • The unused export_options.py module has been removed (#327).

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

New Features

  • Harlequin supports multiple buffers (for tabbed editing). Create a new tab with ctrl+n, close a tab with ctrl+w, and switch to the next tab with ctrl+k. Opening, saving, and running queries are operations on the current buffer and have no effect on the other buffers.

[0.0.25] - 2023-08-13

New Features

  • Harlequin now returns the result of multiple select queries to different tabs in the Results Viewer. To run multiple queries, type them into the Query Editor (separated by semicolons), then press ctrl+a to select all, and then ctrl+enter to run the selection (#34).
  • If there are multiple results tabs, you can switch between them with j and k.
  • ctrl+e exports the data from the current (visible) data table.

Bug Fixes

  • Fixes issues with the loading state when loading large result sets.

[0.0.24] - 2023-08-04

New Features

  • Adds a new CLI option, --extension or -e, which will install and load a named DuckDB extension.
  • Adds a new CLI option, --force-install-extensions, which will re-install the extensions provided
    with the -e option.
  • Adds a new CLI option, --custom-extension-repo, which enables installing extensions other than
    the official DuckDB extensions.
  • Taken together, Harlequin can now be loaded with the PRQL extension. Use PRQL with Harlequin:
    harlequin -u -e prql --custom-extension-repo welsch.lu/duckdb/prql/latest
    (#152 - thank you @dljsjr!)

[0.0.23] - 2023-08-03

Features

  • Changes the behavior of the "Run Quer...
Read more

v1.3.1

13 Nov 02:24
52c58d6
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.3.1] - 2023-11-13

Bug Fixes

  • When running multiple queries, Harlequin now activates the results tab for the last query, instead of the first one.
  • Queries that return duplicate column names are now displayed correctly in the Results Viewer (tconbeer/textual-fastdatatable#26).
  • List types returned by DuckDB no longer display as ?, but instead as [#], [s], etc. (#315).
  • Map types returned by DuckDB now display as {m}, to differentiate them from structs ({}).
  • The Results Viewer no longer displays "Query Returned No Records" before the first query is executed.
  • The data returned by HarlequinCursor.fetchall() no longer needs to be a PyArrow Table (#281).

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

New Features

  • Harlequin supports multiple buffers (for tabbed editing). Create a new tab with ctrl+n, close a tab with ctrl+w, and switch to the next tab with ctrl+k. Opening, saving, and running queries are operations on the current buffer and have no effect on the other buffers.

[0.0.25] - 2023-08-13

New Features

  • Harlequin now returns the result of multiple select queries to different tabs in the Results Viewer. To run multiple queries, type them into the Query Editor (separated by semicolons), then press ctrl+a to select all, and then ctrl+enter to run the selection (#34).
  • If there are multiple results tabs, you can switch between them with j and k.
  • ctrl+e exports the data from the current (visible) data table.

Bug Fixes

  • Fixes issues with the loading state when loading large result sets.

[0.0.24] - 2023-08-04

New Features

  • Adds a new CLI option, --extension or -e, which will install and load a named DuckDB extension.
  • Adds a new CLI option, --force-install-extensions, which will re-install the extensions provided
    with the -e option.
  • Adds a new CLI option, --custom-extension-repo, which enables installing extensions other than
    the official DuckDB extensions.
  • Taken together, Harlequin can now be loaded with the PRQL extension. Use PRQL with Harlequin:
    harlequin -u -e prql --custom-extension-repo welsch.lu/duckdb/prql/latest
    (#152 - thank you @dljsjr!)

[0.0.23] - 2023-08-03

Features

  • Changes the behavior of the "Run Query" button and ctrl+enter:
    • If text is selected, and that text does not contain parsing errors, the "Run Query" button will show "Run Selection", and ctrl+enter will run the selected text. If multiple queries are selected (separated by semicolons), they will all be run; if multiple select statements are selected, only data from the first selected select statement will be loaded into the Results Viewer (or exported).
    • If no text is selected, Harlequin will run the single query where the cursor is active. Other queries before and after semicolons will not be run.
    • To "Run All", first select all text with ctrl+a, and then run selection with ctrl+enter
  • Adds path autocomplete and validation to the file save/open and export data inputs.

Other Changes

  • Lowers the maximum number of records loaded ...
Read more

v1.3.0

07 Nov 03:02
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.3.0] - 2023-11-06

Features

  • Adds an --adapter CLI option (alias -a) for selecting an installed adapter plug-in.

Bug Fixes

  • Fixes a crash that could happen when a query returned no records (#300).

Adapter API Changes

  • The function signature for HarlequinConnection.copy() has changed to add a format_name positional argument.
  • The HarlequinAdapter.COPY_OPTIONS class variable has been renamed to HarlequinAdapter.COPY_FORMATS, and its
    type has changed.
  • The function signature for HarlequinAdapter.connect() has changed to return only a HarlequinConnection; HarlequinConnection now accepts an init_message kwarg that will be displayed to the user as a notification.

Refactoring

  • Harlequin's CLI now dynamically loads the available options from the installed adapters (#276).
  • Harlequin now dynamically loads data export options from the selected adapter (#275).

[1.2.0] - 2023-10-22

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

New Features

  • Harlequin supports multiple buffers (for tabbed editing). Create a new tab with ctrl+n, close a tab with ctrl+w, and switch to the next tab with ctrl+k. Opening, saving, and running queries are operations on the current buffer and have no effect on the other buffers.

[0.0.25] - 2023-08-13

New Features

  • Harlequin now returns the result of multiple select queries to different tabs in the Results Viewer. To run multiple queries, type them into the Query Editor (separated by semicolons), then press ctrl+a to select all, and then ctrl+enter to run the selection (#34).
  • If there are multiple results tabs, you can switch between them with j and k.
  • ctrl+e exports the data from the current (visible) data table.

Bug Fixes

  • Fixes issues with the loading state when loading large result sets.

[0.0.24] - 2023-08-04

New Features

  • Adds a new CLI option, --extension or -e, which will install and load a named DuckDB extension.
  • Adds a new CLI option, --force-install-extensions, which will re-install the extensions provided
    with the -e option.
  • Adds a new CLI option, --custom-extension-repo, which enables installing extensions other than
    the official DuckDB extensions.
  • Taken together, Harlequin can now be loaded with the PRQL extension. Use PRQL with Harlequin:
    harlequin -u -e prql --custom-extension-repo welsch.lu/duckdb/prql/latest
    (#152 - thank you @dljsjr!)

[0.0.23] - 2023-08-03

Features

  • Changes the behavior of the "Run Query" button and ctrl+enter:
    • If text is selected, and that text does not contain parsing errors, the "Run Query" button will show "Run Selection", and ctrl+enter will run the selected text. If multiple queries are selected (separated by semicolons), they will all be run; if multiple select statements are selected, only data from the first selected select statement will be loaded into the Results Viewer (or exported).
    • If no text is selected, Harlequin will run the single query where the cursor is active. Other queries before and after semicolons will not be run.
    • To "Run All", first select all text with ctrl+a, and then run selection with ctrl+enter
  • Adds path autocomplete and validation to the file save/open and export data inputs.

Other Changes

  • Lowers the maximum number of records loaded into the results viewer to 10,000. (All records can be exported with ctrl+e)

[0.0.22] - 2023-08-02

Features

[0.0.21] - 2023-07-28

Features

  • Add -u/-unsigned/--allow-unsigned-extensions CLI flag for allowing loading of unsigned extensions.
  • File save and open dialog can now expand the user directory (~) (#61)

Bug Fixes

  • Error modal no longer crashes.
  • Text selection is now maintained when pressing more keys.

[0.0.20] - 2023-07-17

Features

  • F1 now displays a help screen that lists all keyboard bindings (#20).
  • F2 ...
Read more

v1.2.0-alpha.1

22 Oct 16:43
e47e8a8
Compare
Choose a tag to compare

Harlequin CHANGELOG

All notable changes to this project will be documented in this file.

[Unreleased]

[1.2.0-alpha.1] - 2023-10-22

Bug Fixes

  • Harlequin's query notifications no longer count whitespace-only queries (#268).
  • Harlequin's DataCatalog now displays "db" next to database names and "sch" next to schema names. Empty databases and schemas no longer have an arrow to expand them.
  • If the cursor is after the final semicolon in the query editor, Harlequin will now execute the last query before the semicolon, instead of doing nothing when clicking Run Query or pressing ctrl+j.

Refactoring

  • Harlequin's DuckDB integration has been refactored into a more general-purpose database adapter interface (#263).
  • Harlequin's DuckDB adapter is now loaded as a plug-in (#279)

[1.1.1] - 2023-10-09

Bug Fixes

  • Harlequin no longer crashes if the data returned by DuckDB contains NoneType or complex (Struct, Map, List) columns (#265 - thank you @sjdurfey!).

Testing

  • Harlequin now uses snapshot testing on screenshots to prevent regresssions (#252).
  • Harlequin no longer installs extensions or connects to MotherDuck in CI, due to flaky failures around the time of DuckDB releases (#262).

[1.1.0] - 2023-10-02

Features

  • Harlequin now executes an initialization script on start-up. By default, it executes the script found at ~/.duckdbrc. To execute a different script, start Harlequin with the --init-path option:

    harlequin --init-path ./my-project-script.sql

    To start Harlequin without executing an initialization script, use the --no-init flag:

    harlequin --no-init

    Note: DuckDB initialization scripts can contain dot commands or SQL statements. If Harlequin encounters a dot command, it will attempt to rewrite it as a SQL statement, and then execute the rewritten statement. Otherwise, it will ignore the dot command. Currently, Harlequin can only rewrite .open commands.

    (#241 - thank you @pdpark!)

  • Harlequin now displays notifications after completing successful queries (#235 - thank you @natir!), saving the contents of a buffer (#226), and receiving an error from the system clipboard.

  • Harlequin now loads data from a completed query up to 1,000x faster by using a new DataTable widget (#181). By default, the Results Viewer is now limited to 100,000 records, instead of 10,000. This limit can be changed with the --limit option when starting Harlequin. This introduces a dependency on PyArrow >= 7.0.0.

[1.0.1] - 2023-09-21

Bug Fixes

  • Pasting text into Harlequin's text editor is now more performant and compatible with more terminals. (#120 - thank you @matsonj, #119).

[1.0.0] - 2023-09-12

Features

  • Double-click or press ctrl+enter on an item in the data catalog to insert the name in the query editor (#194).
  • Harlequin now shows notifications when exporting data or executing DDL/DML.

Bug Fixes and Minor Updates

  • Data table column headers are now bold on terminals and fonts that support it (#203).
  • Bumped TextArea; cursor now better maintains x-position and other minor fixes.
  • The query editor's cursor no longer blinks when a modal appears above it (#196).
  • Harlequin now shows the results of successful queries in the Results Viewer if multiple queries are executed and one or more contain errors.
  • Error and Help modals can now be dismissed with a click outside the modal (#218).

[0.0.28] - 2023-09-07

  • Buffers are now restored when Harlequin is restarted (#175).

[0.0.27] - 2023-08-23

New Features

  • UI glow-up: Colors are more consistent, and themes set the styling for the entire app (#81). Try harlequin -t zenburn or harlequin -t one-dark for a new look.
  • Harlequin's query editor now supports more key bindings: ctrl+z and ctrl+y to undo/redo, and shift+delete to delete an entire line.

Fixes

  • It is now easier to focus on the current editor buffer, instead of the tabs above it.

[0.0.26] - 2023-08-21

New Features

  • Harlequin supports multiple buffers (for tabbed editing). Create a new tab with ctrl+n, close a tab with ctrl+w, and switch to the next tab with ctrl+k. Opening, saving, and running queries are operations on the current buffer and have no effect on the other buffers.

[0.0.25] - 2023-08-13

New Features

  • Harlequin now returns the result of multiple select queries to different tabs in the Results Viewer. To run multiple queries, type them into the Query Editor (separated by semicolons), then press ctrl+a to select all, and then ctrl+enter to run the selection (#34).
  • If there are multiple results tabs, you can switch between them with j and k.
  • ctrl+e exports the data from the current (visible) data table.

Bug Fixes

  • Fixes issues with the loading state when loading large result sets.

[0.0.24] - 2023-08-04

New Features

  • Adds a new CLI option, --extension or -e, which will install and load a named DuckDB extension.
  • Adds a new CLI option, --force-install-extensions, which will re-install the extensions provided
    with the -e option.
  • Adds a new CLI option, --custom-extension-repo, which enables installing extensions other than
    the official DuckDB extensions.
  • Taken together, Harlequin can now be loaded with the PRQL extension. Use PRQL with Harlequin:
    harlequin -u -e prql --custom-extension-repo welsch.lu/duckdb/prql/latest
    (#152 - thank you @dljsjr!)

[0.0.23] - 2023-08-03

Features

  • Changes the behavior of the "Run Query" button and ctrl+enter:
    • If text is selected, and that text does not contain parsing errors, the "Run Query" button will show "Run Selection", and ctrl+enter will run the selected text. If multiple queries are selected (separated by semicolons), they will all be run; if multiple select statements are selected, only data from the first selected select statement will be loaded into the Results Viewer (or exported).
    • If no text is selected, Harlequin will run the single query where the cursor is active. Other queries before and after semicolons will not be run.
    • To "Run All", first select all text with ctrl+a, and then run selection with ctrl+enter
  • Adds path autocomplete and validation to the file save/open and export data inputs.

Other Changes

  • Lowers the maximum number of records loaded into the results viewer to 10,000. (All records can be exported with ctrl+e)

[0.0.22] - 2023-08-02

Features

[0.0.21] - 2023-07-28

Features

  • Add -u/-unsigned/--allow-unsigned-extensions CLI flag for allowing loading of unsigned extensions.
  • File save and open dialog can now expand the user directory (~) (#61)

Bug Fixes

  • Error modal no longer crashes.
  • Text selection is now maintained when pressing more keys.

[0.0.20] - 2023-07-17

Features

  • F1 now displays a help screen that lists all keyboard bindings (#20).
  • F2 focuses the keyboard on the query editor.
  • F5 focuses the keyboard on the results viewer.
  • F6 focuses the keyboard on the data catalog.

Bug Fixes

  • ctrl+v for paste is now better-supported on all platforms.

[0.0.19] - 2023-06-26

Features

  • It's back: select text in the query editor using click and drag (#42).

Bug Fixes

  • Fixes a bug where PgUp could cause a crash (#46).

[0.0.18] - 2023-06-23

Bug Fixes

  • Changes format action key binding from ctrl+` to F4. The original binding was causing compatibility
    issues with Windows Powershell and Command Prompt (#82).
  • Adds key binding F9 as an alternative to ctrl+b to hide the left-hand panel.
  • Fixed query editor scrollbar color to match other widgets (#109)
  • Fixed compatibility with Textual v0.28.0 ...
Read more