Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print the elapsed time & # of returned rows in the interactive repl #344

Merged
merged 3 commits into from
Oct 3, 2023

Conversation

mamcx
Copy link
Contributor

@mamcx mamcx commented Sep 29, 2023

Description of Changes

To help do interactive timing of queries, now it print on the repl:

└──────────────────────────────────────────────────────────┘
🪐bitcraft>select * from st_table where table_id = 1
 table_id | table_name | table_type | table_access
----------+------------+------------+--------------
 1        | st_columns | system     | public

[Elapsed  ]: 14.62ms.
[Result  0]: 1 rows.

API and ABI

  • This is a breaking change to the module ABI
  • This is a breaking change to the module API
  • This is a breaking change to the ClientAPI
  • This is a breaking change to the SDK API

If the API is breaking, please state below what will break

Copy link
Contributor

@gefjon gefjon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat!

@mamcx mamcx self-assigned this Sep 29, 2023
Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the smoketests that this PR breaks. I would also recommend using the same format as psql for timing:

# \timing on
Timing is on.

# select 1234;        
 ?column? 
----------
     1234
(1 row)

Time: 0.203 ms

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! very cool

@cloutiertyler cloutiertyler merged commit d456ce4 into master Oct 3, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants