A port module for the UT framework that provides SQL Server database integration via the mssql driver. It handles connection management, database/ schema creation, synchronization of database objects from file folders, and automatic linking of stored procedures as callable methods. Current stable version is 9.2.9, released under the MIT license. Peer dependency on ut-run ^10.78.17. Key differentiators: automated schema sync from file system, stored procedure linking, support for both tedious and msnodesqlv8 drivers, optional automatic database creation with elevated credentials.
npm install ut-port-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require ut-port-sql, extend the returned class, provide configuration, and initialize the port.
Ensure ut-run is at version 10.78.17 or higher.
Use full schema.procedureName as method name.
Use driver: 'tedious' (default) rather than 'msnodesqlv8' for Windows authentication.
Supply db.create.user and db.create.password in configuration for auto-creation.
Use Node.js 14.15.3+ or 16.14.0+.
Run 'npm install ut-port-sql' or ensure it is in package.json dependencies.
Use 'const sqlPort = require("ut-port-sql");' Ensure schema folder has linkSP: true and method name includes schema prefix.
Check db.connection.server, database, credentials, and network/firewall settings.