-
Notifications
You must be signed in to change notification settings - Fork 777
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
new raw sql pages #6170
new raw sql pages #6170
Conversation
Absolute URL checkNo absolute URLs to prisma.io/docs found. |
Redirect checkThis PR probably requires the following redirects to be added to static/_redirects:
|
Deploying docs with Cloudflare Pages
|
content/200-orm/050-overview/100-introduction/250-should-you-use-prisma.mdx
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/050-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-raw-database-access/index.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-writing-custom-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-writing-custom-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-writing-custom-sql/200-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-writing-custom-sql/index.mdx
Outdated
Show resolved
Hide resolved
@jharrell I like most of the changes. One suggestion and a nice to have IMO is a limitations section and a usage section. The usage section can be done incrementally, post launch as you've added a guide and also an example project. It would have explanations on how to pass in parameters, and write different types of queries. For the limitations section, we could have something like this: Limitations of TypeSQLSupported DatabasesTypeSQL supports a variety of databases, ensuring broad compatibility. For the most current list of supported databases, please consult the official documentation, as new database support may be added over time. Dynamic SQL Queries with Dynamic ColumnsTypeSQL does not natively support constructing SQL queries with dynamically added columns. When you need to create a query where the columns are determined at runtime, you must use the Example of a Dynamic Column Query Using queryRaw: const columns = 'name, email, age'; // Columns determined at runtime
const result = await prisma.$queryRaw(
`SELECT ${columns} FROM Users WHERE active = true`
); In this example, the columns to be selected are defined dynamically and included in the SQL query. While this approach provides flexibility, it requires careful attention to security, particularly to avoid SQL injection vulnerabilities. Additionally, using raw SQL queries means foregoing the type safety and benefits of TypeSQL's query builder. |
content/200-orm/200-prisma-client/100-queries/060-full-text-search.mdx
Outdated
Show resolved
Hide resolved
@ankur-arch, your example does not actually work with |
content/200-orm/050-overview/100-introduction/250-should-you-use-prisma.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/060-full-text-search.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/100-queries/060-full-text-search.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/200-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/200-raw-queries.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/300-safeql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/800-more/400-comparisons/01-prisma-and-typeorm.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Ankur Datta <64993082 [email protected]>
Co-authored-by: Ankur Datta <64993082 [email protected]>
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.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.
We dont mention that you need to regenerate with the --sql flag after running a migration anywhere.
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
content/200-orm/200-prisma-client/150-using-raw-sql/100-typedsql.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Ankur Datta <64993082 [email protected]>
Resolves DA-1117
Resolves DA-1116
Resolves DA-1227