const matchResult = await db.query.matches.findMany({
where: and(
between(matches.time, from, to),
),
orderBy: [
asc(matches.time),
],
with: {
team1: true, // one to one with a "team" entity
team2: true, // one to one with a "team" entity
},
});
const matchResult = await db.query.matches.findMany({
where: and(
between(matches.time, from, to),
),
orderBy: [
asc(matches.time),
],
with: {
team1: true, // one to one with a "team" entity
team2: true, // one to one with a "team" entity
},
});