mssql

package
v3.0.0-...-e70001a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2024 License: MIT, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Warning - This is generated code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MSSQLClient

type MSSQLClient struct{}

Client is a client for MS SQL database. Internally client uses microsoft/go-mssqldb driver. @example ```javascript const mssql = require('nuclei/mssql'); const client = new mssql.MSSQLClient; ```

func (*MSSQLClient) Connect

func (c *MSSQLClient) Connect(host string, port int, username, password string) (bool, error)

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. @example ```javascript const mssql = require('nuclei/mssql'); const client = new mssql.MSSQLClient; const connected = client.Connect('acme.com', 1433, 'username', 'password'); ```

func (*MSSQLClient) ConnectWithDB

func (c *MSSQLClient) ConnectWithDB(host string, port int, username, password, dbName string) (bool, error)

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. @example ```javascript const mssql = require('nuclei/mssql'); const client = new mssql.MSSQLClient; const connected = client.ConnectWithDB('acme.com', 1433, 'username', 'password', 'master'); ```

func (*MSSQLClient) IsMssql

func (c *MSSQLClient) IsMssql(host string, port int) (bool, error)

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. @example ```javascript const mssql = require('nuclei/mssql'); const isMssql = mssql.IsMssql('acme.com', 1433); ```

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL