| 61 | }); |
| 62 | |
| 63 | function generateSchema( |
| 64 | schema: AnySchema, |
| 65 | config: (typeof tests)[number] |
| 66 | ): string { |
| 67 | if (config.type === "prisma") { |
| 68 | return Prisma.generateSchema(schema, config.provider); |
| 69 | } |
| 70 | |
| 71 | if (config.type === "drizzle-orm") { |
| 72 | return Drizzle.generateSchema(schema, config.provider); |
| 73 | } |
| 74 | |
| 75 | if (config.type === "typeorm") { |
| 76 | return TypeORM.generateSchema(schema, config.provider); |
| 77 | } |
| 78 | |
| 79 | throw new Error(`Unsupported ORM: ${(config as any).type}`); |
| 80 | } |
| 81 | |
| 82 | // UUID test schema |
| 83 | const uuidSchema = schema({ |