Complete the code to define a connection pool with a maximum of 10 connections.
const pool = new Pool({ max: [1] });The max property sets the maximum number of connections in the pool. Here, 10 is the correct value.
Complete the code to acquire a client from the connection pool.
const client = await pool.[1]();The connect() method is used to get a client from the pool.
Fix the error in releasing the client back to the pool.
client.[1]();The release() method returns the client to the pool for reuse.
Fill both blanks to create a query using a pooled client and release it after.
const client = await pool.[1](); const res = await client.query('SELECT * FROM users'); client.[2]();
You must connect() to get the client and release() it after the query.
Fill all three blanks to configure a pool with max 15 connections, idle timeout 30000 ms, and statement timeout 5000 ms.
const pool = new Pool({ max: [1], idleTimeoutMillis: [2], statement_timeout: [3] });The max sets max connections, idleTimeoutMillis sets idle timeout, and statement_timeout sets statement timeout in milliseconds.