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 introspectSql command #4941

Merged
merged 36 commits into from
Aug 5, 2024
Merged

feat: add introspectSql command #4941

merged 36 commits into from
Aug 5, 2024

Conversation

Copy link

codspeed-hq bot commented Jul 4, 2024

CodSpeed Performance Report

Merging #4941 will not alter performance

Comparing feat/introspect-sql (b2b600c) with main (a6977e5)

Summary

✅ 11 untouched benchmarks

Copy link
Contributor

github-actions bot commented Jul 4, 2024

WASM Query Engine file Size

Engine This PR Base branch Diff
Postgres 2.051MiB 2.057MiB -5.805KiB
Postgres (gzip) 817.381KiB 820.453KiB -3.072KiB
Mysql 2.020MiB 2.027MiB -7.561KiB
Mysql (gzip) 804.702KiB 808.035KiB -3.334KiB
Sqlite 1.917MiB 1.919MiB -2.584KiB
Sqlite (gzip) 764.364KiB 766.277KiB -1.914KiB

@Weakky Weakky changed the title wip: vertical slice of introspect sql feat: add introspectSql command Jul 29, 2024
@Weakky Weakky marked this pull request as ready for review July 29, 2024 15:34
@Weakky Weakky requested a review from a team as a code owner July 29, 2024 15:34
@Weakky Weakky requested review from jkomyno and removed request for a team July 29, 2024 15:34
@@ -318,7 +318,7 @@ impl Connector for PostgresDatamodelConnector {
DoublePrecision => ScalarType::Float,
// Decimal
Decimal(_) => ScalarType::Decimal,
Money => ScalarType::Float,
Money => ScalarType::Decimal,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The mapping was incorrect. I spotted it as we're using this function for native type tests

@Weakky Weakky added this to the 5.18.0 milestone Jul 30, 2024
&mut self,
_input: IntrospectSqlQueryInput,
) -> BoxFuture<'_, ConnectorResult<IntrospectSqlQueryOutput>> {
unreachable!()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

question: does the client gate the engine from being called at all?


let res = parse_sql_doc(
r#" -- @description This query returns a user by it's id
-- @param {Int} $1:userId valid user identifier
Copy link
Contributor Author

Choose a reason for hiding this comment

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

how about we accept typescript types instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Even just supporting {Type | null} using Prisma scalar types would be a considerable improvement, imho

@Weakky Weakky merged commit d7c6eca into main Aug 5, 2024
367 of 368 checks passed
@Weakky Weakky deleted the feat/introspect-sql branch August 5, 2024 16:26
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