docs icon indicating copy to clipboard operation
docs copied to clipboard

Add all CRUD examples or links to dbcommand page

Open reslear opened this issue 3 years ago • 0 comments

Add links to page https://github.com/prisma/docs/blob/main/content/200-concepts/100-components/02-prisma-client/090-raw-database-access.mdx for syntax guide how to use all CRUD commands: we have only insert, and need add other - example for update: https://www.mongodb.com/docs/manual/reference/command/update/#mongodb-dbcommand-dbcmd.update https://www.mongodb.com/docs/manual/reference/command/update/#std-label-update-statement-documents

or add all examples how to use any CRUD commands with types:

import type { UpdateStatement } from 'mongodb'

prisma.$runCommandRaw({
  update: '',
  updates: [
    // @ts-ignore
    {
      q: {},
      u: {
        $set: {
          address: { $toLower: '$address' },
        },
      },
      multi: true,
    } as UpdateStatement,
  ],
}),

sorry for my Eng )

reslear avatar May 30 '22 18:05 reslear