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
Client constructor #480
Client constructor #480
Conversation
Fixed some typos
…client-constructor
…client-constructor
…client-constructor
content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx
Outdated
Show resolved
Hide resolved
content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx
Outdated
Show resolved
Hide resolved
…02-constructor.mdx Co-authored-by: Tim Suchanek <Tim.Suchanek@gmail.com>
Just a random question... Netlify says here in GitHub So it's not possible to preview the PR I guess? |
@Jolg42 We have a bit of an issue with the /docs subdirectory - if you remove it, you can see the page: https://deploy-preview-480--prisma2.netlify.app/reference/tools-and-interfaces/prisma-client/ |
Ok so here it's https://deploy-preview-480--prisma2.netlify.app/reference/tools-and-interfaces/prisma-client/constructor/ and it works thanks <3 |
Spotted small things @mhwelander Replace
|
…2-docs into client-constructor
Fixed - thank you! I'll wait for an update on whether the format of |
content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx
Outdated
Show resolved
Hide resolved
I broke something and fixed it but in the end the indentation looks better 😄 |
content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Waiting for prisma/prisma#2801
content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx
Outdated
Show resolved
Hide resolved
}) | ||
``` | ||
|
||
> **Note**: If you define multiple datasources in `schema.prisma`, Prisma defaults to the first entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is that? Do we not define which one it should be applied to by using my_database
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @timsuchanek
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a enabled property in the schema before that got removed (never saw it, just the remains)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the connection to this comment? Should it not use the datasource with the name you supply above, my_database
in this example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually touching on undefined behavior, I think the Note is correct, but we need to fix that.
Even though you provide a specific datasource as a constructor arg, it could even be, that in our current implementation, it might not be used, if it's not the first datasource in the schema.
We don't have tests for that and didn't define this behavior clearly yet, but should definitely do that asap.
…02-constructor.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
@janpio I think you can unblock that PR now 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment left for the Note, rest looks good.
Yeah 🎊 😄 |
* Added illustrations Fixed some typos * Client constructor page * Constructor docs * Fixed index * Added # to page * Update content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx Co-authored-by: Tim Suchanek <Tim.Suchanek@gmail.com> * Joël fixes * Update content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx * Update 02-constructor.mdx * Update content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> Co-authored-by: Tim Suchanek <Tim.Suchanek@gmail.com> Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com> Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com>
* Added illustrations Fixed some typos * Style guide wording * Link fixes * Enum binary * Engine binaries * Update content/02-understand-prisma/05-under-the-hood.mdx * Update content/02-understand-prisma/05-under-the-hood.mdx * Update content/02-understand-prisma/05-under-the-hood.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> * Update content/02-understand-prisma/05-under-the-hood.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> * Update content/02-understand-prisma/05-under-the-hood.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> * Update content/02-understand-prisma/05-under-the-hood.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> * Update content/02-understand-prisma/05-under-the-hood.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> * Client constructor (#480) * Added illustrations Fixed some typos * Client constructor page * Constructor docs * Fixed index * Added # to page * Update content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx Co-authored-by: Tim Suchanek <Tim.Suchanek@gmail.com> * Joël fixes * Update content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx * Update 02-constructor.mdx * Update content/03-reference/01-tools-and-interfaces/02-prisma-client/02-constructor.mdx Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> Co-authored-by: Tim Suchanek <Tim.Suchanek@gmail.com> Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com> Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> * Fixes * Fixes * Fixes Co-authored-by: Joël Galeran <Jolg42@users.noreply.github.com> Co-authored-by: Jan Piotrowski <piotrowski+github@gmail.com> Co-authored-by: Tim Suchanek <Tim.Suchanek@gmail.com>
Client constructor parameters page.