File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change 11# gdbc-mssql
2- GDBC MySQL Driver
2+ GDBC Mssql Driver - It is based on [ github.com/denisenkom/go-mssqldb] ( https://github.com/denisenkom/go-mssqldb )
3+
4+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/go-gdbc/gdbc-mssql )] ( https://goreportcard.com/report/github.com/go-gdbc/gdbc-mssql )
5+ [ ![ codecov] ( https://codecov.io/gh/go-gdbc/gdbc-mssql/branch/main/graph/badge.svg?token=NKG1ZPDTAV )] ( https://codecov.io/gh/go-gdbc/gdbc-mssql )
6+ [ ![ Build Status] ( https://travis-ci.com/go-gdbc/gdbc-mssql.svg?branch=main )] ( https://travis-ci.com/go-gdbc/gdbc-mssql )
7+
8+ # Usage
9+ ``` go
10+ dataSource , err := gdbc.GetDataSource (" gdbc:sqlserver://username:password@localhost:3000?param1=value¶m2=value" )
11+ if err != nil {
12+ panic (err)
13+ }
14+
15+ var connection *sql.DB
16+ connection, err = dataSource.GetConnection ()
17+ if err != nil {
18+ panic (err)
19+ }
20+ ```
21+
22+ MsSQL GDBC URL takes one of the following forms:
23+
24+ ```
25+ gdbc:sqlserver://user@host/instanceName?arg1=value1
26+ gdbc:sqlserver://user:password@host/instanceName?arg1=value1
27+ gdbc:sqlserver://user@host:port?arg1=value1
28+ gdbc:sqlserver://user:password@host:port?arg1=value1
29+ ```
30+
31+ Checkout [ github.com/denisenkom/go-mssqldb] ( https://github.com/denisenkom/go-mssqldb ) for arguments details.
You can’t perform that action at this time.
0 commit comments