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

Convert SelectQueryBuilder and RawBuilder to interfaces #589

Merged
merged 2 commits into from
Jul 15, 2023

Conversation

koskimas
Copy link
Member

My guess is that these two classes are most used ones (in addition to Kysely) in customer code. By turning them to interfaces we get rid of some of the type mismatches when there are multiple versions of Kysely.

@vercel
Copy link

vercel bot commented Jul 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2023 4:29am

@koskimas koskimas force-pushed the get-rid-of-most-troublesome-classes branch from 0181785 to 2fa4c4c Compare July 14, 2023 07:49
@koskimas koskimas changed the title Convert SelectQueryBuilder and RawBuilder into interfaces Convert SelectQueryBuilder and RawBuilder to interfaces Jul 14, 2023
@koskimas koskimas force-pushed the get-rid-of-most-troublesome-classes branch from 2fa4c4c to 6a13e39 Compare July 14, 2023 10:45
Copy link
Member

@igalklebanov igalklebanov left a comment

Choose a reason for hiding this comment

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

This hopefully will cause less headaches for us, our users, and https://github.com/serverless-stack/sst's users/maintainers. 🙏

LGTM! 🚀

We should probably add a test that uses a query builder from another Kysely instance as an argument, but with the same Database interface, and verify it still works and doesn't throw compilation/runtime errors.

src/raw-builder/raw-builder.ts Show resolved Hide resolved
@igalklebanov igalklebanov added bug Something isn't working api Related to library's API typescript Related to Typescript labels Jul 14, 2023
@koskimas koskimas force-pushed the get-rid-of-most-troublesome-classes branch from 6a13e39 to a2af9d6 Compare July 15, 2023 04:29
@koskimas koskimas merged commit bf8963c into master Jul 15, 2023
4 checks passed
@koskimas koskimas deleted the get-rid-of-most-troublesome-classes branch July 15, 2023 04:34
Gaspero pushed a commit to Gaspero/kysely that referenced this pull request Oct 2, 2023
…rg#589)

* Convert RawBuilder to interface

* Convert SelectQueryBuilder to interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to library's API bug Something isn't working typescript Related to Typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants