A prepared statement that can be executed multiple times with different parameters.
const stmt = await client.prepare("SELECT * FROM users WHERE id = ?")// Execute with parametersconst result = await stmt.execute()const table = await result.collect()// Clean upawait stmt.close() Copy
const stmt = await client.prepare("SELECT * FROM users WHERE id = ?")// Execute with parametersconst result = await stmt.execute()const table = await result.collect()// Clean upawait stmt.close()
Check if the prepared statement is closed
Get the schema of the parameters
Get the schema of the result set
Close the prepared statement and release server resources
Execute the prepared statement as a query
A prepared statement that can be executed multiple times with different parameters.
Example