Skip to content

Commit

Permalink
Add example for codition with function
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubknejzlik committed Apr 8, 2024
1 parent 1d24c55 commit aeb4377
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.env
node_modules
dist
storybook-static
10 changes: 10 additions & 0 deletions src/stories/2_Condition.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ Cond.notLike('foo', 'He_lo wor%');
`}
/>

## Conditions with functions

To check if a column's value does not match a pattern:

<QueryPreview
code={`
Cond.notLike(Fn.sum('foo'), 'He_lo wor%');
`}
/>

## Conclusion

The Condition Builder offers a powerful and flexible way to construct SQL conditions in a readable manner. By abstracting the raw SQL syntax, it helps in reducing errors and improving maintainability.

0 comments on commit aeb4377

Please sign in to comment.