https://github.com/jamiefdhurst/yendo-mysql
A small and simple MySQL database package for Go that includes support for automatic migrations
https://github.com/jamiefdhurst/yendo-mysql
golang golang-package migration migration-tool mysql
Last synced: 4 months ago
JSON representation
A small and simple MySQL database package for Go that includes support for automatic migrations
- Host: GitHub
- URL: https://github.com/jamiefdhurst/yendo-mysql
- Owner: jamiefdhurst
- License: mit
- Created: 2019-11-29T15:49:28.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-04T08:29:35.000Z (almost 3 years ago)
- Last Synced: 2024-11-29T08:23:10.553Z (6 months ago)
- Topics: golang, golang-package, migration, migration-tool, mysql
- Language: Go
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Yendo

[](https://ci.jamiehurst.co.uk/job/github/job/yendo/job/master/)
[](https://github.com/jamiefdhurst/yendo/releases)A small and simple MySQL database package for Go that includes support for automatic migrations.
## Support
Yendo supports GOPATH and Go Module installations, from Go 1.13 up to Go 1.17.
## Usage Example
A detailed example is present in the `example/` folder.
## Running Tests
The tests require a MySQL connection available - the following environment variables are used to establish the
connection:* `DB_HOST` - Hostname or IP address, e.g. `localhost`
* `DB_PORT` - Port number, usually 3306 - this can be ommitted
* `DB_USER` - Username to connect as
* `DB_PASSWORD` - Password to connect using
* `DB_NAME` - Database name to use when testingIf you check out the code into the standard GOPATH-expected location (`src/github.com/jamiefdhurst/yendo`), you can run
the tests immediately from within that location.Once these conditions are met, the tests can be performed simply by running:
```bash
go test
```