Back to Kysely

Conditional where calls

site/docs/examples/where/0050-conditional-where-calls.mdx

0.28.17853 B
Original Source

Conditional where calls

You can add expressions conditionally like this:

import { Playground } from '../../../src/components/Playground'

import { conditionalWhereCalls } from './0050-conditional-where-calls'

<div style={{ marginBottom: '1em' }}> <Playground code={conditionalWhereCalls} /> </div>

:::info[More examples] The API documentation is packed with examples. The API docs are hosted here, but you can access the same documentation by hovering over functions/methods/classes in your IDE. The examples are always just one hover away!

For example, check out these sections: