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

Make connections config consistent with Knex's config (breaking change) #65

Merged
merged 4 commits into from
Apr 27, 2020

Conversation

kabirbaidhya
Copy link
Contributor

BREAKING CHANGE

  • Connection config is made identical to the Knex's config. The only difference is we use only handful of those client and connection and we add id attribute for our internal purpose.
  • Being consistent with Knex is important because we want to support the things Knex add out of the box, as much as possible.
  • Programmatic API usage will break too - it expects type ConnectionConfig | ConnectionConfig[].

Checklist

  • Update and test node-app-mssql example
  • Update and test programmatic usage example
  • Update connection id auto-generation logic when not given - making it numeric might be the only way there.

@kabirbaidhya kabirbaidhya marked this pull request as draft April 26, 2020 12:48
@kabirbaidhya kabirbaidhya changed the title Make connections configuration consistent with Knex's config (breaking change) Make connections config consistent with Knex's config (breaking change) Apr 26, 2020
@kabirbaidhya kabirbaidhya self-assigned this Apr 26, 2020
@codecov-io
Copy link

Codecov Report

Merging #65 into experimental will decrease coverage by 6.46%.
The diff coverage is 33.33%.

Impacted file tree graph

@@               Coverage Diff                @@
##           experimental      #65      +/-   ##
================================================
- Coverage         29.72%   23.25%   -6.47%     
================================================
  Files                27       27              
  Lines              1840     1694     -146     
  Branches            355      335      -20     
================================================
- Hits                547      394     -153     
- Misses             1277     1286       +9     
+ Partials             16       14       -2     
Impacted Files Coverage Δ
src/config.ts 28.57% <7.69%> (-11.28%) ⬇️
src/util/db.ts 17.14% <75.00%> (-0.77%) ⬇️
...igration/source-types/SqlMigrationSourceContext.ts 23.52% <0.00%> (-20.07%) ⬇️
src/migration/service/migrator.ts 20.25% <0.00%> (-17.68%) ⬇️
src/util/promise.ts 15.09% <0.00%> (-15.82%) ⬇️
src/service/sqlRunner.ts 27.95% <0.00%> (-13.37%) ⬇️
src/service/execution.ts 14.08% <0.00%> (-10.34%) ⬇️
src/service/configInjection.ts 21.59% <0.00%> (-6.60%) ⬇️
src/migration/KnexMigrationSource.ts 84.21% <0.00%> (-6.12%) ⬇️
... and 8 more

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 da96de8...6c21dcf. Read the comment docs.

@kabirbaidhya kabirbaidhya marked this pull request as ready for review April 27, 2020 18:47
@kabirbaidhya
Copy link
Contributor Author

Remaining TODO items and tests to be done in the subsequent PRs.

@kabirbaidhya kabirbaidhya merged commit 32f7536 into experimental Apr 27, 2020
@kabirbaidhya kabirbaidhya deleted the consistent-connections branch April 27, 2020 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants