{"id":15178937,"url":"https://github.com/koepkeca/mysqlmgr","last_synced_at":"2026-02-02T10:34:07.404Z","repository":{"id":57602927,"uuid":"94139167","full_name":"koepkeca/mysqlMgr","owner":"koepkeca","description":"Mysql Database Statement Manager","archived":false,"fork":false,"pushed_at":"2018-03-17T01:22:00.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-20T08:00:36.885Z","etag":null,"topics":["database","mysql-database"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koepkeca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-12T20:50:21.000Z","updated_at":"2018-03-17T01:22:01.000Z","dependencies_parsed_at":"2022-09-26T20:01:40.916Z","dependency_job_id":null,"html_url":"https://github.com/koepkeca/mysqlMgr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koepkeca%2FmysqlMgr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koepkeca%2FmysqlMgr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koepkeca%2FmysqlMgr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koepkeca%2FmysqlMgr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koepkeca","download_url":"https://codeload.github.com/koepkeca/mysqlMgr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240415215,"owners_count":19797599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","mysql-database"],"created_at":"2024-09-27T15:42:23.717Z","updated_at":"2026-02-02T10:34:07.348Z","avatar_url":"https://github.com/koepkeca.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/koepkeca/mysqlMgr)](https://goreportcard.com/report/github.com/koepkeca/mysqlMgr)\n\n[![GoDoc](https://godoc.org/github.com/koepkeca/mysqlMgr?status.svg)](https://godoc.org/github.com/koepkeca/mysqlMgr)\n\n# Overview\n\nmysqlMgr is a library which wraps database connections and prepared statments in a single data structure which is safe for concurrent use.\n\n# Installation\n\nTo install the library use go get:\n\n```\ngo get github.com/koepkeca/mysqlMgr\n```\n\n# Configuration\n\nEach instance of the library is designed to manage one database connection. The New method takes an [io.Reader](https://godoc.org/io#Reader) which contains json configuration data. An example of the file is here:\n\n```\n{\n    \"database\" : \"mysqlMgr_Demo\",\n    \"server\" : \"localhost\",\n    \"port\" : \"3306\",\n    \"driver\" : \"mysql\",\n    \"user\" : \"changeme\",\n    \"pw\" : \"changeme\"\n}\n```\n# Usage\n\nTo use the library you can create a new instance with an io.Reader that contains the json configuration. A **very basic** example is here, please note, this example skips error checking and a more complete example is available in the example folder.\n\n```\nconfRdr, _ := ioutil.ReadFile(\"config.conf\")\nconfByte := bytes.NewBuffer(confRdr)\ns, _ := mysqlMgr.New(confByte)\n_ = s.AddStmt(\"statement\",\"INSERT INTO table (value1, value2) VALUES (?,?)\")\n//then get the statement\nstmt, _ := s.GetStmt(\"statement\")\ns.Close()\n```\n\n# Example program\n\nThere is an example program that demonstrates the library. It is fully functional but requires a few steps to set it up.\n\n## Prereqs\n\nThe example program requires a few items.\n\n* A words file (linux dictionary) located in /usr/share/dict/words used to populate the random data pool. You can use any list of strings seperated by new lines.\n* A mysql database with the test database created. The schema is located in test_database.sql in the example directory.\n* A **properly configured** configuration file. There is an example configuration file which needs to be modified with your specific configuration values in order to function properly.\n\nThis example program creates a random data pool and the sequentially load 8192 random records into the example database. You can adjust this number by changing the maxElements in example.go\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoepkeca%2Fmysqlmgr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoepkeca%2Fmysqlmgr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoepkeca%2Fmysqlmgr/lists"}