dbcli / mycli

A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
http://mycli.net
Other
11.32k stars 656 forks source link

Add keywords for TiDB specific functions #1081

Closed dveeden closed 1 year ago

dveeden commented 1 year ago

Description

Add the TiDB specific functions as keywords to improve auto completion.

Reference:

Checklist

dveeden commented 1 year ago

@amjith these are functions as you can see in the documentation. Is this the right way to add these?

amjith commented 1 year ago

There's a separate variable that keeps a list of functions. https://github.com/dbcli/mycli/blob/main/mycli/sqlcompleter.py#L175

If you see this specific commit (https://github.com/dbcli/mycli/pull/1071/commits/755de1ebd80d744b0542aafc139dd672ed1fef85) you'll see how I added the tidb keywords variable. You might want to do the same for the functions variable.

codecov-commenter commented 1 year ago

Codecov Report

Base: 67.92% // Head: 67.99% // Increases project coverage by +0.06% :tada:

Coverage data is based on head (9a6b274) compared to base (48bd4c9). Patch coverage: 39.62% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1081 +/- ## ========================================== + Coverage 67.92% 67.99% +0.06% ========================================== Files 26 24 -2 Lines 2756 1959 -797 ========================================== - Hits 1872 1332 -540 + Misses 884 627 -257 ``` | [Impacted Files](https://codecov.io/gh/dbcli/mycli/pull/1081?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli) | Coverage Δ | | |---|---|---| | [mycli/clitoolbar.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvY2xpdG9vbGJhci5weQ==) | `29.62% <0.00%> (-3.71%)` | :arrow_down: | | [mycli/key\_bindings.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkva2V5X2JpbmRpbmdzLnB5) | `36.84% <25.92%> (-7.16%)` | :arrow_down: | | [mycli/packages/completion\_engine.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvcGFja2FnZXMvY29tcGxldGlvbl9lbmdpbmUucHk=) | `61.90% <50.00%> (-0.17%)` | :arrow_down: | | [mycli/sqlcompleter.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvc3FsY29tcGxldGVyLnB5) | `81.77% <57.14%> (-2.50%)` | :arrow_down: | | [mycli/completion\_refresher.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvY29tcGxldGlvbl9yZWZyZXNoZXIucHk=) | `88.88% <71.42%> (-2.03%)` | :arrow_down: | | [mycli/config.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvY29uZmlnLnB5) | `62.23% <0.00%> (-1.07%)` | :arrow_down: | | [mycli/main.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvbWFpbi5weQ==) | | | | [mycli/packages/special/iocommands.py](https://codecov.io/gh/dbcli/mycli/pull/1081/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli#diff-bXljbGkvcGFja2FnZXMvc3BlY2lhbC9pb2NvbW1hbmRzLnB5) | `64.09% <0.00%> (+0.10%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dbcli)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

dveeden commented 1 year ago

@amjith is this ok?

dveeden commented 1 year ago

@amjith Did you have time to look at this?

amjith commented 1 year ago

Sorry about the delay in reviewing this.