79688159

Date: 2025-07-02 23:03:27
Score: 0.5
Natty:
Report link

It looks like this was asked in the GitHub issues for Kysely already:

https://github.com/kysely-org/kysely/issues/838

The author essentially recommends the solution I proposed in the question itself which is to wrap it in an object:

private async makeQuery(db: Conn) {
    const filter = await getFilterArg(db);
    return { 
      query: db.selectFrom("item").where("item.fkId", "=", filter)
    }
}
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: acw