How to get a plain row schema using drizzle-zod?

I am using these drizzle packages
"drizzle-orm": "0.40.0",
"drizzle-zod": "0.7.0",
"drizzle-kit": "0.30.5", (dev dependency)

I used drizzle kit to pull table schemas from a pg table
I want to get a plain schema that represents a row in this table
I tried this but cannot infer the type from this schema
export const amBrandSchema = createSelectSchema(table);
// This does not work
type AmBrandSchema = z.infer<typeof amBrandSchema>;

The amBrandSchema seems to be of a type BuildSchema<"select",...>
I would let to get a zod schema that is an object that represents a row of the table
What am I doing wrong?
Was this page helpful?