# toQuery() function · @imqueue/pg-prisma

Source: https://imqueue.org/api/pg-prisma/latest/pg-prisma.toquery/
Published: 2026-08-28
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-prisma 2.0.0 — generated reference, not hand-written

A fragment as the pair `query` takes.

**Signature:**

```typescript
export declare function toQuery(fragment: SqlFragment): [string, unknown[]];
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| fragment | [SqlFragment](https://imqueue.org/api/pg-prisma/latest/pg-prisma.sqlfragment/) | The statement to run. |


**Returns:**

\[string, unknown\[\]\]

The statement and its values, to spread into `query`.

