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: MSSQL connector #121

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open

feat: MSSQL connector #121

wants to merge 37 commits into from

Conversation

nick-w-nick
Copy link
Contributor

πŸ”— Linked issue
resolves #120

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description
In this PR I've implemented an MSSQL connector utilizing the tedious library.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 36.41975% with 103 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@2e62a68). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/connectors/mssql/connector.ts 35.62% 103 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #121   +/-   ##
=======================================
  Coverage        ?   43.99%           
=======================================
  Files           ?       21           
  Lines           ?      832           
  Branches        ?       84           
=======================================
  Hits            ?      366           
  Misses          ?      461           
  Partials        ?        5           

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

}

if (value instanceof Date) {
return TYPES.DateTime;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also a DateTime2 type in tedious and in SQL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterbud This code was taken directly from the Kysely library, but upon research I do see that DateTime2 is a more suitable suggestion for anything new going forward. The MSSQL documentation says that it aligns with the existing SQL standard and should be able to be used as a drop-in replacement.

Would you prefer if we use DateTime2 as the default here instead?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be better. datetime has issues with fractional milliseconds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterbud I've pushed up a commit to swap this value to use DateTime2. Let me know if this works for you.

Thanks!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

MSSQL Connector
2 participants