# Sequelize.getQueryInterface() method · @imqueue/pg-sequelize

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

The query interface for this connection, with view support and the widened `returning` option.

**Signature:**

```typescript
getQueryInterface(): QueryInterface;
```
**Returns:**

[QueryInterface](https://imqueue.org/api/pg-sequelize/latest/pg-sequelize.queryinterface/)

The wrapped query interface.

## Remarks

Sequelize's own interface is wrapped once, the first time this is called, and the same wrapped object is returned afterwards. The wrapper adds `createView` and `dropView`, makes every write method treat an empty `returning` array as `false`, and teaches the select-query generator to substitute a dynamic view's definition into the statement.

