Tedious implements the TDS protocol in JavaScript so Node applications connect to SQL Server, run queries, and stream results without native database drivers.
Overview
Tedious is a Node package that speaks Microsoft's Tabular Data Stream (TDS) protocol to SQL Server and compatible services. It is intentionally slim: you open a connection with host and credentials, create requests, and handle row or error events from pure JavaScript without a separate native database driver layer.
Documented TDS versions cover SQL Server from 2005 through current releases, including strict encryption modes for newer servers. Encryption and certificate validation default to on; development setups may relax trust for self-signed certificates, with stricter rules when encrypt is set to strict for TDS 8.0.
Installation targets Node.js 22 or later. Platform guides and examples show environment-based configuration, parameter usage, bulk load APIs, and datatype handling. Azure SQL Database is supported from documented minimum package versions onward.
API reference, connection and request classes, bulk load support, and worked examples live on the project documentation site. Security reports follow a published private disclosure process.
Key features
- Pure JavaScript TDS protocol implementation
- SQL Server 2005 through 2022 TDS levels
- Default TLS encryption and cert validation
- Connection, request, and bulk load APIs
- Parameterized queries and datatype mapping
- Azure SQL Database compatibility
- Node.js 22 plus runtime requirement
- Documented examples and API reference
Use cases
- Node backends querying SQL Server
- Serverless or container apps without external database drivers
- Azure SQL from JavaScript services
- Streaming query results in Node