const items = await ctx.db.query.watch.findMany({
...withCursorPagination({
limit: 10,
cursors: [[schema.watchBrand.name, "desc", cursor]],
}),
where: and(
like(schema.watch.name, `%${input.name}%`),
notInArray(schema.watch.id, usersWatches),
),
with: {
watchBrand: true,
watchFamily: true,
},
});
const items = await ctx.db.query.watch.findMany({
...withCursorPagination({
limit: 10,
cursors: [[schema.watchBrand.name, "desc", cursor]],
}),
where: and(
like(schema.watch.name, `%${input.name}%`),
notInArray(schema.watch.id, usersWatches),
),
with: {
watchBrand: true,
watchFamily: true,
},
});