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

refactor: expose ColumnType to quaint::ResultSet #4960

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

Weakky
Copy link
Contributor

@Weakky Weakky commented Jul 19, 2024

Overview

closes https://github.com/prisma/team-orm/issues/1245

This PR adds a new types fields to quaint::ResultSet. It is a preparatory PR for the TypedSQL initiative. It helps to have a single abstraction that's used both for TypedSQL and queryRaw in general. This ensures we're always in sync between the types sent to the client at compile-time and those sent back at runtime.

For Postgres specifically, this PR adds a macro that helps keep the ColumnType and the actual Value we return at runtime in sync.

Copy link

codspeed-hq bot commented Jul 19, 2024

CodSpeed Performance Report

Merging #4960 will not alter performance

Comparing improve/quaint-column-type (8f704ac) with main (f66d888)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jul 19, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.057MiB 2.056MiB 1.236KiB
Postgres (gzip) 820.454KiB 820.651KiB -202.000B
Mysql 2.027MiB 2.025MiB 2.593KiB
Mysql (gzip) 808.036KiB 808.059KiB -24.000B
Sqlite 1.919MiB 1.918MiB 1.023KiB
Sqlite (gzip) 766.278KiB 765.963KiB 322.000B

@Weakky Weakky force-pushed the improve/quaint-column-type branch from fac12db to 9089d54 Compare July 19, 2024 14:19
@Weakky Weakky added this to the 5.18.0 milestone Jul 19, 2024
@Weakky Weakky marked this pull request as ready for review July 22, 2024 08:35
@Weakky Weakky requested a review from a team as a code owner July 22, 2024 08:35
@Weakky Weakky requested review from Druue and removed request for a team July 22, 2024 08:35
@Weakky Weakky force-pushed the improve/quaint-column-type branch from a3bb63c to 6cf1799 Compare July 22, 2024 13:24
@Weakky Weakky force-pushed the improve/quaint-column-type branch from 6cf1799 to 074e622 Compare July 22, 2024 13:26
Copy link
Member

@SevInf SevInf left a comment

Choose a reason for hiding this comment

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

Great job, LGTM with one small nit

@Weakky Weakky merged commit ff166c7 into main Jul 22, 2024
2 checks passed
@Weakky Weakky deleted the improve/quaint-column-type branch July 22, 2024 16:15
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.

2 participants