xorm-multi-statements

command module
v0.0.0-...-e12ffb0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2023 License: MIT Imports: 5 Imported by: 0

README

xorm multi statements

This is an example that demonstrates how the multiStatements parameter is relevant when using a MySQL DSN.

This code will panic with: MYSQL_DSN="root:secret@tcp(localhost:3306)/test-db" go run main.go

This code will exit with code 0 with: MYSQL_DSN="root:secret@tcp(localhost:3306)/test-db?multiStatements=true" go run main.go

This example was created in the context of: https://github.com/grafana/grafana/issues/24721.

Example command to spin-up a MySQL instance for testing: docker run -p 3306:3306 --name mysql-test -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=test-db -e MYSQL_USER=user -e MYSQL_PASSWORD=secret mysql:latest

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL