Skip to content

Commit 976152a

Browse files
committed
all: rename package to github.com/charlievieth/go-sqlite3
This project is a hard'ish fork of github.com/mattn/go-sqlite3 that will not always be compatible with the original. Therefore I'm renaming it to avoid confusion. Regarding incompatibilities, the first is that mattn/go-sqlite3 allows for the SQL passed to Query to contain multiple statements, but will only execute the last one - this package will return an error if Query is passed multiple SQL statements. The second incompatibility is that this library will eventually remove the rarely used RegisterAggregator since it uses reflect.MethodByName which disables dead code removal. The goal is to keep the number of incompatibilities to minimum, unless justified by correctness or performance reasons. The overall goal of this package is to be more correct and performant than mattn/go-sqlite3 while not being constrained by backwards compatibility (apart from removing RegisterAggregator this package should only introduce breaking changes to code that is already incorrect).
1 parent 206322e commit 976152a

File tree

20 files changed

+36
-53
lines changed

20 files changed

+36
-53
lines changed

README.md

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
go-sqlite3
22
==========
33

4-
[![Go Reference](https://pkg.go.dev/badge/github.com/mattn/go-sqlite3.svg)](https://pkg.go.dev/github.com/mattn/go-sqlite3)
5-
[![GitHub Actions](https://github.com/mattn/go-sqlite3/workflows/Go/badge.svg)](https://github.com/mattn/go-sqlite3/actions?query=workflow%3AGo)
4+
[![Go Reference](https://pkg.go.dev/badge/github.com/charlievieth/go-sqlite3.svg)](https://pkg.go.dev/github.com/charlievieth/go-sqlite3)
5+
[![GitHub Actions](https://github.com/charlievieth/go-sqlite3/workflows/Go/badge.svg)](https://github.com/charlievieth/go-sqlite3/actions?query=workflow%3AGo)
66
[![Financial Contributors on Open Collective](https://opencollective.com/mattn-go-sqlite3/all/badge.svg?label=financial+contributors)](https://opencollective.com/mattn-go-sqlite3)
77
[![codecov](https://codecov.io/gh/mattn/go-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-sqlite3)
8-
[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-sqlite3)](https://goreportcard.com/report/github.com/mattn/go-sqlite3)
8+
[![Go Report Card](https://goreportcard.com/badge/github.com/charlievieth/go-sqlite3)](https://goreportcard.com/report/github.com/charlievieth/go-sqlite3)
99

1010
Latest stable version is v1.14 or later, not v2.
1111

@@ -66,17 +66,17 @@ This package follows the official [Golang Release Policy](https://golang.org/doc
6666

6767
This package can be installed with the `go get` command:
6868

69-
go get github.com/mattn/go-sqlite3
69+
go get github.com/charlievieth/go-sqlite3
7070

7171
_go-sqlite3_ is *cgo* package.
7272
If you want to build your app using go-sqlite3, you need gcc.
73-
However, after you have built and installed _go-sqlite3_ with `go install github.com/mattn/go-sqlite3` (which requires gcc), you can build your app without relying on gcc in future.
73+
However, after you have built and installed _go-sqlite3_ with `go install github.com/charlievieth/go-sqlite3` (which requires gcc), you can build your app without relying on gcc in future.
7474

7575
***Important: because this is a `CGO` enabled package, you are required to set the environment variable `CGO_ENABLED=1` and have a `gcc` compiler present within your path.***
7676

7777
# API Reference
7878

79-
API documentation can be found [here](http://godoc.org/github.com/mattn/go-sqlite3).
79+
API documentation can be found [here](http://godoc.org/github.com/charlievieth/go-sqlite3).
8080

8181
Examples can be found under the [examples](./_example) directory.
8282

@@ -180,7 +180,7 @@ go build -tags "icu json1 fts5 secure_delete"
180180
| Secure Delete (FAST) | sqlite_secure_delete_fast | For more information see [PRAGMA secure_delete](https://www.sqlite.org/pragma.html#pragma_secure_delete) |
181181
| Tracing / Debug | sqlite_trace | Activate trace functions |
182182
| User Authentication | sqlite_userauth | SQLite User Authentication see [User Authentication](#user-authentication) for more information. |
183-
| Virtual Tables | sqlite_vtable | SQLite Virtual Tables see [SQLite Official VTABLE Documentation](https://www.sqlite.org/vtab.html) for more information, and a [full example here](https://github.com/mattn/go-sqlite3/tree/master/_example/vtable) |
183+
| Virtual Tables | sqlite_vtable | SQLite Virtual Tables see [SQLite Official VTABLE Documentation](https://www.sqlite.org/vtab.html) for more information, and a [full example here](https://github.com/charlievieth/go-sqlite3/tree/master/_example/vtable) |
184184

185185
# Compilation
186186

@@ -344,14 +344,14 @@ For example the TDM-GCC Toolchain can be found [here](https://jmeubank.github.io
344344
> Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit.
345345
> See: [#27](https://github.com/mattn/go-sqlite3/issues/27)
346346
347-
- `go get github.com/mattn/go-sqlite3` throws compilation error.
347+
- `go get github.com/charlievieth/go-sqlite3` throws compilation error.
348348
349349
`gcc` throws: `internal compiler error`
350350
351351
Remove the download repository from your disk and try re-install with:
352352
353353
```bash
354-
go install github.com/mattn/go-sqlite3
354+
go install github.com/charlievieth/go-sqlite3
355355
```
356356
357357
# User Authentication
@@ -560,31 +560,14 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/
560560

561561
### Code Contributors
562562

563-
This project exists thanks to all the people who [[contribute](CONTRIBUTING.md)].
564-
<a href="https://github.com/mattn/go-sqlite3/graphs/contributors"><img src="https://opencollective.com/mattn-go-sqlite3/contributors.svg?width=890&button=false" /></a>
563+
This project is a fork of mattn/go-sqlite3 and is only possible thanks to the
564+
work of @mattn and other contributors. A full list of the original contributors
565+
can be found [here](https://github.com/mattn/go-sqlite3/?tab=readme-ov-file#contributors).
565566

566567
### Financial Contributors
567568

568-
Become a financial contributor and help us sustain our community. [[Contribute here](https://opencollective.com/mattn-go-sqlite3/contribute)].
569-
570-
#### Individuals
571-
572-
<a href="https://opencollective.com/mattn-go-sqlite3"><img src="https://opencollective.com/mattn-go-sqlite3/individuals.svg?width=890"></a>
573-
574-
#### Organizations
575-
576-
Support this project with your organization. Your logo will show up here with a link to your website. [[Contribute](https://opencollective.com/mattn-go-sqlite3/contribute)]
577-
578-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/0/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/0/avatar.svg"></a>
579-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/1/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/1/avatar.svg"></a>
580-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/2/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/2/avatar.svg"></a>
581-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/3/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/3/avatar.svg"></a>
582-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/4/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/4/avatar.svg"></a>
583-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/5/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/5/avatar.svg"></a>
584-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/6/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/6/avatar.svg"></a>
585-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/7/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/7/avatar.svg"></a>
586-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/8/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/8/avatar.svg"></a>
587-
<a href="https://opencollective.com/mattn-go-sqlite3/organization/9/website"><img src="https://opencollective.com/mattn-go-sqlite3/organization/9/avatar.svg"></a>
569+
This project is a fork of mattn/go-sqlite3. A list of it's financial contributors
570+
can be found [here](https://github.com/mattn/go-sqlite3/?tab=readme-ov-file#financial-contributors).
588571
589572
# License
590573
@@ -601,3 +584,5 @@ In this repository, those files are an amalgamation of code that was copied from
601584
Yasuhiro Matsumoto (a.k.a mattn)
602585
603586
G.J.R. Timmer
587+
588+
Charlie Vieth (fork maintainer)

_example/custom_driver_name/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ endif
66
all : $(TARGET)
77

88
$(TARGET) : main.go
9-
go build -ldflags="-X 'github.com/mattn/go-sqlite3.driverName=my-sqlite3'"
9+
go build -ldflags="-X 'github.com/charlievieth/go-sqlite3.driverName=my-sqlite3'"
1010

1111
clean :
1212
rm -f $(TARGET)

_example/custom_driver_name/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"database/sql"
55

6-
_ "github.com/mattn/go-sqlite3"
6+
_ "github.com/charlievieth/go-sqlite3"
77
)
88

99
func main() {

_example/custom_func/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"math"
88
"math/rand"
99

10-
sqlite "github.com/mattn/go-sqlite3"
10+
sqlite "github.com/charlievieth/go-sqlite3"
1111
)
1212

1313
// Computes x^y

_example/fuzz/fuzz_openexec.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"database/sql"
66
"io/ioutil"
77

8-
_ "github.com/mattn/go-sqlite3"
8+
_ "github.com/charlievieth/go-sqlite3"
99
)
1010

1111
func FuzzOpenExec(data []byte) int {

_example/hook/hook.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"log"
66
"os"
77

8-
"github.com/mattn/go-sqlite3"
8+
"github.com/charlievieth/go-sqlite3"
99
)
1010

1111
func main() {

_example/json/json.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"database/sql/driver"
66
"encoding/json"
77
"fmt"
8-
_ "github.com/mattn/go-sqlite3"
8+
_ "github.com/charlievieth/go-sqlite3"
99
"log"
1010
"os"
1111
)

_example/limit/limit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"os"
88
"strings"
99

10-
"github.com/mattn/go-sqlite3"
10+
"github.com/charlievieth/go-sqlite3"
1111
)
1212

1313
func createBulkInsertQuery(n int, start int) (query string, args []any) {

_example/mod_regexp/extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"database/sql"
55
"fmt"
6-
"github.com/mattn/go-sqlite3"
6+
"github.com/charlievieth/go-sqlite3"
77
"log"
88
)
99

_example/mod_vtable/extension.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"log"
77

8-
"github.com/mattn/go-sqlite3"
8+
"github.com/charlievieth/go-sqlite3"
99
)
1010

1111
func main() {

_example/simple/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COPY . /workspace/
2828
RUN \
2929
cd _example/simple && \
3030
go mod init github.com/mattn/sample && \
31-
go mod edit -replace=github.com/mattn/go-sqlite3=../.. && \
31+
go mod edit -replace=github.com/charlievieth/go-sqlite3=../.. && \
3232
go mod tidy && \
3333
go install -ldflags='-s -w -extldflags "-static"' ./simple.go
3434

_example/simple/simple.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"database/sql"
55
"fmt"
6-
_ "github.com/mattn/go-sqlite3"
6+
_ "github.com/charlievieth/go-sqlite3"
77
"log"
88
"os"
99
)

_example/trace/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"log"
77
"os"
88

9-
sqlite3 "github.com/mattn/go-sqlite3"
9+
sqlite3 "github.com/charlievieth/go-sqlite3"
1010
)
1111

1212
func traceCallback(info sqlite3.TraceInfo) int {

_example/vtable/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"log"
77

8-
"github.com/mattn/go-sqlite3"
8+
"github.com/charlievieth/go-sqlite3"
99
)
1010

1111
func main() {

_example/vtable/vtable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"io/ioutil"
77
"net/http"
88

9-
"github.com/mattn/go-sqlite3"
9+
"github.com/charlievieth/go-sqlite3"
1010
)
1111

1212
type githubRepo struct {

_example/vtable_eponymous_only/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"fmt"
66
"log"
77

8-
"github.com/mattn/go-sqlite3"
8+
"github.com/charlievieth/go-sqlite3"
99
)
1010

1111
func main() {

_example/vtable_eponymous_only/vtable.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"fmt"
55

6-
"github.com/mattn/go-sqlite3"
6+
"github.com/charlievieth/go-sqlite3"
77
)
88

99
type seriesModule struct{}

doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This works as a driver for database/sql.
55
66
Installation
77
8-
go get github.com/mattn/go-sqlite3
8+
go get github.com/charlievieth/go-sqlite3
99
1010
# Supported Types
1111

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
module github.com/mattn/go-sqlite3
1+
module github.com/charlievieth/go-sqlite3
22

33
go 1.19
44

5-
retract (
6-
[v2.0.0+incompatible, v2.0.6+incompatible] // Accidental; no major changes or features.
7-
)
5+
retract [v2.0.0+incompatible, v2.0.6+incompatible] // Accidental; no major changes or features.

sqlite3.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ var SQLiteTimestampFormats = []string{
363363
}
364364

365365
// This variable can be replaced with -ldflags like below:
366-
// go build -ldflags="-X 'github.com/mattn/go-sqlite3.driverName=my-sqlite3'"
366+
// go build -ldflags="-X 'github.com/charlievieth/go-sqlite3.driverName=my-sqlite3'"
367367
var driverName = "sqlite3"
368368

369369
func init() {

0 commit comments

Comments
 (0)