dbcli / pgspecial

Python implementation of postgres meta commands (backslash commands)
BSD 3-Clause "New" or "Revised" License
74 stars 54 forks source link

Named query positional parameters aggregation #108

Closed chagui closed 3 years ago

chagui commented 3 years ago

Description

This pull-request propose an implementation for #106. The proposal adds 2 new placeholders $* and $@, respectively raw aggregation and string aggregation. The difference being that the later will quote the argument values, removing the need to quote the argument (e.g. 'foo' instead of \'foo\'). I took the addition to add tests for subst_favorite_query_args covering both current and new placeholders.

Checklist

codecov-commenter commented 3 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@20dc99f). Click here to learn what that means. The diff coverage is 65.51%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #108   +/-   ##
=========================================
  Coverage          ?   29.08%           
=========================================
  Files             ?        6           
  Lines             ?     2486           
  Branches          ?        0           
=========================================
  Hits              ?      723           
  Misses            ?     1763           
  Partials          ?        0           
Impacted Files Coverage Δ
pgspecial/help/commands.py 0.20% <ø> (ø)
pgspecial/main.py 38.18% <52.17%> (ø)
pgspecial/iocommands.py 41.86% <65.15%> (ø)
pgspecial/dbcommands.py 33.60% <66.73%> (ø)
pgspecial/namedqueries.py 92.00% <75.00%> (ø)
pgspecial/__init__.py 100.00% <100.00%> (ø)

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 20dc99f...fbea9d9. Read the comment docs.

amjith commented 3 years ago

Looks good. Thanks for adding tests. :+1: