Skip to content

Commit 3ce1c83

Browse files
authored
chore: optimize README for clarity and conciseness (#228)
* chore: optimize README * feat: add wasm driver * chore: update urls
1 parent 75dbf08 commit 3ce1c83

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,37 @@
1-
# GORM Sqlite Driver
1+
# GORM SQLite Driver
22

3-
![CI](https://github.com/go-gorm/sqlite/workflows/CI/badge.svg)
3+
[![CI](https://github.com/go-gorm/sqlite/workflows/CI/badge.svg)](https://github.com/go-gorm/sqlite/actions)
44

5-
## USAGE
5+
The official SQLite driver for [GORM](https://gorm.io), based on [go-sqlite3](https://github.com/mattn/go-sqlite3) (requires CGO).
6+
7+
## Quick Start
68

79
```go
810
import (
911
"gorm.io/driver/sqlite"
1012
"gorm.io/gorm"
1113
)
1214

13-
// github.com/mattn/go-sqlite3
1415
db, err := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{})
1516
```
1617

17-
Checkout [https://gorm.io](https://gorm.io) for details.
18+
> For full documentation, visit [https://gorm.io](https://gorm.io).
19+
20+
## Pure Go Alternatives
21+
22+
If you need a CGO-free SQLite driver, the following community projects are available:
1823

19-
### Pure go Sqlite Driver
24+
| Driver | Repository |
25+
|--------|------------|
26+
| [github.com/glebarez/sqlite](https://pkg.go.dev/github.com/glebarez/sqlite) | [github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) |
27+
| [github.com/libtnb/sqlite](https://pkg.go.dev/github.com/libtnb/sqlite) | [github.com/libtnb/sqlite](https://github.com/libtnb/sqlite) |
28+
| [github.com/ncruces/go-sqlite3/gormlite](https://pkg.go.dev/github.com/ncruces/go-sqlite3/gormlite) | [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) |
2029

21-
checkout [https://github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) for details
30+
Usage is identical — simply swap the import path:
2231

2332
```go
2433
import (
25-
"github.com/glebarez/sqlite"
34+
"github.com/glebarez/sqlite" // or "github.com/libtnb/sqlite"
2635
"gorm.io/gorm"
2736
)
2837

0 commit comments

Comments
 (0)