Popularity
1.4
Growing
Activity
3.8
-
15
1
0
Programming language: Go
License: MIT License
Tags:
Database
Latest version: v1.4.3
gosql alternatives and similar packages
Based on the "Database" category.
Alternatively, view gosql alternatives based on common mentions on social networks and blogs.
-
vitess
vitess provides servers and tools which facilitate scaling of MySQL databases for large scale web services. -
groupcache
Groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases. -
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly, and command-line tools. Based on LLVM. -
go-cache
An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications. -
VictoriaMetrics
fast, resource-effective and scalable open source time series database. May be used as long-term remote storage for Prometheus. Supports PromQL. -
buntdb
A fast, embeddable, in-memory key/value database for Go with custom indexing and spatial support. -
xo
Generate idiomatic Go code for databases based on existing schema definitions or custom queries supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server. -
sql-migrate
Database migration tool. Allows embedding migrations into the application using go-bindata. -
immudb
immudb is a lightweight, high-speed immutable database for systems and applications written in Go. -
nutsdb
Nutsdb is a simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set. -
skeema
Pure-SQL schema management system for MySQL, with support for sharding and external online schema change tools. -
Bitcask
Bitcask is an embeddable, persistent and fast key-value (KV) database written in pure Go with predictable read/write performance, low latency and high throughput thanks to the bitcask on-disk layout (LSM+WAL).
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of gosql or a related project?
Popular Comparisons
README
GoSQL 
Query builder with some handy utility functions.
Documentation
For full documentation see the pkg.go.dev or GitBook.
Examples
// Open database and create connection
sqliteDB, _ := sql.Open("sqlite3", "my-db.sql")
db := gosql.New(sqliteDB)
// Define a struct that includes a primary key
type User struct {
ID int `gosql:"primary"`
Email string
IsActive bool
}
// Register all structs corresponding to a table in the database
db.Register(User{})
// Select a row from the table
var user User
db.Select("*").Get(&user)
// Update the row in the table
user.Email = "[email protected]"
db.Update(&user)
Benchmarks
BenchmarkInsert-4 836143 ns/op 400 B/op 17 allocs/op
BenchmarkUpdate-4 22923 ns/op 488 B/op 18 allocs/op
BenchmarkSelect-4 24934 ns/op 648 B/op 26 allocs/op
BenchmarkSelectMany-4 127559 ns/op 6568 B/op 328 allocs/op
BenchmarkSelectManyPtrs-4 130752 ns/op 7976 B/op 428 allocs/op
Contribute
Make a pull request