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

node-drivers: node-postgres based driver for testing #4151

Merged
merged 7 commits into from
Aug 21, 2023

Conversation

tomhoule
Copy link
Contributor

@tomhoule tomhoule commented Aug 18, 2023

To facilitate local evaluation and performance testing of the prototype.
It follows the same patterns as the planetscale and neon drivers, and
includes smoke tests.

Co-authored-by: jkomyno schiabel@prisma.io

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 18, 2023

CodSpeed Performance Report

Merging #4151 will not alter performance

Comparing new-pg-js-connector-branch (15a0bc1) with main (0bc8ee6)

Summary

✅ 11 untouched benchmarks

@jkomyno jkomyno marked this pull request as ready for review August 19, 2023 10:24
@jkomyno jkomyno requested a review from a team as a code owner August 19, 2023 10:24
@jkomyno jkomyno added this to the 5.2.0 milestone Aug 19, 2023
@tomhoule tomhoule marked this pull request as draft August 21, 2023 09:47
super({ client: connection, isTransaction: true })
class PgTransaction extends PgQueryable<TransactionClient> implements Transaction {
constructor(client: pg.PoolClient) {
super(client)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't that equivalent to leaving the constructor out?

Copy link
Contributor

Choose a reason for hiding this comment

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

Are you referring to the constructor(client) { super(client) } in a subclass of a class having a compatible constructor? Yes, it's indeed redundant. I find it easier to read, but feel free to remove it.

}

/**
* Execute a query given as SQL, interpolating the given parameters and
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 parameters aren't interpolated in quaint/tokio_postgres — is it different in PG?

Copy link
Contributor

@jkomyno jkomyno Aug 21, 2023

Choose a reason for hiding this comment

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

That series of comments is copied almost verbatim from

/// Execute a query given as SQL, interpolating the given parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should fix that, at some point.

@tomhoule tomhoule changed the title New pg js connector branch node-drivers: node-postgres based driver for testing Aug 21, 2023
@tomhoule tomhoule marked this pull request as ready for review August 21, 2023 11:20
@tomhoule tomhoule merged commit b288d5a into main Aug 21, 2023
51 checks passed
@tomhoule tomhoule deleted the new-pg-js-connector-branch branch August 21, 2023 11:39
import { ColumnTypeEnum, type ColumnType } from '@jkomyno/prisma-js-connector-utils'
import { types } from 'pg'

const NeonColumnType = types.builtins
Copy link
Member

Choose a reason for hiding this comment

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

copy/paste or should this really say PgColumnType or similar?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

copy/paste

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