tediousjs / node-mssql

Microsoft SQL Server client for Node.js
https://tediousjs.github.io/node-mssql
MIT License
2.23k stars 466 forks source link

Improve examples in README #1635

Closed jcubic closed 5 months ago

jcubic commented 5 months ago

What this does:

I propose to update the example so it's 100% obvous how to use the code. If someone copy paste the code it will not work. I know it seems trivial but it make a difference.

Related issues:

Pre/Post merge checklist:

dhensby commented 5 months ago

Thanks, whilst my view is that the examples in the docs are only meant to be illustrative and not copied and used, I suppose this doesn't hurt. I don't think that the IIFE is actually making the code any clearer in terms of how to use it - but it does mean it will execute if a developer does just blindly copy/paste...

Of course, someone copying the examples and trying to get them to work with no modification is still going to struggle unless their DB config happens to match the example's (eg: username & password).

github-actions[bot] commented 3 months ago

:tada: This PR is included in version 10.0.3 :tada:

The release is available on:

Your semantic-release bot :package::rocket: