update the sqlite history timestamp and duration with nushell values#17680
Merged
fdncred merged 1 commit intonushell:mainfrom Mar 4, 2026
Merged
Conversation
NotTheDr01ds
pushed a commit
that referenced
this pull request
Mar 7, 2026
This PR is a follow-on of these PRs to hopefully finish the last fixing of the sqlite pushdown. The biggest part of this fix is creating mini-sqlite-column-projection code for when sqlite column names are aliased in rust code like `command_line as command`. It's not a fully sql parser but it looks for column aliasing so it knows how to select the data properly. I've tried to comment the code verbosely to help us all remember what it's doing. - #17415 - #17645 - #17680 - #17668 I also took the opportunity to refactor the push down calls from filter commands so that they're easier to understand by calling a new pipeline function that does the same thing but in a little cleaner way. There's also a bunch of new tests around `open some_sqlite_file.db`. Before this PR you would get this with `history | select command` because `command` is an alias to `command_line`. ```nushell ❯ history | select command Error: nu::shell::error × Failed to execute query ╭─[repl_entry #1:1:11] 1 │ history | select command · ───┬── · ╰── no such column: command in SELECT command FROM [history] at offset 7 ╰──── ``` After, it just works (tm) ## Release notes summary - What our users need to know Refactor sqlite push down and apply to (nearly) all filter commands. ## Tasks after submitting N/A
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR tries to update the sqlite output of the history file by adding column adapters so we can maintain speed but still get nushell values out of the command.
closes #17666
Release notes summary - What our users need to know
Update the sqlite output of the history file by adding column adapters so we can maintain speed but still get nushell values out of the command.
Before
After
Tasks after submitting
N/A
/cc @NotTheDr01ds