Reusable pgTable column helper - losing type : [x: string] instead of user_id
Hi, I am trying to create a reusable column to use accross multiple tables. If I use the following :
I get the correct type in my KyselyDatabase interface.
I'd like it to be a function instead. But when I do the following :
I get the following type (thus breaking types accross all my db queries)
I get the correct type in my KyselyDatabase interface.
user_id: ColumnType<string, string, string>;I'd like it to be a function instead. But when I do the following :
I get the following type (thus breaking types accross all my db queries)
[x: string]: ColumnType<string | null, string, string>;