kysely
    Preparing search index...

    Class WheneableMergeQueryBuilder<DB, TT, ST, O>

    Type Parameters

    • DB
    • TT extends keyof DB
    • ST extends keyof DB
    • O

    Implements

    Index

    Constructors

    Methods

    • Simply calls the provided function passing this as the only argument. $call returns what the provided function returns.

      If you want to conditionally call a method on this, see the $if method.

      The next example uses a helper function log to log a query:

      import type { Compilable } from 'kysely'

      function log<T extends Compilable>(qb: T): T {
      console.log(qb.compile())
      return qb
      }

      await db.updateTable('person')
      .set({ first_name: 'John' })
      .$call(log)
      .execute()

      Type Parameters

      • T

      Parameters

      • func: (qb: this) => T

      Returns T