is placeholder in prepare statements deprecated!??

const courses = db.query.userCourses
.findMany({
where: eq(placeholder("userId"), userCourses.userId),
columns: {},
with: { courses: true },
})
.prepare("courses");
const courses = db.query.userCourses
.findMany({
where: eq(placeholder("userId"), userCourses.userId),
columns: {},
with: { courses: true },
})
.prepare("courses");
'placeholder' is deprecated. typescript (6385) [1, 14]
The signature '(name: "userId"): Placeholder<"userId", any>' of 'placeholder' is deprecated. typescript (6387) [9, 15]
'placeholder' is deprecated. typescript (6385) [1, 14]
The signature '(name: "userId"): Placeholder<"userId", any>' of 'placeholder' is deprecated. typescript (6387) [9, 15]
3 Replies
Angelelz
Angelelz13mo ago
You are supposed to use sql.placeholder() instead
tomri
tomriOP13mo ago
Drizzle Queries - DrizzleORM
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind
Angelelz
Angelelz13mo ago
Yeah, they need to update some stuff in the docs
Want results from more Discord servers?
Add your server