Skip to content

Commit 3fcecea

Browse files
authored
Update README.md
1 parent 480e473 commit 3fcecea

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,31 @@
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&param2=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.

0 commit comments

Comments
 (0)