# QueryInterface interface · @imqueue/pg-sequelize

Source: https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.queryinterface/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-sequelize 4.2.0 — generated reference, not hand-written

Sequelize's query interface, extended with view creation and removal.

**Signature:**

```typescript
export interface QueryInterface extends QueryInterfaceOrigin 
```
**Extends:** QueryInterfaceOrigin

## Remarks

The type a migration works against, and the most imported symbol in this package. Everything sequelize's own interface offers is here unchanged; `createView` and `dropView` are the additions, since sequelize has no equivalent.

The instance handed out by `Sequelize.getQueryInterface()` is also wrapped in three ways that do not show up in this type: every write method treats an empty `returning` array as `false`, `query()` rewrites `RETURNING *` when given a column list, and the select-query generator substitutes a dynamic view's definition into the statement.

## Properties


| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [sequelize](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.queryinterface.sequelize/) |  | [Sequelize](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.sequelize/) | The connection this interface belongs to. |


## Methods


| Method | Description |
| --- | --- |
| [createView(viewName, viewDefinition)](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.queryinterface.createview/) | Creates a view from a complete SQL definition. |
| [dropView(viewName, options)](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.queryinterface.dropview/) | Drops a view, if it exists. |

