Skip to content

Commit fec1e98

Browse files
authored
Update README.md
1 parent 5fba86a commit fec1e98

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,28 @@
11
# gdbc-sqlite
2-
GDBC Sqlite Driver
2+
GDBC Sqlite Driver - It is based on https://github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)
3+
4+
[![Go Report Card](https://goreportcard.com/badge/github.com/go-gdbc/gdbc-sqlite)](https://goreportcard.com/report/github.com/go-gdbc/gdbc-sqlite)
5+
[![codecov](https://codecov.io/gh/go-gdbc/gdbc-sqlite/branch/main/graph/badge.svg?token=1O1KF6HIHH)](https://codecov.io/gh/go-gdbc/gdbc-sqlite)
6+
[![Build Status](https://travis-ci.com/go-gdbc/gdbc-sqlite.svg?branch=main)](https://travis-ci.com/go-gdbc/gdbc-sqlite)
7+
8+
# Usage
9+
```go
10+
dataSource, err := gdbc.GetDataSource("gdbc:sqlite:test.db?cache=shared&mode=memory")
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+
Sqlite GDBC URL takes the following form:
23+
24+
```
25+
gdbc:sqlite:database-name?arg1=value1
26+
```
27+
28+
Checkout [https://github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) for arguments details.

0 commit comments

Comments
 (0)