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
More info for `ssl` can be found in the [Node.js docs for tls connect options](https://nodejs.org/dist/latest-v10.x/docs/api/tls.html#tls_new_tls_tlssocket_socket_options)
71
+
72
+
## Query ```sql` ` -> Promise```
71
73
72
74
A query will always return a `Promise` which resolves to either an array `[...]` or `null` depending on the type of query. Destructuring is great to immidiately access the first element.
73
75
@@ -107,7 +109,7 @@ const users = await sql`
107
109
108
110
```
109
111
110
-
## Stream ```sql`...`.stream(fn) -> Promise```
112
+
## Stream ```sql``.stream(fn) -> Promise```
111
113
112
114
If you want to handle rows returned by a query one by one you can use `.stream` which returns a promise that resolves once there are no more rows.
Postgres.js has a safe, ergonomic way to aid you in writing queries. This makes it easier to write dynamic inserts, selects, updates and where queries.
0 commit comments