pgcli icon indicating copy to clipboard operation
pgcli copied to clipboard

Changed destructive_warning to take a list of destructive commands

Open rigoneri opened this issue 3 years ago • 1 comments

Description

  • Changed the destructive_warning config to be a list of commands that are considered destructive. This would allow you to be warned on create, grant, or insert queries.
  • Updated the destructive warning message to display the dsn alias if available.

Checklist

  • [x] I've added this contribution to the changelog.rst.
  • [x] I've added my name to the AUTHORS file (or it's already there).
  • [x] I installed pre-commit hooks (pip install pre-commit && pre-commit install), and ran black on my code.
  • [x] Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

rigoneri avatar Mar 31 '22 15:03 rigoneri

Codecov Report

Base: 84.15% // Head: 80.07% // Decreases project coverage by -4.07% :warning:

Coverage data is based on head (e2b1d62) compared to base (6884c29). Patch coverage: 47.83% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1328      +/-   ##
==========================================
- Coverage   84.15%   80.07%   -4.08%     
==========================================
  Files          21       23       +2     
  Lines        2720     2148     -572     
==========================================
- Hits         2289     1720     -569     
+ Misses        431      428       -3     
Impacted Files Coverage Δ
pgcli/packages/parseutils/tables.py 97.67% <ø> (ø)
pgcli/packages/sqlcompletion.py 97.67% <ø> (ø)
pgcli/pgstyle.py 64.00% <ø> (ø)
pgcli/pgtoolbar.py 31.57% <0.00%> (+0.15%) :arrow_up:
pgcli/pyev.py 15.38% <15.38%> (ø)
pgcli/explain_output_formatter.py 46.15% <46.15%> (ø)
pgcli/key_bindings.py 52.94% <66.66%> (-0.19%) :arrow_down:
pgcli/pgbuffer.py 67.85% <66.66%> (+1.19%) :arrow_up:
pgcli/pgexecute.py 83.22% <87.14%> (+2.86%) :arrow_up:
pgcli/auth.py 91.30% <91.30%> (ø)
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

codecov-commenter avatar Apr 03 '22 01:04 codecov-commenter