Description
Mainly this package was created for testing purposes, to give the ability to seed a database with records from simple .yaml files.
polluter alternatives and similar packages
Based on the "Database" category.
Alternatively, view polluter 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. -
go-mysql-elasticsearch
Sync your MySQL data into Elasticsearch automatically. -
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). -
ObjectBox Go Database
ObjectBox Go - a database for your Go structs/objects. Super-fast and simple.
Get performance insights in less than 4 minutes
Do you think we are missing an alternative of polluter or a related project?
Popular Comparisons
README
polluter
Mainly this package was created for testing purposes, to give the ability to seed a database with records from simple .yaml files. Polluter respects the order in files, so you can handle foreign_keys just by placing them in the right order.
Usage
package main
import "github.com/romanyx/polluter"
const input = `
roles:
- name: User
users:
- name: Roman
role_id: 1
`
func TestX(t *testing.T) {
db := prepareMySQL(t)
defer db.Close()
p := polluter.New(polluter.MySQLEngine(db))
if err := p.Pollute(strings.NewReader(input)); err != nil {
t.Fatalf("failed to pollute: %s", err)
}
....
}
Examples
See examples of usage with parallel testing.
Testing
Make shure to start docker before testing.
go test
Supported databases
- MySQL
- Postgres
- Redis
Contributing
Please feel free to submit issues, fork the repository and send pull requests!