mssql.MSSQLClient
Client is a client for MS SQL database. Internally client uses microsoft/go-mssqldb driver.
Example
• new MSSQLClient(): MSSQLClient
mssql.ts:16
▸ Connect(host
, port
, username
): boolean
Connect connects to MS SQL database using given credentials. If connection is successful, it returns true. If connection is unsuccessful, it returns false and error. The connection is closed after the function returns.
Name | Type |
---|---|
host | string |
port | number |
username | string |
boolean
Example
mssql.ts:29
▸ ConnectWithDB(host
, port
, username
): boolean
ConnectWithDB connects to MS SQL database using given credentials and database name. If connection is successful, it returns true. If connection is unsuccessful, it returns false and error. The connection is closed after the function returns.
Name | Type |
---|---|
host | string |
port | number |
username | string |
boolean
Example
mssql.ts:46
▸ IsMssql(host
, port
): boolean
IsMssql checks if the given host is running MS SQL database. If the host is running MS SQL database, it returns true. If the host is not running MS SQL database, it returns false.
Name | Type |
---|---|
host | string |
port | number |
boolean
Example
mssql.ts:61
mssql.MSSQLClient
Client is a client for MS SQL database. Internally client uses microsoft/go-mssqldb driver.
Example
• new MSSQLClient(): MSSQLClient
mssql.ts:16
▸ Connect(host
, port
, username
): boolean
Connect connects to MS SQL database using given credentials. If connection is successful, it returns true. If connection is unsuccessful, it returns false and error. The connection is closed after the function returns.
Name | Type |
---|---|
host | string |
port | number |
username | string |
boolean
Example
mssql.ts:29
▸ ConnectWithDB(host
, port
, username
): boolean
ConnectWithDB connects to MS SQL database using given credentials and database name. If connection is successful, it returns true. If connection is unsuccessful, it returns false and error. The connection is closed after the function returns.
Name | Type |
---|---|
host | string |
port | number |
username | string |
boolean
Example
mssql.ts:46
▸ IsMssql(host
, port
): boolean
IsMssql checks if the given host is running MS SQL database. If the host is running MS SQL database, it returns true. If the host is not running MS SQL database, it returns false.
Name | Type |
---|---|
host | string |
port | number |
boolean
Example
mssql.ts:61