From 07d64178076563cbead67505111a5d854f9b8ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Tue, 7 Apr 2026 00:13:10 +0800 Subject: [PATCH 1/3] chore: optimize README --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7b020a45..63047e94 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ -# 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) -## 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 ( @@ -10,19 +12,25 @@ import ( "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 | +|--------|------------| +| glebarez/sqlite | [github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) | +| libtnb/sqlite | [github.com/libtnb/sqlite](https://github.com/libtnb/sqlite) | -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" ) From 86a6161efc1cb2483ea495ec715258257ec4c5dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Thu, 16 Apr 2026 22:41:17 +0800 Subject: [PATCH 2/3] feat: add wasm driver --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 63047e94..e8a1e3de 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,9 @@ If you need a CGO-free SQLite driver, the following community projects are avail | Driver | Repository | |--------|------------| -| glebarez/sqlite | [github.com/glebarez/sqlite](https://github.com/glebarez/sqlite) | -| libtnb/sqlite | [github.com/libtnb/sqlite](https://github.com/libtnb/sqlite) | +| glebarez/sqlite | [github.com/glebarez/sqlite](https://pkg.go.dev/github.com/glebarez/sqlite) | +| libtnb/sqlite | [github.com/libtnb/sqlite](https://pkg.go.dev/github.com/libtnb/sqlite) | +| ncruces/go-sqlite3/gormlite | [github.com/ncruces/go-sqlite3/gormlite](https://pkg.go.dev/github.com/ncruces/go-sqlite3/gormlite) | Usage is identical — simply swap the import path: From 3641be17896021b130da69ab585867b99fef200b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Thu, 16 Apr 2026 22:42:56 +0800 Subject: [PATCH 3/3] chore: update urls --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e8a1e3de..66cae4fe 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,9 @@ If you need a CGO-free SQLite driver, the following community projects are avail | Driver | Repository | |--------|------------| -| glebarez/sqlite | [github.com/glebarez/sqlite](https://pkg.go.dev/github.com/glebarez/sqlite) | -| libtnb/sqlite | [github.com/libtnb/sqlite](https://pkg.go.dev/github.com/libtnb/sqlite) | -| ncruces/go-sqlite3/gormlite | [github.com/ncruces/go-sqlite3/gormlite](https://pkg.go.dev/github.com/ncruces/go-sqlite3/gormlite) | +| [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) | Usage is identical — simply swap the import path: