{"id":18808925,"url":"https://github.com/jauharibill/gobulkinsert","last_synced_at":"2026-05-17T00:05:58.606Z","repository":{"id":97725644,"uuid":"289891334","full_name":"jauharibill/gobulkinsert","owner":"jauharibill","description":"generating query bulk insert to support library gorm.io","archived":false,"fork":false,"pushed_at":"2020-08-27T07:24:45.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T14:52:09.531Z","etag":null,"topics":["golang","gorm","mysql","query","query-builder","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jauharibill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-24T09:58:37.000Z","updated_at":"2020-08-27T10:15:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"50dfd0ef-ce97-42ef-93a2-1a0287a1c0f0","html_url":"https://github.com/jauharibill/gobulkinsert","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jauharibill/gobulkinsert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jauharibill%2Fgobulkinsert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jauharibill%2Fgobulkinsert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jauharibill%2Fgobulkinsert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jauharibill%2Fgobulkinsert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jauharibill","download_url":"https://codeload.github.com/jauharibill/gobulkinsert/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jauharibill%2Fgobulkinsert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007028,"owners_count":26084226,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["golang","gorm","mysql","query","query-builder","sql"],"created_at":"2024-11-07T23:14:43.432Z","updated_at":"2025-10-11T11:11:43.301Z","avatar_url":"https://github.com/jauharibill.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GO BULK INSERT\r\n\r\n## Introduction\r\n\r\nthis library is used for creating raw query insert in bulk mode. this library created because gorm library doesnt support bulk request, so this library created for supporting any golang query builder library especially GORM.\r\n\r\n\r\n### How to install\r\n\r\n```\r\ngo get -u github.com/jauharibill/gobulkinsert\r\n```\r\n\r\n### How to use\r\n\r\n```\r\npackage main\r\n\r\nimport (\r\n\t\"fmt\"\r\n\r\n\t\"github.com/jauharibill/gobulkinsert\"\r\n)\r\n\r\ntype UserModel struct {\r\n\tFullName string `json:\"fullname\"`\r\n\tAge      string `json:\"age\"`\r\n\tPhone    string `json:\"phone\"`\r\n}\r\n\r\nfunc main() {\r\n\tvar user UserModel\r\n\r\n\tvalue := [][]interface{}{\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t\t{\"bill\", 12, \"17-09-1945\", \"082245xxxx\"},\r\n\t}\r\n  \r\n\tquery := gobulkinsert.Service().\r\n\t\tExtractModelField(user, []string{}).\r\n\t\tArrangeValue(value, 6).\r\n\t\tInsertQuery(\"users\").\r\n\t\tGetQuery()\r\n\r\n\tfmt.Println(query)\r\n}\r\n\r\n```\r\n\r\n### Output\r\n\r\n```\r\nINSERT INTO `users` (`fullname`, `age`, `phone`) VALUES ('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx');\r\nINSERT INTO `users` (`fullname`, `age`, `phone`) VALUES ('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx');\r\nINSERT INTO `users` (`fullname`, `age`, `phone`) VALUES ('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx'),('bill', '12', '17-09-1945', '082245xxxx');\r\n```\r\n\r\n### How to implement in GORM Library\r\n\r\nput generated query in variable, and then execute it with `Exec()` method in query builder gorm. for example :\r\n\r\n```\r\nfunc (i *gorm.DB) test () {\r\n  query := \u003cthis value belongs to gobulkrequest\u003e\r\n  i.Exec(query) // you could put any db transaction also\r\n}\r\n```\r\n\r\n## Contribute\r\n\r\nPlease pull request if you have any improvement, Cheers!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjauharibill%2Fgobulkinsert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjauharibill%2Fgobulkinsert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjauharibill%2Fgobulkinsert/lists"}