mattn/go-sqlite3
View on GitHub ↗ ★ 9,266 C
sqlite3 driver for go using database/sql
43 mentions on Hacker News by 39 people: 1 story, 42 comments · first 2012-09-10 · latest 2026-01-23
20082026
-
…and the reliance of CGO which is what puts me off using Turso Edit: Looking at the go mod file I noticed github.com/mattn/go-sqlite3 which I think is a C wrapper library so I'm assuming you rely on CGO for compiling
comment by aranw · 2026-01-23 · in Turso is an in-process SQL database, compatible with SQLite -
Just this month, I've learned the hard way that some file systems do not play well with mmap: https://github.com/mattn/go-sqlite3/issues/1355 In my case, it seems that Mac's ExFAT driver is incompatible with sqlite's WAL mode because the…
comment by mholt · 2025-10-23 · in How memory maps (mmap) deliver faster file access in Go -
…v0.7.0 github.com/charmbracelet/lipgloss v1.1.0 github.com/charmbracelet/log v0.4.2 github.com/mattn/go-sqlite3 v1.14.22 github.com/spf13/cobra v1.10.1 )
comment by cloverich · 2025-10-06 · in Show HN: Write It Down – Personal finance tracker -
I don't if it's the reason but the performance of modernc.org/sqlite is worse than github.com/mattn/go-sqlite3
comment by starquake · 2025-08-12 · in Syncthing 2.0 Released -
…considering that seems to be the direction things are moving in. I don't understand why they chose to use github.com/mattn/go-sqlite3 instead of modernc.org/sqlite
comment by acheong08 · 2025-08-12 · in Syncthing 2.0 Released -
…...) note that compiling PocketBase with `CGO_ENABLED=1` is no longer enough to kick in the github.com/mattn/go-sqlite3 driver and you need to enable it manually as shown in the db_cgo.go in our benchmarks OR like in…
comment by trailbase · 2025-02-05 · in TrailBase: Sub-millisecond open-source application base with Rust, SQLite and V8 -
…) note that compiling PocketBase with `CGO_ENABLED=1` is no longer enough to kick in the github.com/mattn/go-sqlite3 driver and you need to enable it manually as shown in the db_cgo.go in our benchmarks OR like in https://pocketbase.io/doc
comment by randomwebdev · 2025-02-05 · in TrailBase: Sub-millisecond open-source application base with Rust, SQLite and V8 -
I have not tried that. Will PGO work with CGO external libraries? I'm using https://github.com/mattn/go-sqlite3
comment by jtarchie · 2024-07-08 · in Optimizing Large-Scale OpenStreetMap Data with SQLite -
for what it's worth, the two pool approach is suggested here by a collaborator to github.com/mattn/go-sqlite3: https://github.com/mattn/go-sqlite3/issues/1179#issuecomment...
comment by acrispino · 2024-04-15 · in Redis re-implemented with SQLite -
…Make sure to use a unique filename as the `file:` value, especially if using this in tests. [1]: https://github.com/mattn/go-sqlite3#faq
comment by imiric · 2024-04-06 · in Replacing Complicated Hashmaps with SQLite -
…(and I appreciate him for that stance, and for taking on the maintenance burden it brings). e.g., https://github.com/mattn/go-sqlite3/pull/1042#issuecomment-1...
comment by LVB · 2024-03-29 · in Backdoor in upstream xz/liblzma leading to SSH server compromise -
Go has both. The CGO-bindings are preferable, generally. It’s very mature, fast and works great. https://github.com/mattn/go-sqlite3
comment by klabb3 · 2024-03-23 · in Pack: A new container format for compressed files -
…interface to incremental blob IO have been left unaddressed. https://www.sqlite.org/bindptr.html https://github.com/mattn/go-sqlite3/issues/239
comment by ncruces · 2023-12-14 · in I benchmarked six Go SQLite drivers -
…strict tables is that since sqlite does not (yet?) have a dedicated type for timestamps, a driver like github.com/mattn/go-sqlite3 use the typename in the schema to determine when a column can be converted to a native time datatype. But…
comment by skissane · 2023-11-16 · in The Design of SQLite4 (2014) -
…strict tables is that since sqlite does not (yet?) have a dedicated type for timestamps, a driver like github.com/mattn/go-sqlite3 use the typename in the schema to determine when a column can be converted to a native time datatype. But…
comment by acrispino · 2023-11-16 · in The Design of SQLite4 (2014) -
…now. Btw, bundling a C compiler is also much harder when you don't build on top of LLVM. [1] https://github.com/mattn/go-sqlite3/issues/1164
comment by oefrha · 2023-10-05 · in Show HN: Sqinn-Go is a Golang library for accessing SQLite databases in pure Go -
https://github.com/mattn/go-sqlite3/blob/master/_example/sim... notice that the SQLite package isn't used directly, its only imported to handle the database behind the scenes. all the actual code is written using only the standard library
comment by 2h · 2023-05-18 · in Zig now has built-in HTTP server and client in std -
…The widely used Go SQLite library by mattn says it supports it, if that's useful: https://github.com/mattn/go-sqlite3#user-authentication
comment by justinclift · 2023-04-29 · in Exciting SQLite Improvements Since 2020 -
…the current system makes "typo-squatting attacks" harder to do. Consider the popular golang package github.com/mattn/go-sqlite3. The only way to "typosquat" the package is to typosquat somewhere up the dependency tree; e.g., by creating…
comment by gwd · 2023-01-30 · in Ask HN: Why does every package+module system become a Rube Goldberg machine? -
…rewrite my framework for limited data types and the doubts regarding concurrency keeps me away. [1] https://github.com/mattn/go-sqlite3
comment by Abishek_Muthian · 2022-09-08 · in How the SQLite virtual machine works -
The default go sqlite driver is https://github.com/mattn/go-sqlite3 , which is quite lovely, but I ran into issues with concurrency on read only databases. I'm now using https://github.com/crawshaw/sqlite and it seems to address those…
comment by pstuart · 2022-05-13 · in SQLite in Go, with and Without Cgo -
…have some experience with Go. Join discord.multiprocess.io, go to the #dev channel and say hi! [0] https://github.com/mattn/go-sqlite3/pull/1019 [1] https://github.com/mapbox/node-sqlite3/pull/1550 [2]…
comment by eatonphil · 2022-03-22 · in Ask HN: Do you contribute to open source projects? -
Sorry, forgot to comment: SQLite is currently 3.38.0, see https://github.com/mattn/go-sqlite3/blob/master/sqlite3-bind... I don't package it directly, but via the go bindings by mattn (go-sqlite3).
comment by mano78 · 2022-03-12 · in Ws4sqlite: Query SQLite via HTTP -
…to support it and tested the new JSON syntax support in DataStation. This is fantastic! https://github.com/mattn/go-sqlite3/pull/1019
comment by eatonphil · 2022-02-23 · in SQLite 3.38 Released -
I just tried it now (a year later), same compiler error (using msys2): # github.com/mattn/go-sqlite3 /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lmingwex /usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../…
comment by marcus_cemes · 2022-02-04 · in Go performance from version 1.2 to 1.18 -
Using https://github.com/mattn/go-sqlite3 for a pet project right now. So far not a single issue with it, I never had to think about any CGO specifics.
comment by usrbinbash · 2021-12-29 · in Consider SQLite -
I admit I only used sqlite through the go driver ( https://github.com/mattn/go-sqlite3 ) where using fts5 amounts to one flag during the compile phase.
comment by rakoo · 2021-03-25 · in Building a full-text search engine in 150 lines of Python code -
With sqlite3 package and Go this doesn’t look possible, or at least not easy. https://github.com/mattn/go-sqlite3/issues/212#issuecomment-...
comment by dev_dull · 2019-10-31 · in Microsoft Access: The Database Software That Won't Die -
…CGO_ENABLED=0? If that’s the case then I’m really interested. Last I checked it’s not supported[1] https://github.com/mattn/go-sqlite3/issues/384#issuecomment-...
comment by dev_dull · 2019-06-25 · in Miniflux: A minimalist and opinionated feed reader -
…the issues there, but jumping through hoops per platform (e.g. can't use a popular lib like https://github.com/mattn/go-sqlite3 on Windows without a MinGW gcc installation) is worth noting when touting the cross platform ease of use. Langs…
comment by kodablah · 2018-05-26 · in Go Is a Shop-built Jig (2014) -
…popular, mainstream packages) where the package name is not the repo name. The one that comes to mind is github.com/mattn/go-sqlite3 which provides the `sqlite3` package.
comment by weberc2 · 2017-08-05 · in Porting 4.5K lines of C to Go -
For those who don't want to wait for this to be completed, there is already https://github.com/mattn/go-sqlite3
comment by Safety1stClyde · 2017-04-21 · in Go: package sqlite -
…but wanted to try this out. I installed go 1.8, and then issued the prescribed command line. It tells me `# github.com/mattn/go-sqlite3 exec: "gcc": executable file not found in %PATH%`. This looks like a rabbit hole of unknown depth that…
comment by recursive · 2017-03-03 · in Usql – A universal command-line interface for SQL databases -
…there. Only problem is that some things do not work properly yet (because still beta). For example `go get github.com/mattn/go-sqlite3` will not work because of some ?gcc? compilation issue. But it's getting fixed on next release.
comment by romanovcode · 2017-02-24 · in Video Pros Moving from Mac to Windows for High-End GPUs -
For the record: https://github.com/mattn/go-sqlite3
comment by jbarham · 2016-12-18 · in Single-file C/C++ public-domain/open source libraries with minimal dependencies -
…or 1.7 within a year. Regarding go on Windows, I'm hoping to see go-sqlite3 issue #272 resolved: https://github.com/mattn/go-sqlite3/issues/272 And go issue #14397 cmd/link, runtime: panic "invalid spdelta" with -ldflags="-linkmode…
comment by montyedwards · 2016-04-03 · in Go 1.7 toolchain improvements -
…hit your meaning of "recent versions". It was certainly recent and easy enough for my needs :) [1] https://github.com/mattn/go-sqlite3 [2] http://win-builds.org/
comment by xrstf · 2016-04-02 · in Go 1.7 toolchain improvements -
…For an example of what this looks like in actual use, see the very popular go-sqlite3 library: https://github.com/mattn/go-sqlite3/blob/dee1a37fe11067e9797... I personally think that large block-comments of code that actually do something,…
comment by TheDong · 2015-05-11 · in Go Lang: Comments Are Not Directives -
Note that using a sqlite wrapper like https://github.com/mattn/go-sqlite3 , you also don't have any external dependencies and your application still ships as a single binary. However, there are other advantages of a Go-native storage…
comment by neilc · 2014-12-11 · in Bolt: A low-level key/value database for Go -
…I use make for this: GOPATH := ${GOPATH}:${PWD} all: always always: @go build -v myprogram deps: go get github.com/mattn/go-sqlite3 go get code.google.com/p/gorilla/context go get code.google.com/p/gorilla/mux fmt: go fmt package1 package2…
comment by papaf · 2013-03-26 · in Introduction to Go 1.1 -
…I need to fix the command line to download all dependencies first. You can fix it manually with: go get github.com/mattn/go-sqlite3 Also, I believe that the go command line figures out the dependencies for you, so this should get…
comment by robfig · 2012-09-10 · in Revel, high-productivity Go web framework modeled on Play Framework -
…/usr/local/Cellar/go/1.0.2/src/pkg/github.com/robfig/revel/samples/booking/app/controllers/db.go:6): import "github.com/mattn/go-sqlite3": cannot find package
comment by st3fan · 2012-09-10 · in Revel, high-productivity Go web framework modeled on Play Framework