Popularity
2.7
Growing
Activity
0.0
Stable
29
3
10
Programming language: Go
License: Mozilla Public License 2.0
Tags:
Database
go-fixtures alternatives and similar packages
Based on the "Database" category.
Alternatively, view go-fixtures alternatives based on common mentions on social networks and blogs.
-
prometheus
The Prometheus monitoring system and time series database. -
cockroach
CockroachDB - the open source, cloud-native distributed SQL database. -
Milvus
A cloud-native vector database, storage for next generation AI applications -
influxdb
Scalable datastore for metrics, events, and real-time analytics -
tidb
TiDB is an open-source, cloud-native, distributed, MySQL-Compatible database for elastic scale and real-time analytics. Try AI-powered Chat2Query free at : https://tidbcloud.com/free-trial -
vitess
Vitess is a database clustering system for horizontal scaling of MySQL. -
groupcache
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases. -
rqlite
The lightweight, distributed relational database built on SQLite -
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM. -
VictoriaMetrics
VictoriaMetrics: fast, cost-effective monitoring solution and time series database -
immudb
immudb - immutable database based on zero trust, SQL and Key-Value, tamperproof, data change history -
go-cache
An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications. -
bytebase
Database DevOps and CI/CD for teams. https://www.bytebase.com -
go-mysql-elasticsearch
Sync MySQL data into elasticsearch -
buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support -
pREST
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new -
rosedb
🚀 A high performance NoSQL database based on bitcask, supports string, list, hash, set, and sorted set. -
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server -
dbmate
:rocket: A lightweight, framework-agnostic database migration tool. -
tiedot
A rudimentary implementation of a basic document (NoSQL) database in Go -
nutsdb
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. -
cache2go
Concurrency-safe Go caching library with expiration capabilities and access counters -
GCache
An in-memory cache library for golang. It supports multiple eviction policies: LRU, LFU, ARC -
fastcache
Fast thread-safe inmemory cache for big number of entries in Go. Minimizes GC overhead -
gocraft/dbr (database records)
Additions to Go's database/sql for super fast performance and convenience. -
CovenantSQL
A decentralized, trusted, high performance, SQL database with blockchain features
Access the most powerful time series database as a service
Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Promo
www.influxdata.com
Do you think we are missing an alternative of go-fixtures or a related project?
README
go-fixtures
Django style fixtures for Golang's excellent built-in database/sql
library. Currently only YAML
fixtures are supported.
There are two reserved values you can use for datetime
fields:
ON_INSERT_NOW()
will only be used when a row is being insertedON_UPDATE_NOW()
will only be used when a row is being updated
Example YAML fixture:
---
- table: 'some_table'
pk:
id: 1
fields:
string_field: 'foobar'
boolean_field: true
created_at: 'ON_INSERT_NOW()'
updated_at: 'ON_UPDATE_NOW()'
- table: 'other_table'
pk:
id: 2
fields:
int_field: 123
boolean_field: false
created_at: 'ON_INSERT_NOW()'
updated_at: 'ON_UPDATE_NOW()'
- table: 'join_table'
pk:
some_id: 1
other_id: 2
Example integration for your project:
package main
import (
"database/sql"
"io/ioutil"
"log"
"github.com/RichardKnop/go-fixtures"
"github.com/urfave/cli"
// Drivers
_ "github.com/lib/pq"
)
var (
cliApp *cli.App
)
func init() {
cliApp = cli.NewApp()
cliApp.Name = "your-project"
cliApp.Usage = "Project's usage"
cliApp.Author = "Your Name"
cliApp.Email = "[email protected]"
cliApp.Version = "0.0.0"
}
func main() {
db, err := sql.Connect("postgres", "user=foo dbname=bar sslmode=disable")
if err != nil {
log.Fatal(err)
}
defer db.Close()
cliApp.Commands = []cli.Command{
{
Name: "loaddata",
Usage: "load data from fixture",
Action: func(c *cli.Context) error {
data, err := ioutil.ReadFile(c.Args().First())
if err != nil {
return err
}
if err := fixtures.Load(data, db, "postgres"); err != nil {
return err
}
},
},
{
Name: "runserver",
Usage: "run web server",
Action: func(c *cli.Context) error {
// Run your web server here
return nil
},
},
}
cliApp.Run(os.Args)
}