Repository navigation
gh-158277: sqlite3 CLI completer: include views in column completion - #158278
Open
Tony123-tech wants to merge 3 commits into
Open
Tony123-tech wants to merge 3 commits into
Tony123-tech wants to merge 3 commits into
Conversation
tanloong
reviewed
Sep 27, 2026
Contributor
Author
|
Thanks for the review! I've fixed both issues:
|
Contributor
CREATE TABLE _table (_col_table);
CREATE VIEW _view AS SELECT _col_table AS _col_table_alias FROM _table;
def test_complete_columns(self):
input_ = textwrap.dedent("""\
CREATE TABLE _table (_col_table);
CREATE TEMP TABLE _temp_table (_col_temp);
+ CREATE VIEW _view AS SELECT _col_table AS _col_table_alias FROM _table;
ATTACH ':memory:' AS attached;
CREATE TABLE attached._attached_table (_col_attached);
SELECT _col_\t\tta\tFROM _table;
.quit\n""").encode()
output = self.write_input(input_)
lines = output.decode().splitlines()
indices = [
i for i, line in enumerate(lines) if line.startswith(self.PS1)
]
start, end = indices[-3], indices[-2]
candidates = [l.strip() for l in lines[start+1:end]]
self.assertEqual(
- candidates, ["_col_attached", "_col_table", "_col_temp"]
+ candidates, ["_col_attached", "_col_table", "_col_table_alias", "_col_temp"]
) |
Contributor
|
Looks good to me. Let's wait for erlend-aasland's review as he is the module maintainer, he might ask for some changes, in which case I'm sorry if I suggested something wrong. |
Contributor
Author
|
@tanloong @erlend-aasland The "Unresolved review" check is failing |
encukou
approved these changes
Oct 13, 2026
encukou
left a comment
Member
There was a problem hiding this comment.
Looks good to me; I'll merge ~Friday if there are no objections.
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.
Fixes gh-158277.