# 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.                                |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://qb.ortusbooks.com/query-builder/options-and-utilities/interception-points.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
