From 42d8b76323101f4f94214a1d0ec3a7ffaf650c41 Mon Sep 17 00:00:00 2001 From: Sanket Gandhi <35518677+sanketgandhi876@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:52:17 +0530 Subject: [PATCH] Added close connections Close connections were missing so I have added it in quickstart. --- website/docs/index.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/website/docs/index.mdx b/website/docs/index.mdx index 90cda8cd0b..22cfc204a8 100644 --- a/website/docs/index.mdx +++ b/website/docs/index.mdx @@ -105,6 +105,9 @@ try { } catch (err) { console.log(err); } + +// Close the connection +await connection.end(); ``` @@ -138,6 +141,9 @@ connection.query( console.log(results); } ); + +// Close the connection +connection.end(); ``` @@ -179,6 +185,8 @@ try { console.log(fields); // fields contains extra meta data about results, if available } catch (err) { console.log(err); +} finally { + connection.end() } ``` @@ -204,6 +212,9 @@ connection.execute( console.log(fields); // fields contains extra meta data about results, if available } ); + +// Close the connection +connection.end(); ```