Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
# GORM Sqlite Driver
# GORM SQLite Driver

![CI](https://github.com/go-gorm/sqlite/workflows/CI/badge.svg)
[![CI](https://github.com/go-gorm/sqlite/workflows/CI/badge.svg)](https://github.com/go-gorm/sqlite/actions)
Comment thread
h2zi marked this conversation as resolved.

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

## Quick Start

```go
import (
"gorm.io/driver/sqlite"
"gorm.io/gorm"
)

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

Checkout [https://gorm.io](https://gorm.io) for details.
> For full documentation, visit [https://gorm.io](https://gorm.io).

## Pure Go Alternatives

If you need a CGO-free SQLite driver, the following community projects are available:

### Pure go Sqlite Driver
| Driver | Repository |
|--------|------------|
| [github.com/glebarez/sqlite](https://pkg.go.dev/github.com/glebarez/sqlite) | [github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) |
| [github.com/libtnb/sqlite](https://pkg.go.dev/github.com/libtnb/sqlite) | [github.com/libtnb/sqlite](https://github.com/libtnb/sqlite) |
| [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) |

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

```go
import (
"github.com/glebarez/sqlite"
"github.com/glebarez/sqlite" // or "github.com/libtnb/sqlite"
"gorm.io/gorm"
)

Expand Down
Loading