Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add ability to specify knex transaction config #207

Merged
merged 2 commits into from
Apr 21, 2023

Conversation

wschurman
Copy link
Member

Why

Expo has a need for serializable transaction isolation level. This change allows specifying this configuration for knex.

How

Add transaction config, pass through (with translation particular to the adaptor flavor).

Test Plan

Run new tests.

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Merging #207 (8cc3719) into main (83fe9cd) will decrease coverage by 0.25%.
The diff coverage is 82.85%.

@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
- Coverage   96.18%   95.94%   -0.25%     
==========================================
  Files          81       81              
  Lines        2071     2094      +23     
  Branches      271      282      +11     
==========================================
+ Hits         1992     2009      +17     
  Misses         79       79              
- Partials        0        6       +6     
Flag Coverage Δ
integration 95.94% <82.85%> (-0.25%) ⬇️
unittest 95.94% <82.85%> (-0.25%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ter-knex/src/PostgresEntityQueryContextProvider.ts 78.57% <71.42%> (-21.43%) ⬇️
...ample/src/adapters/InMemoryQueryContextProvider.ts 75.00% <100.00%> (ø)
packages/entity/src/EntityQueryContext.ts 97.05% <100.00%> (+0.23%) ⬆️
packages/entity/src/EntityQueryContextProvider.ts 100.00% <100.00%> (ø)
packages/entity/src/ViewerContext.ts 100.00% <100.00%> (ø)
...tity/src/utils/testing/StubQueryContextProvider.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

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

@wschurman
Copy link
Member Author

wschurman commented Apr 19, 2023

I think I'm okay with codecov decrease since this is just a translation layer and typescript is sufficient to check that.

packages/entity/src/EntityQueryContext.ts Outdated Show resolved Hide resolved
packages/entity/src/EntityQueryContextProvider.ts Outdated Show resolved Hide resolved
packages/entity/src/EntityQueryContextProvider.ts Outdated Show resolved Hide resolved
packages/entity/src/EntityQueryContext.ts Outdated Show resolved Hide resolved
@wschurman wschurman requested a review from ide April 21, 2023 00:42
@wschurman wschurman merged commit 2069a0d into main Apr 21, 2023
1 of 3 checks passed
@wschurman wschurman deleted the @wschurman/transaction-config branch April 21, 2023 01:10
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.

None yet

3 participants