const jobsDb = await db.query.jobs_table.findMany({
where: notExists(
db
.select()
.from(matches_table)
.where(
and(
eq(matches_table.user_id, userId),
eq(matches_table.job_id, jobs_table.id),
),
),
),
with: {
working_days: true,
location: true,
location_image_file: true,
required_languages: true,
required_skills: true,
matches: true,
},
// orderBy: sql`RAND()`,
});
const jobsDb = await db.query.jobs_table.findMany({
where: notExists(
db
.select()
.from(matches_table)
.where(
and(
eq(matches_table.user_id, userId),
eq(matches_table.job_id, jobs_table.id),
),
),
),
with: {
working_days: true,
location: true,
location_image_file: true,
required_languages: true,
required_skills: true,
matches: true,
},
// orderBy: sql`RAND()`,
});