Helper functions to query a SQL Server database's system catalog.
- Uses a
ConnectionPool
object from the node-mssql package, or from the @cityssm/mssql-multi-pool package. - TypeScript-friendly responses.
npm install @cityssm/mssql-system-catalog
import { getTables } from '@cityssm/mssql-system-catalog'
import mssql from 'mssql'
const pool = await mssql.connect({
/* mssql config settings */
})
const databaseTables = await getTables(pool)
const databaseViews = await getViews(pool)
@cityssm/mssql-multi-pool
A simple way to manage connections to multiple SQL Server databases using the Node.js Tedious package (node-mssql).