Babadur
DTDrizzle Team
•Created by Babadur on 5/7/2024 in #help
No Overload Matches this call on insert
Hello, I get an error when I try to select to a table, Here is the error I get:
here is the function where I get the error:
│ E No overload matches this call. typescript (2769) [63, 5]
│ Overload 1 of 3, '(left: Column<ColumnBaseConfig<ColumnDataType, string>, object, object>, right: unknown): SQL<unknown>', gave the following error.
│ Argument of type 'number' is not assignable to parameter of type 'Column<ColumnBaseConfig<ColumnDataType, string>, object, object>'.
│ Overload 2 of 3, '(left: Aliased<SQLiteColumn<{ name: "userId"; tableName: "waitlists"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; hasDefault: false; enumValues: undefined; baseColumn: never; }, object>>, right: SQLWrapper | SQLiteColumn<...>): SQL<...>', gave the following error.
│ Argument of type 'number' is not assignable to parameter of type 'Aliased<SQLiteColumn<{ name: "userId"; tableName: "waitlists"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; hasDefault: false; enumValues: undefined; baseColumn: never; }, object>>'.
│ Overload 3 of 3, '(left: SQLWrapper, right: unknown): SQL<unknown>', gave the following error.
│ Argument of type 'number' is not assignable to parameter of type 'SQLWrapper'.
│ E No overload matches this call. typescript (2769) [63, 5]
│ Overload 1 of 3, '(left: Column<ColumnBaseConfig<ColumnDataType, string>, object, object>, right: unknown): SQL<unknown>', gave the following error.
│ Argument of type 'number' is not assignable to parameter of type 'Column<ColumnBaseConfig<ColumnDataType, string>, object, object>'.
│ Overload 2 of 3, '(left: Aliased<SQLiteColumn<{ name: "userId"; tableName: "waitlists"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; hasDefault: false; enumValues: undefined; baseColumn: never; }, object>>, right: SQLWrapper | SQLiteColumn<...>): SQL<...>', gave the following error.
│ Argument of type 'number' is not assignable to parameter of type 'Aliased<SQLiteColumn<{ name: "userId"; tableName: "waitlists"; dataType: "number"; columnType: "SQLiteInteger"; data: number; driverParam: number; notNull: true; hasDefault: false; enumValues: undefined; baseColumn: never; }, object>>'.
│ Overload 3 of 3, '(left: SQLWrapper, right: unknown): SQL<unknown>', gave the following error.
│ Argument of type 'number' is not assignable to parameter of type 'SQLWrapper'.
export async function getWaitlists() {
const user = await getUser();
if (!user.clerkId) throw new Error("Unauthorized")
const result = await db.select().from(waitlists).where(eq(
user.id,
waitlists.userId
))
return result;
};
export async function getWaitlists() {
const user = await getUser();
if (!user.clerkId) throw new Error("Unauthorized")
const result = await db.select().from(waitlists).where(eq(
user.id,
waitlists.userId
))
return result;
};
8 replies