mssql

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

gdbc-mssql

GDBC Mssql Driver - It is based on github.com/denisenkom/go-mssqldb

Go Report Card codecov Build Status

Usage

dataSource, err := gdbc.GetDataSource("gdbc:sqlserver://username:password@localhost:3000?param1=value&param2=value")
if err != nil {
    panic(err)
}

var connection *sql.DB
connection, err = dataSource.GetConnection()
if err != nil {
    panic(err)
}

MsSQL GDBC URL takes one of the following forms:

gdbc:sqlserver://user@host/instanceName?arg1=value1
gdbc:sqlserver://user:password@host/instanceName?arg1=value1
gdbc:sqlserver://user@host:port?arg1=value1
gdbc:sqlserver://user:password@host:port?arg1=value1

Checkout github.com/denisenkom/go-mssqldb for arguments details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SqlServerSourceNameAdapter

type SqlServerSourceNameAdapter struct {
}

func (SqlServerSourceNameAdapter) GetDataSourceName

func (dsnAdapter SqlServerSourceNameAdapter) GetDataSourceName(dataSource gdbc.DataSource) (string, error)

Jump to

Keyboard shortcuts

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