Skip to content

Conversation

@vbergeron
Copy link

When running most OLTP queries, what we really need is to prepare the query if needed, then use the extended protocol to execute it.

This pr mirrors the session API for non-parametrized queries with parametrized counterparts prepared if not already in cache. It also add a fs2 pipe to transform a parametrized query to a pipe.

Some concerns :

  • The Compiler implicit for the execute method is not very nice, but using MonadCancelThrow is not either
  • I moved the Command pipe to the trait since it can be implemented without override

@codecov
Copy link

codecov bot commented Jan 3, 2023

Codecov Report

Merging #773 (a3f2840) into main (cd59e15) will increase coverage by 0.23%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##             main     #773      +/-   ##
==========================================
+ Coverage   84.65%   84.89%   +0.23%     
==========================================
  Files         124      124              
  Lines        1662     1668       +6     
  Branches      123      109      -14     
==========================================
+ Hits         1407     1416       +9     
+ Misses        255      252       -3     
Impacted Files Coverage Δ
modules/core/shared/src/main/scala/Session.scala 57.69% <88.88%> (+3.52%) ⬆️
...les/core/shared/src/main/scala/PreparedQuery.scala 29.41% <0.00%> (+5.88%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vbergeron vbergeron force-pushed the extended-session-api branch 4 times, most recently from 65055f6 to 667691e Compare January 4, 2023 09:46
@vbergeron vbergeron force-pushed the extended-session-api branch from 667691e to a3f2840 Compare January 4, 2023 09:54
@mpilquist mpilquist merged commit 9a4d320 into typelevel:main Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants