dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.12k stars 68 forks source link

Add .read command #71

Closed shwnchpl closed 5 years ago

shwnchpl commented 5 years ago

Description

Adds the .read command present in the CLI distributed with SQLite3 to allow for SQL "scripts" containing schemata etc. to be loaded from files.

Checklist

amjith commented 5 years ago

@shwnchpl The PR looks good.

Would you mind running Black on the code and adding your name to the AUTHORS file? If you can describe the change in the changelog, I'd appreciate it.

shwnchpl commented 5 years ago

@shwnchpl The PR looks good.

Would you mind running Black on the code...

I can do that.

...and adding your name to the AUTHORS file?

I might be missing something, but I don't see an AUTHORS file anywhere in this repo.

If you can describe the change in the changelog, I'd appreciate it.

Is that changelog.md? I'm not 100% clear on where/how I should add an entry, since I'm not sure what release version this change will be a part of. It also looks like a merge conflict got committed in that file. I can resolve the conflict and describe this change in a way that seems appropriate to me, if that works.

amjith commented 5 years ago

@shwnchpl I am so sorry. I have now fixed the pull request template.

The changelog.md file is now updated with sections for future release. We don't have AUTHORS file anymore.

Thank you for pointing that out. :disappointed:

codecov-io commented 5 years ago

Codecov Report

Merging #71 into master will decrease coverage by 0.6%. The diff coverage is 11.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #71      +/-   ##
==========================================
- Coverage   68.19%   67.58%   -0.61%     
==========================================
  Files          21       21              
  Lines        1330     1339       +9     
==========================================
- Hits          907      905       -2     
- Misses        423      434      +11
Impacted Files Coverage Δ
litecli/packages/special/dbcommands.py 20.87% <11.11%> (-1.08%) :arrow_down:
litecli/encodingutils.py 46.66% <0%> (-13.34%) :arrow_down:
litecli/packages/completion_engine.py 87.17% <0%> (-0.65%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c7947e9...4715256. Read the comment docs.

shwnchpl commented 5 years ago

We don't have AUTHORS file anymore.

Actually, it looks like the mistake was mine. I found the AUTHORS file; it's in the litecli directory. I fixed the style error in dbcommands.py, updated the change log, and added my name to the AUTHORS file.

Sorry about the confusion! :smile:

amjith commented 5 years ago

Looks good. Thank you for the PR.

:ice_cream:

shwnchpl commented 5 years ago

Thanks! 😊