kysely-org / kysely

A type-safe typescript SQL query builder
https://kysely.dev
MIT License
10.53k stars 270 forks source link

[Docs] Update complex join example to better illustrate the options available (symmetry with `where`) #883

Closed MarkusWendorf closed 8 months ago

MarkusWendorf commented 8 months ago

Hello,

when I read the docs I failed to understand how to do OR expressions.

You can do all the same things with the on method that you can with the corresponding where method

The hint at the where documentation was not sufficient for me (that's more a me issue though).

So I included a little more information about the options provided by on.

vercel[bot] commented 8 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kysely ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 14, 2024 11:42am
koskimas commented 8 months ago

Those files you modified are automatically generated from the comments in the source code. You need to:

  1. Modify the example in the code coments
  2. Build using npm run build
  3. Run this script to generate the example files for kysely.dev.
MarkusWendorf commented 8 months ago

Ok got it. The script is using lodash which was not present in the package.json. I added it as a dev dependency, if that's alright.