Skip to content

Commit

Permalink
Added close connections
Browse files Browse the repository at this point in the history
Close connections were missing so I have added it in quickstart.
  • Loading branch information
247software-sanket-gandhi authored Jun 3, 2024
1 parent 9ac9f77 commit 42d8b76
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ try {
} catch (err) {
console.log(err);
}

// Close the connection
await connection.end();
```

</TabItem>
Expand Down Expand Up @@ -138,6 +141,9 @@ connection.query(
console.log(results);
}
);

// Close the connection
connection.end();
```

</TabItem>
Expand Down Expand Up @@ -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()
}
```

Expand All @@ -204,6 +212,9 @@ connection.execute(
console.log(fields); // fields contains extra meta data about results, if available
}
);

// Close the connection
connection.end();
```

</TabItem>
Expand Down

0 comments on commit 42d8b76

Please sign in to comment.