API Reference

tedious

Pure JavaScript implementation of the TDS protocol, used to connect Node.js to Microsoft SQL Server.

Official Documentation ↗
CompatibilityThis documentation covers version v18. Check the official docs for the latest API surface.

Installation

npmnpm install tedious

Methods

tedious speaks the SQL Server wire protocol directly, without native addons, and drives Request objects.

Key Features

  • No native dependencies
  • Parameterized queries and stored procedures
  • Row, column, and error events

Usage Notes

Pin a version and check the official docs for the API surface you depend on before upgrading.

FAQ

Why use tedious over mssql?
tedious is the lower-level driver. The mssql package wraps it with promises and pooling, which is friendlier for application code.
How do I stream large result sets?
Listen for the row event on the Request and handle rows incrementally instead of buffering the whole result set.
How are transactions handled?
Issue BEGIN TRANSACTION, COMMIT, and ROLLBACK as requests; tedious does not manage transactions for you.