We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given the following schema:
CREATE table bookshelf( id bigserial NOT NULL, book_ids bigint[] NOT NULL);
The generated type is as follows:
export interface Bookshelf { id: Generated<Int8> book_ids: Int8[] }
This type does not accept an array of numbers. The following code doesn't compile with Type number[] is not assignable to type Int8[]
Type number[] is not assignable to type Int8[]
await db .insertInto('bookshelf') .values({ book_ids: [12, 23] }) .execute()
However, if the array type is changed to the following as suggested in kysely-org/kysely#957 (comment), the same code compiles:
type Int8Array = ColumnType< SelectType<Int8>[], InsertType<Int8>[], UpdateType<Int8>[] >; export interface Bookshelf { id: Generated<Int8> book_ids: Int8Array }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Given the following schema:
The generated type is as follows:
This type does not accept an array of numbers. The following code doesn't compile with
Type number[] is not assignable to type Int8[]
However, if the array type is changed to the following as suggested in kysely-org/kysely#957 (comment), the same code compiles:
Upvote & Fund
The text was updated successfully, but these errors were encountered: