If I have my appuser generated like
export interface Appuser {
created_at: Generated<Timestamp>;
email: string;
join_date: Generated<Timestamp>;
last_login: Timestamp | null;
name: string | null;
password_hash: string;
profile_picture_url: string | null;
updated_at: Timestamp | null;
user_id: Generated<number>;
username: string;
}
I cannot use this type to capture results returned from Kysley query.
const results: Appuser = db.selectFrom('appuser')
.selectAll()
.execute();
Doesn't work because the returned Date columns (that are Timestamp columns in the model like updated_at
) lack these Timestamp properties:
readonly __select__: SelectType;
readonly __insert__: InsertType;
readonly __update__: UpdateType;
Am I misunderstanding this module's purpose? Shouldn't I be able to use the generated db.d.ts file as my db models?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too