You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ const sql = postgres()
126
126
127
127
## Query ```sql` ` -> Promise```
128
128
129
-
A query will always return a `Promise` which resolves to a results array `[...]{ count, command }`. Destructuring is great to immediately access the first element.
129
+
A query will always return a `Promise` which resolves to a results array `[...]{ count, command, columns }`. Destructuring is great to immediately access the first element.
130
130
131
131
```js
132
132
@@ -278,6 +278,12 @@ await sql`
278
278
279
279
```
280
280
281
+
## Raw ```sql``.raw()```
282
+
283
+
Using `.raw()` will return rows as an array with `Buffer` values for each column, instead of objects.
284
+
285
+
This can be useful to receive identical named columns, or for specific performance / transformation reasons. The column definitions are still included on the result array with access to parsers for each column.
286
+
281
287
## Listen and notify
282
288
283
289
When you call listen, a dedicated connection will automatically be made to ensure that you receive notifications in real time. This connection will be used for any further calls to listen. Listen returns a promise which resolves once the `LISTEN` query to Postgres completes, or if there is already a listener active.
0 commit comments