{"id":16304820,"url":"https://github.com/moznion/go-mysql-explain-parser","last_synced_at":"2025-04-10T23:53:24.547Z","repository":{"id":18125680,"uuid":"21203678","full_name":"moznion/go-mysql-explain-parser","owner":"moznion","description":"Parser for result of EXPLAIN of MySQL by golang","archived":false,"fork":false,"pushed_at":"2014-06-25T13:16:15.000Z","size":124,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T23:53:21.665Z","etag":null,"topics":[],"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/moznion.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":"2014-06-25T13:13:42.000Z","updated_at":"2025-01-06T09:13:00.000Z","dependencies_parsed_at":"2022-09-09T20:20:16.829Z","dependency_job_id":null,"html_url":"https://github.com/moznion/go-mysql-explain-parser","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/moznion%2Fgo-mysql-explain-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fgo-mysql-explain-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fgo-mysql-explain-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moznion%2Fgo-mysql-explain-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moznion","download_url":"https://codeload.github.com/moznion/go-mysql-explain-parser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317703,"owners_count":21083528,"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":[],"created_at":"2024-10-10T21:04:54.198Z","updated_at":"2025-04-10T23:53:24.522Z","avatar_url":"https://github.com/moznion.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/moznion/go-mysql-explain-parser.svg?branch=master)](https://travis-ci.org/moznion/go-mysql-explain-parser)\n\n[https://godoc.org/github.com/moznion/go-mysql-explain-parser](https://godoc.org/github.com/moznion/go-mysql-explain-parser)\n\ngo-mysql-explain-parser\n=======================\n\ngo-mysql-explain-parser is the parser for result of EXPLAIN of MySQL.\n\nThis package is port of [MySQL::Explain::Parser](http://search.cpan.org/~moznion/MySQL-Explain-Parser/lib/MySQL/Explain/Parser.pm) from Perl to Go.\n\n## Getting Started\n\n```\ngo get github.com/moznion/go-mysql-explain-parser\n```\n\n## Synopsis\n\n```go\nimport (\n\t\"github.com/moznion/go-mysql-explain-parser\"\n)\n\nfunc main() {\n\n\texplain := `\n+----+-------------+-------+-------+---------------+---------+---------+------+------+----------+-------------+\n| id | select_type | table | type  | possible_keys | key     | key_len | ref  | rows | filtered | Extra       |\n+----+-------------+-------+-------+---------------+---------+---------+------+------+----------+-------------+\n|  1 | PRIMARY     | t1    | index | NULL          | PRIMARY | 4       | NULL | 4    | 100.00   |             |\n|  2 | SUBQUERY    | t2    | index | a             | a       | 5       | NULL | 3    | 100.00   | Using index |\n+----+-------------+-------+-------+---------------+---------+---------+------+------+----------+-------------+\n`\n\tmysqlexplainparser.Parse(explain)\n\n\texplainVertical := `\n*************************** 1. row ***************************\n           id: 1\n  select_type: PRIMARY\n        table: t1\n         type: index\npossible_keys: NULL\n          key: PRIMARY\n      key_len: 4\n          ref: NULL\n         rows: 4\n     filtered: 100.00\n        Extra:\n*************************** 2. row ***************************\n           id: 2\n  select_type: SUBQUERY\n        table: t2\n         type: index\npossible_keys: a\n          key: a\n      key_len: 5\n          ref: NULL\n         rows: 3\n     filtered: 100.00\n        Extra: Using index\n`\n\tmysqlexplainparser.ParseVertical(explainVertical)\n}\n```\n\n## Functions\n\n- `func Parse(explain string) []map[string]string`\n\nReturns the result of parsed EXPLAIN\n\n- `func ParseVertical(explain string) []map[string]string`\n\nReturns the result of parsed EXPLAIN as vertical\n\n## See Also\n\n- [MySQL::Explain::Parser](http://search.cpan.org/~moznion/MySQL-Explain-Parser/lib/MySQL/Explain/Parser.pm)\n- [http://dev.mysql.com/doc/en/explain-output.html](http://dev.mysql.com/doc/en/explain-output.html)\n- [http://dev.mysql.com/doc/en/explain-extended.html](http://dev.mysql.com/doc/en/explain-extended.html)\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fgo-mysql-explain-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoznion%2Fgo-mysql-explain-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoznion%2Fgo-mysql-explain-parser/lists"}