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: Rename prisma to db #1077

Closed
NiklasBurggraaff opened this issue Jan 13, 2023 · 3 comments
Closed

feat: Rename prisma to db #1077

NiklasBurggraaff opened this issue Jan 13, 2023 · 3 comments
Labels
🌟 enhancement New feature or request

Comments

@NiklasBurggraaff
Copy link
Contributor

Is your feature request related to a problem? Please describe.

With the new folder structure from #934 the trpc variable was renamed api.

Copilot autocompleted with the following ctx.db.example.findMany() in a tRPC procedure, which made me think could prisma also be renamed to something "abstracting" away that it is prisma?

Describe the solution you'd like to see

Rename the prisma variable in src/server/db.ts to db and the prisma attribute in the return of createInnerTRPCContext in src/server/api/trpc.ts.

Describe alternate solutions

Keep the prisma variable name

Additional information

No response

@NiklasBurggraaff NiklasBurggraaff added the 🌟 enhancement New feature or request label Jan 13, 2023
@c-ehrlich
Copy link
Member

I'm leaning against this because it's called prisma everywhere in the Prisma docs. One of our main heuristics when deciding this stuff is that if we do something different than the docs of the libraries we use, we better have a very good reason for that.

@NiklasBurggraaff
Copy link
Contributor Author

I'm leaning against this because it's called prisma everywhere in the Prisma docs. One of our main heuristics when deciding this stuff is that if we do something different than the docs of the libraries we use, we better have a very good reason for that.

That makes sense.

Just out of curiosity, what was the reason that trpc was renamed then.

@c-ehrlich
Copy link
Member

I'm leaning against this because it's called prisma everywhere in the Prisma docs. One of our main heuristics when deciding this stuff is that if we do something different than the docs of the libraries we use, we better have a very good reason for that.

That makes sense.

Just out of curiosity, what was the reason that trpc was renamed then.

Many users were confused by the boilerplate, one reason was that there were too many things named trpc

And there might be some docs changes on tRPC side coming soon ;)

@NiklasBurggraaff NiklasBurggraaff closed this as not planned Won't fix, can't repro, duplicate, stale Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants