Need syntax help

I've been trying out drizzle for a couple hours, and was wondering if there's any way to replicate this action from prisma:
const session = await prisma.session.create({
  data: {
    userAgent: event.request.headers.get("user-agent"),
    user: {
      connectOrCreate: {
        where: {
          email: form.data.email,
        },
        create: {
          email: form.data.email,
        },
      },
    },
  },
  select: {
    id: true,
  },
})

Is there an equivalent to this way of creating a session that's just as efficient? The main appeal is the "connectOrCreate" functionality.
Was this page helpful?