diff --git a/README.md b/README.md index 931b02e3..a8ad4205 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ go-sqlite3 ========== -[![Go Reference](https://pkg.go.dev/badge/github.com/mattn/go-sqlite3.svg)](https://pkg.go.dev/github.com/mattn/go-sqlite3) -[![GitHub Actions](https://github.com/mattn/go-sqlite3/workflows/Go/badge.svg)](https://github.com/mattn/go-sqlite3/actions?query=workflow%3AGo) +[![Go Reference](https://pkg.go.dev/badge/github.com/nutshelllabs/go-sqlite3.svg)](https://pkg.go.dev/github.com/nutshelllabs/go-sqlite3) +[![GitHub Actions](https://github.com/nutshelllabs/go-sqlite3/workflows/Go/badge.svg)](https://github.com/nutshelllabs/go-sqlite3/actions?query=workflow%3AGo) [![Financial Contributors on Open Collective](https://opencollective.com/mattn-go-sqlite3/all/badge.svg?label=financial+contributors)](https://opencollective.com/mattn-go-sqlite3) [![codecov](https://codecov.io/gh/mattn/go-sqlite3/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-sqlite3) -[![Go Report Card](https://goreportcard.com/badge/github.com/mattn/go-sqlite3)](https://goreportcard.com/report/github.com/mattn/go-sqlite3) +[![Go Report Card](https://goreportcard.com/badge/github.com/nutshelllabs/go-sqlite3)](https://goreportcard.com/report/github.com/nutshelllabs/go-sqlite3) Latest stable version is v1.14 or later, not v2. @@ -66,17 +66,17 @@ This package follows the official [Golang Release Policy](https://golang.org/doc This package can be installed with the `go get` command: - go get github.com/mattn/go-sqlite3 + go get github.com/nutshelllabs/go-sqlite3 _go-sqlite3_ is *cgo* package. If you want to build your app using go-sqlite3, you need gcc. -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. +However, after you have built and installed _go-sqlite3_ with `go install github.com/nutshelllabs/go-sqlite3` (which requires gcc), you can build your app without relying on gcc in future. ***Important: because this is a `CGO` enabled package, you are required to set the environment variable `CGO_ENABLED=1` and have a `gcc` compile present within your path.*** # API Reference -API documentation can be found [here](http://godoc.org/github.com/mattn/go-sqlite3). +API documentation can be found [here](http://godoc.org/github.com/nutshelllabs/go-sqlite3). Examples can be found under the [examples](./_example) directory. @@ -179,7 +179,7 @@ go build --tags "icu json1 fts5 secure_delete" | Secure Delete (FAST) | sqlite_secure_delete_fast | For more information see [PRAGMA secure_delete](https://www.sqlite.org/pragma.html#pragma_secure_delete) | | Tracing / Debug | sqlite_trace | Activate trace functions | | User Authentication | sqlite_userauth | SQLite User Authentication see [User Authentication](#user-authentication) for more information. | -| 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) | +| 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/nutshelllabs/go-sqlite3/tree/master/_example/vtable) | # Compilation @@ -196,7 +196,7 @@ Compile with: go build --tags "android" ``` -For more information see [#201](https://github.com/mattn/go-sqlite3/issues/201) +For more information see [#201](https://github.com/nutshelllabs/go-sqlite3/issues/201) # ARM @@ -209,8 +209,8 @@ env CC=arm-linux-gnueabihf-gcc CXX=arm-linux-gnueabihf-g++ \ ``` Additional information: -- [#242](https://github.com/mattn/go-sqlite3/issues/242) -- [#504](https://github.com/mattn/go-sqlite3/issues/504) +- [#242](https://github.com/nutshelllabs/go-sqlite3/issues/242) +- [#504](https://github.com/nutshelllabs/go-sqlite3/issues/504) # Cross Compile @@ -300,8 +300,8 @@ go build --tags "libsqlite3 darwin" ``` Additional information: -- [#206](https://github.com/mattn/go-sqlite3/issues/206) -- [#404](https://github.com/mattn/go-sqlite3/issues/404) +- [#206](https://github.com/nutshelllabs/go-sqlite3/issues/206) +- [#404](https://github.com/nutshelllabs/go-sqlite3/issues/404) ## Windows @@ -327,21 +327,21 @@ For example the TDM-GCC Toolchain can be found [here](https://jmeubank.github.io go build -ldflags '-extldflags=-fno-PIC' ``` - More details see [#120](https://github.com/mattn/go-sqlite3/issues/120) + More details see [#120](https://github.com/nutshelllabs/go-sqlite3/issues/120) - Can't build go-sqlite3 on windows 64bit. > Probably, you are using go 1.0, go1.0 has a problem when it comes to compiling/linking on windows 64bit. - > See: [#27](https://github.com/mattn/go-sqlite3/issues/27) + > See: [#27](https://github.com/nutshelllabs/go-sqlite3/issues/27) -- `go get github.com/mattn/go-sqlite3` throws compilation error. +- `go get github.com/nutshelllabs/go-sqlite3` throws compilation error. `gcc` throws: `internal compiler error` Remove the download repository from your disk and try re-install with: ```bash - go install github.com/mattn/go-sqlite3 + go install github.com/nutshelllabs/go-sqlite3 ``` # User Authentication @@ -479,11 +479,11 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/ - Getting insert error while query is opened. > You can pass some arguments into the connection string, for example, a URI. - > See: [#39](https://github.com/mattn/go-sqlite3/issues/39) + > See: [#39](https://github.com/nutshelllabs/go-sqlite3/issues/39) - Do you want to cross compile? mingw on Linux or Mac? - > See: [#106](https://github.com/mattn/go-sqlite3/issues/106) + > See: [#106](https://github.com/nutshelllabs/go-sqlite3/issues/106) > See also: http://www.limitlessfx.com/cross-compile-golang-app-for-windows-from-linux.html - Want to get time.Time with current locale @@ -492,7 +492,7 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/ - Can I use this in multiple routines concurrently? - Yes for readonly. But not for writable. See [#50](https://github.com/mattn/go-sqlite3/issues/50), [#51](https://github.com/mattn/go-sqlite3/issues/51), [#209](https://github.com/mattn/go-sqlite3/issues/209), [#274](https://github.com/mattn/go-sqlite3/issues/274). + Yes for readonly. But not for writable. See [#50](https://github.com/nutshelllabs/go-sqlite3/issues/50), [#51](https://github.com/nutshelllabs/go-sqlite3/issues/51), [#209](https://github.com/nutshelllabs/go-sqlite3/issues/209), [#274](https://github.com/nutshelllabs/go-sqlite3/issues/274). - Why I'm getting `no such table` error? @@ -507,8 +507,8 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/ Note that if the last database connection in the pool closes, the in-memory database is deleted. Make sure the [max idle connection limit](https://golang.org/pkg/database/sql/#DB.SetMaxIdleConns) is > 0, and the [connection lifetime](https://golang.org/pkg/database/sql/#DB.SetConnMaxLifetime) is infinite. For more information see: - * [#204](https://github.com/mattn/go-sqlite3/issues/204) - * [#511](https://github.com/mattn/go-sqlite3/issues/511) + * [#204](https://github.com/nutshelllabs/go-sqlite3/issues/204) + * [#511](https://github.com/nutshelllabs/go-sqlite3/issues/511) * https://www.sqlite.org/sharedcache.html#shared_cache_and_in_memory_databases * https://www.sqlite.org/inmemorydb.html#sharedmemdb @@ -516,7 +516,7 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/ OS X limits OS-wide to not have more than 1000 files open simultaneously by default. - For more information, see [#289](https://github.com/mattn/go-sqlite3/issues/289) + For more information, see [#289](https://github.com/nutshelllabs/go-sqlite3/issues/289) - Trying to execute a `.` (dot) command throws an error. @@ -525,7 +525,7 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/ You need to implement the feature or call the sqlite3 cli. - More information see [#305](https://github.com/mattn/go-sqlite3/issues/305). + More information see [#305](https://github.com/nutshelllabs/go-sqlite3/issues/305). - Error: `database is locked` @@ -544,14 +544,14 @@ For an example, see [dinedal/go-sqlite3-extension-functions](https://github.com/ db.SetMaxOpenConns(1) ``` - For more information, see [#209](https://github.com/mattn/go-sqlite3/issues/209). + For more information, see [#209](https://github.com/nutshelllabs/go-sqlite3/issues/209). ## Contributors ### Code Contributors This project exists thanks to all the people who [[contribute](CONTRIBUTING.md)]. - + ### Financial Contributors diff --git a/_example/custom_driver_name/Makefile b/_example/custom_driver_name/Makefile index 91fcde6a..95446b97 100644 --- a/_example/custom_driver_name/Makefile +++ b/_example/custom_driver_name/Makefile @@ -6,7 +6,7 @@ endif all : $(TARGET) $(TARGET) : main.go - go build -ldflags="-X 'github.com/mattn/go-sqlite3.driverName=my-sqlite3'" + go build -ldflags="-X 'github.com/nutshelllabs/go-sqlite3.driverName=my-sqlite3'" clean : rm -f $(TARGET) diff --git a/_example/custom_driver_name/main.go b/_example/custom_driver_name/main.go index 3148caed..c436ef8c 100644 --- a/_example/custom_driver_name/main.go +++ b/_example/custom_driver_name/main.go @@ -3,7 +3,7 @@ package main import ( "database/sql" - _ "github.com/mattn/go-sqlite3" + _ "github.com/nutshelllabs/go-sqlite3" ) func main() { diff --git a/_example/custom_func/main.go b/_example/custom_func/main.go index 85657e62..fc76dd80 100644 --- a/_example/custom_func/main.go +++ b/_example/custom_func/main.go @@ -7,7 +7,7 @@ import ( "math" "math/rand" - sqlite "github.com/mattn/go-sqlite3" + sqlite "github.com/nutshelllabs/go-sqlite3" ) // Computes x^y diff --git a/_example/fuzz/fuzz_openexec.go b/_example/fuzz/fuzz_openexec.go index 53260449..0009a51c 100644 --- a/_example/fuzz/fuzz_openexec.go +++ b/_example/fuzz/fuzz_openexec.go @@ -5,7 +5,7 @@ import ( "database/sql" "io/ioutil" - _ "github.com/mattn/go-sqlite3" + _ "github.com/nutshelllabs/go-sqlite3" ) func FuzzOpenExec(data []byte) int { diff --git a/_example/hook/hook.go b/_example/hook/hook.go index 60231815..0c9890cd 100644 --- a/_example/hook/hook.go +++ b/_example/hook/hook.go @@ -5,7 +5,7 @@ import ( "log" "os" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) func main() { diff --git a/_example/limit/limit.go b/_example/limit/limit.go index bcba8190..168c4525 100644 --- a/_example/limit/limit.go +++ b/_example/limit/limit.go @@ -7,7 +7,7 @@ import ( "os" "strings" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) func createBulkInsertQuery(n int, start int) (query string, args []interface{}) { diff --git a/_example/mod_regexp/extension.go b/_example/mod_regexp/extension.go index 61ceb55e..62e5d970 100644 --- a/_example/mod_regexp/extension.go +++ b/_example/mod_regexp/extension.go @@ -3,7 +3,7 @@ package main import ( "database/sql" "fmt" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" "log" ) diff --git a/_example/mod_vtable/extension.go b/_example/mod_vtable/extension.go index f738af6a..19460282 100644 --- a/_example/mod_vtable/extension.go +++ b/_example/mod_vtable/extension.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) func main() { diff --git a/_example/simple/simple.go b/_example/simple/simple.go index 0c347919..71ab740a 100644 --- a/_example/simple/simple.go +++ b/_example/simple/simple.go @@ -3,7 +3,7 @@ package main import ( "database/sql" "fmt" - _ "github.com/mattn/go-sqlite3" + _ "github.com/nutshelllabs/go-sqlite3" "log" "os" ) diff --git a/_example/trace/main.go b/_example/trace/main.go index bef3d159..b295ad99 100644 --- a/_example/trace/main.go +++ b/_example/trace/main.go @@ -6,7 +6,7 @@ import ( "log" "os" - sqlite3 "github.com/mattn/go-sqlite3" + sqlite3 "github.com/nutshelllabs/go-sqlite3" ) func traceCallback(info sqlite3.TraceInfo) int { diff --git a/_example/vtable/main.go b/_example/vtable/main.go index aad8dda7..4f65730c 100644 --- a/_example/vtable/main.go +++ b/_example/vtable/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) func main() { diff --git a/_example/vtable/vtable.go b/_example/vtable/vtable.go index dd457eac..99530863 100644 --- a/_example/vtable/vtable.go +++ b/_example/vtable/vtable.go @@ -6,7 +6,7 @@ import ( "io/ioutil" "net/http" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) type githubRepo struct { diff --git a/_example/vtable_eponymous_only/main.go b/_example/vtable_eponymous_only/main.go index 17b58afa..72f4db44 100644 --- a/_example/vtable_eponymous_only/main.go +++ b/_example/vtable_eponymous_only/main.go @@ -5,7 +5,7 @@ import ( "fmt" "log" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) func main() { diff --git a/_example/vtable_eponymous_only/vtable.go b/_example/vtable_eponymous_only/vtable.go index 49fc0b72..6b292e1c 100644 --- a/_example/vtable_eponymous_only/vtable.go +++ b/_example/vtable_eponymous_only/vtable.go @@ -3,7 +3,7 @@ package main import ( "fmt" - "github.com/mattn/go-sqlite3" + "github.com/nutshelllabs/go-sqlite3" ) type seriesModule struct{} diff --git a/doc.go b/doc.go index ac27633b..c73e7645 100644 --- a/doc.go +++ b/doc.go @@ -5,7 +5,7 @@ This works as a driver for database/sql. Installation - go get github.com/mattn/go-sqlite3 + go get github.com/nutshelllabs/go-sqlite3 Supported Types diff --git a/go.mod b/go.mod index 89788ab4..9843143d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/mattn/go-sqlite3 +module github.com/nutshelllabs/go-sqlite3 go 1.16 diff --git a/sqlite3-binding.c b/sqlite3-binding.c index dd05f575..84194e6e 100644 --- a/sqlite3-binding.c +++ b/sqlite3-binding.c @@ -164019,7 +164019,7 @@ typedef union { struct FrameBound yy595; } YYMINORTYPE; #ifndef YYSTACKDEPTH -#define YYSTACKDEPTH 100 +#define YYSTACKDEPTH 10000 #endif #define sqlite3ParserARG_SDECL #define sqlite3ParserARG_PDECL diff --git a/sqlite3.go b/sqlite3.go index 9c0f4d89..7aa1f9b4 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -235,7 +235,7 @@ const ( ) // This variable can be replaced with -ldflags like below: -// go build -ldflags="-X 'github.com/mattn/go-sqlite3.driverName=my-sqlite3'" +// go build -ldflags="-X 'github.com/nutshelllabs/go-sqlite3.driverName=my-sqlite3'" var driverName = "sqlite3" func init() { @@ -885,7 +885,7 @@ func (c *SQLiteConn) exec(ctx context.Context, query string, args []namedValue) s.Close() if tail == "" { if res == nil { - // https://github.com/mattn/go-sqlite3/issues/963 + // https://github.com/nutshelllabs/go-sqlite3/issues/963 res = &SQLiteResult{0, 0} } return res, nil diff --git a/sqlite3_test.go b/sqlite3_test.go index 326361ec..2b3460d3 100644 --- a/sqlite3_test.go +++ b/sqlite3_test.go @@ -1069,7 +1069,7 @@ func TestTimezoneConversion(t *testing.T) { } // TODO: Execer & Queryer currently disabled -// https://github.com/mattn/go-sqlite3/issues/82 +// https://github.com/nutshelllabs/go-sqlite3/issues/82 func TestExecer(t *testing.T) { tempFilename := TempFilename(t) defer os.Remove(tempFilename) diff --git a/upgrade/go.mod b/upgrade/go.mod index caf97ff8..a3f24a19 100644 --- a/upgrade/go.mod +++ b/upgrade/go.mod @@ -1,4 +1,4 @@ -module github.com/mattn/go-sqlite3/upgrade +module github.com/nutshelllabs/go-sqlite3/upgrade go 1.16