valtyr/prisma-kysely

Wrapped types are not generated as per kysely suggestion

Opened this issue · 1 comments

Reading Kysely documentation I noticed they suggest using Insertable, Selectable, and Updatable wrappers.

export interface PetTable {
  id: Generated<number>
  name: string
  owner_id: number
  species: 'dog' | 'cat'
}

// You should not use the table schema interfaces directly. Instead, you should
// use the `Selectable`, `Insertable` and `Updateable` wrappers. These wrappers
// make sure that the correct types are used in each operation.
export type Pet = Selectable<PetTable>
export type NewPet = Insertable<PetTable>
export type PetUpdate = Updateable<PetTable>

It'll be nice if they'll be generated too.

That would be cool. If you're willing to create a PR for that I'd be more than happy to have a look.