From 0982d61a59d6dccaaf2a026cad82a77b843be7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Koskim=C3=A4ki?= Date: Thu, 28 Sep 2023 08:48:56 +0300 Subject: [PATCH] add mention that function calls work everywhere --- site/docs/examples/SELECT/0060-function-calls.mdx | 4 +++- src/query-builder/function-module.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/site/docs/examples/SELECT/0060-function-calls.mdx b/site/docs/examples/SELECT/0060-function-calls.mdx index 7615565c9..b5b82bc32 100644 --- a/site/docs/examples/SELECT/0060-function-calls.mdx +++ b/site/docs/examples/SELECT/0060-function-calls.mdx @@ -4,7 +4,9 @@ title: 'Function calls' # Function calls -This example uses the `fn` module to select some aggregates: +This example shows how to create function calls. These examples also work in any +other place (`where` calls, updates, inserts etc.). The only difference is that you +leave out the alias (the `as` call) if you use these in any other place than `select`. import { Playground, diff --git a/src/query-builder/function-module.ts b/src/query-builder/function-module.ts index 52b2f143a..77e12d43f 100644 --- a/src/query-builder/function-module.ts +++ b/src/query-builder/function-module.ts @@ -31,7 +31,9 @@ import { Selectable } from '../util/column-type.js' * * * - * This example uses the `fn` module to select some aggregates: + * This example shows how to create function calls. These examples also work in any + * other place (`where` calls, updates, inserts etc.). The only difference is that you + * leave out the alias (the `as` call) if you use these in any other place than `select`. * * ```ts * import { sql } from 'kysely'