Skip to content

go-gdbc/gdbc-mssql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.