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
idle_timeout :0, // Idle connection timeout in seconds
56
56
connect_timeout :30, // Connect timeout in seconds
57
+
no_prepare :false, // No automatic creation of prepared statements
57
58
types : [], // Array of custom types, see more below
58
59
onnotice : fn // Defaults to console.log
59
60
onparameter : fn // (key, value) when server param change
@@ -532,6 +533,10 @@ Any query which was already sent over the wire will be rejected if the connectio
532
533
533
534
There are no guarantees about queries executing in order unless using a transaction with `sql.begin()` or setting `max: 1`. Of course doing a series of queries, one awaiting the other will work as expected, but that's just due to the nature of js async/promise handling, so it's not necessary for this library to be concerned with ordering.
534
535
536
+
## Prepared statements
537
+
538
+
Prepared statements will automatically be created for any queries where it can be inferred that the query is static. This can be disabled by using the `no_prepare` option. For instance — this is useful when [using PGBouncer in `transaction mode`](https://github.com/porsager/postgres/issues/93).
539
+
535
540
<details><summary><code>sql.unsafe</code> - Advanced unsafe use cases</summary>
0 commit comments