{"id":13466242,"url":"https://github.com/go-gorm/clickhouse","last_synced_at":"2026-01-14T10:58:49.204Z","repository":{"id":37838634,"uuid":"298147766","full_name":"go-gorm/clickhouse","owner":"go-gorm","description":"GORM clickhouse driver","archived":false,"fork":true,"pushed_at":"2025-12-15T10:03:53.000Z","size":229,"stargazers_count":285,"open_issues_count":39,"forks_count":75,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-04T17:35:48.315Z","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":"danielkurniadi/clickhouse","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/go-gorm.png","metadata":{"funding":{"github":["jinzhu"],"patreon":"jinzhu","open_collective":"gorm"},"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,"governance":null}},"created_at":"2020-09-24T02:25:43.000Z","updated_at":"2025-11-15T08:23:22.000Z","dependencies_parsed_at":"2023-02-12T01:15:59.634Z","dependency_job_id":null,"html_url":"https://github.com/go-gorm/clickhouse","commit_stats":{"total_commits":78,"total_committers":11,"mean_commits":7.090909090909091,"dds":0.6794871794871795,"last_synced_commit":"1359b0583aba0fde5011290c5776bfe37a5b85e2"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/go-gorm/clickhouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorm%2Fclickhouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorm%2Fclickhouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorm%2Fclickhouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorm%2Fclickhouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-gorm","download_url":"https://codeload.github.com/go-gorm/clickhouse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-gorm%2Fclickhouse/sbom","scorecard":{"id":431891,"data":{"date":"2025-08-11","repo":{"name":"github.com/go-gorm/clickhouse","commit":"73932e7e4d629ee0d8e968c7ca189173bd45dafd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/18 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/go-gorm/clickhouse/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/go-gorm/clickhouse/tests.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENCE:0","Info: FSF or OSI recognized license: MIT License: LICENCE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3603 / GHSA-m454-3xv7-qj85"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 19 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T03:34:03.847Z","repository_id":37838634,"created_at":"2025-08-19T03:34:03.847Z","updated_at":"2025-08-19T03:34:03.847Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28417793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-07-31T15:00:41.439Z","updated_at":"2026-01-14T10:58:49.187Z","avatar_url":"https://github.com/go-gorm.png","language":"Go","funding_links":["https://github.com/sponsors/jinzhu","https://patreon.com/jinzhu","https://opencollective.com/gorm"],"categories":["Go"],"sub_categories":[],"readme":"# GORM ClickHouse Driver\n\nClickhouse support for GORM\n\n[![test status](https://github.com/go-gorm/clickhouse/workflows/tests/badge.svg?branch=master \"test status\")](https://github.com/go-gorm/clickhouse/actions)\n\n## Quick Start\n\nYou can simply test your connection to your database with the following:\n\n```go\npackage main\n\nimport (\n\t\"gorm.io/driver/clickhouse\"\n\t\"gorm.io/gorm\"\n)\n\ntype User struct {\n\tName string\n\tAge  int\n}\n\nfunc main() {\n\tdsn := \"clickhouse://gorm:gorm@localhost:9942/gorm?dial_timeout=10s\u0026read_timeout=20s\"\n\tdb, err := gorm.Open(clickhouse.Open(dsn), \u0026gorm.Config{})\n\tif err != nil {\n\t\tpanic(\"failed to connect database\")\n\t}\n\n\t// Auto Migrate\n\tdb.AutoMigrate(\u0026User{})\n\t// Set table options\n\tdb.Set(\"gorm:table_options\", \"ENGINE=Distributed(cluster, default, hits)\").AutoMigrate(\u0026User{})\n\n\t// Set table cluster options\n\tdb.Set(\"gorm:table_cluster_options\", \"on cluster default\").AutoMigrate(\u0026User{})\n\n\t// Insert\n\tdb.Create(\u0026User{Name: \"Angeliz\", Age: 18})\n\n\t// Select\n\tdb.Find(\u0026User{}, \"name = ?\", \"Angeliz\")\n\n\t// Batch Insert\n\tuser1 := User{Age: 12, Name: \"Bruce Lee\"}\n\tuser2 := User{Age: 13, Name: \"Feynman\"}\n\tuser3 := User{Age: 14, Name: \"Angeliz\"}\n\tvar users = []User{user1, user2, user3}\n\tdb.Create(\u0026users)\n\t// ...\n}\n\n```\n\n## Advanced Configuration\n\n```go\npackage main\n\nimport (\n  std_ck \"github.com/ClickHouse/clickhouse-go/v2\"\n  \"gorm.io/driver/clickhouse\"\n  \"gorm.io/gorm\"\n)\n\nsqlDB, err := std_ck.OpenDB(\u0026std_ck.Options{\n\tAddr: []string{\"127.0.0.1:9999\"},\n\tAuth: std_ck.Auth{\n\t\tDatabase: \"default\",\n\t\tUsername: \"default\",\n\t\tPassword: \"\",\n\t},\n\tTLS: \u0026tls.Config{\n\t\tInsecureSkipVerify: true,\n\t},\n\tSettings: std_ck.Settings{\n\t\t\"max_execution_time\": 60,\n\t},\n\tDialTimeout: 5 * time.Second,\n\tCompression: \u0026std_ck.Compression{\n\t\tstd_ck.CompressionLZ4,\n\t},\n\tDebug: true,\n})\n\nfunc main() {\n  db, err := gorm.Open(clickhouse.New(click.Config{\n    Conn: sqlDB, // initialize with existing database conn\n  })\n}\n```\n\n```go\npackage main\n\nimport (\n  \"gorm.io/driver/clickhouse\"\n  \"gorm.io/gorm\"\n)\n\n// refer to https://github.com/ClickHouse/clickhouse-go\nvar dsn = \"clickhouse://username:password@host1:9000,host2:9000/database?dial_timeout=200ms\u0026max_execution_time=60\"\n\nfunc main() {\n  db, err := gorm.Open(clickhouse.New(click.Config{\n    DSN: dsn,\n    Conn: conn,                       // initialize with existing database conn\n    DisableDatetimePrecision: true,   // disable datetime64 precision, not supported before clickhouse 20.4\n    DontSupportRenameColumn: true,    // rename column not supported before clickhouse 20.4\n    DontSupportEmptyDefaultValue: false,  // do not consider empty strings as valid default values\n    SkipInitializeWithVersion: false, // smart configure based on used version\n    DefaultGranularity: 3,            // 1 granule = 8192 rows\n    DefaultCompression: \"LZ4\",        // default compression algorithm. LZ4 is lossless\n    DefaultIndexType: \"minmax\",       // index stores extremes of the expression\n    DefaultTableEngineOpts: \"ENGINE=MergeTree() ORDER BY tuple()\",\n  }), \u0026gorm.Config{})\n}\n```\n\nCheckout [https://gorm.io](https://gorm.io) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-gorm%2Fclickhouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-gorm%2Fclickhouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-gorm%2Fclickhouse/lists"}