## Drizzle + Zod Helpers If you want a really nice API for your drizzle PG tables from Zod, such as: ```ts import { inserts, select, enums } from './drizzle-zod-helpers' const userType = enums.UserType.parse('admin') // construct a type-safe insert const userInsert = inserts.user.parse({ ...user }) const userSelect = selects.user.parse({ ...user }) // construct type-safe insert functions async function createUser(user: Zod.infer) { return await db.insert(schema.users).values(user).execute() } ``` ## Installation Be sure to install `drizzle-zod` (and `zod`) ```sh yarn add drizzle-zod zod ``` Next, copy the TypeScript file from this Gist into your repo. Be sure to change the first line to point to your `schema` file.