python-trio / triopg

PostgreSQL client for Trio based on asyncpg
Other
45 stars 8 forks source link

correctly proxy PreparedStatement non-async methods #14

Closed shamrin closed 3 years ago

shamrin commented 3 years ago

This PR lets you use prepared statement methods like .get_statusmsg() and .get_query():

stmt = await conn("select version()")
await stmt.fetch()
stmt.get_statusmsg() # => 'SELECT 1'
stmt.get_query() # => 'select version()'
codecov[bot] commented 3 years ago

Codecov Report

Merging #14 (d2841b0) into master (8fe8417) will increase coverage by 0.57%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
+ Coverage   98.60%   99.17%   +0.57%     
==========================================
  Files           6        6              
  Lines         358      363       +5     
  Branches       14       14              
==========================================
+ Hits          353      360       +7     
+ Misses          2        1       -1     
+ Partials        3        2       -1     
Impacted Files Coverage Δ
triopg/_tests/test_triopg.py 100.00% <100.00%> (ø)
triopg/_triopg.py 98.03% <100.00%> (+1.30%) :arrow_up:
touilleMan commented 3 years ago

@shamrin I've just released version 0.6.0 (https://pypi.org/project/triopg/0.6.0/)

shamrin commented 3 years ago

@touilleMan Nice, thank you!