LogoLogo
11.1.0
11.1.0
  • Introduction
  • What's New?
  • Installation & Usage
  • Migration Guide
  • Contributing & Filing Issues
  • Query Builder
    • Getting a New Query
    • Building Queries
      • Selects
      • From
      • Joins
      • Wheres
      • Order By
      • Group By and Having
      • Limit, Offset, and Pagination
      • Locks
      • Unions
      • Common Table Expressions (i.e. CTEs)
      • Raw Expressions
      • When / Conditionals
      • Query Parameters and Bindings
    • Executing Queries
      • Retrieving Results
      • Aggregates
      • Inserts, Updates, and Deletes
    • Options and Utilities
      • Query Options and Utilities
      • Clone and Reset
      • Return Format
      • Column Formatter
      • Interception Points
    • Debugging
      • sqlCommenter
  • Schema Builder
    • Overview
    • Create
    • Columns
    • Column Modifiers
    • Column Constraints
    • Creating Table Constraints
    • Alter
    • Drop
    • Debugging
  • External Links
    • API Docs
    • Source Code
    • Issue Tracker
Powered by GitBook
On this page
  • preQBExecute
  • postQBExecute

Was this helpful?

Edit on GitHub
Export as PDF
  1. Query Builder
  2. Options and Utilities

Interception Points

Two interception points are available from QB: preQBExecute and postQBExecute. These fire before and after the queryExecute call, respectively.

preQBExecute

The following information is available in the interceptData struct:

Name

Type

Description

sql

String

The SQL string to execute.

bindings

Struct

The struct of bindings (keys and values) for the query.

options

Struct

Any options to pass along to queryExecute.

returnObject

String

The type to return: query or result.

postQBExecute

The following information is available in the interceptData struct:

Name

Type

Description

sql

String

The SQL string to execute.

bindings

Struct

The struct of bindings (keys and values) for the query.

options

Struct

Any options to pass along to queryExecute.

returnObject

String

The type to return: query or result.

query

Query | null

The query object or null if there isn't one.

result

Struct

The query result struct.

PreviousColumn FormatterNextDebugging

Was this helpful?