{"id":38808927,"url":"https://github.com/godoes/gorm-oracle","last_synced_at":"2026-01-17T12:52:49.703Z","repository":{"id":61624334,"uuid":"538386404","full_name":"godoes/gorm-oracle","owner":"godoes","description":"🅾️ A pure Go library for GORM Oracle driver based on sijms/go-ora. (forked from dzwvip/oracle - based on godror)","archived":false,"fork":false,"pushed_at":"2025-09-13T01:28:35.000Z","size":227,"stargazers_count":79,"open_issues_count":1,"forks_count":14,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-13T03:24:00.291Z","etag":null,"topics":["go","go-gorm","gorm","oracle","oracle-database"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/godoes/gorm-oracle","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"dzwvip/oracle","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/godoes.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["iTanken"],"patreon":"iTanken","open_collective":"godoes"}},"created_at":"2022-09-19T07:39:01.000Z","updated_at":"2025-09-13T01:28:32.000Z","dependencies_parsed_at":"2024-02-18T09:26:05.686Z","dependency_job_id":"61fd51e6-8906-496c-b41d-4feb6a09ff22","html_url":"https://github.com/godoes/gorm-oracle","commit_stats":null,"previous_names":[],"tags_count":120,"template":false,"template_full_name":null,"purl":"pkg:github/godoes/gorm-oracle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godoes%2Fgorm-oracle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godoes%2Fgorm-oracle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godoes%2Fgorm-oracle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godoes%2Fgorm-oracle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/godoes","download_url":"https://codeload.github.com/godoes/gorm-oracle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/godoes%2Fgorm-oracle/sbom","scorecard":{"id":433498,"data":{"date":"2025-08-11","repo":{"name":"github.com/godoes/gorm-oracle","commit":"1d3fa4af835f864ee0a4af88c3bab40e63f48570"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":6,"reason":"7 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","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":"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/close_inactive.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/close_inactive.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/contrib-readme.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/contrib-readme.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/godoes/gorm-oracle/tests.yml/main?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party 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/close_inactive.yml:1","Warn: no topLevel permission defined: .github/workflows/contrib-readme.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/release.yml:9","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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"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 2 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:58:50.393Z","repository_id":61624334,"created_at":"2025-08-19T03:58:50.393Z","updated_at":"2025-08-19T03:58:50.393Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28508716,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T11:50:55.898Z","status":"ssl_error","status_checked_at":"2026-01-17T11:50:55.569Z","response_time":85,"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":["go","go-gorm","gorm","oracle","oracle-database"],"created_at":"2026-01-17T12:52:49.506Z","updated_at":"2026-01-17T12:52:49.692Z","avatar_url":"https://github.com/godoes.png","language":"Go","funding_links":["https://github.com/sponsors/iTanken","https://patreon.com/iTanken","https://opencollective.com/godoes"],"categories":[],"sub_categories":[],"readme":"# GORM Oracle Driver\n\n## Description\n\nGORM Oracle driver for connect Oracle DB and Manage Oracle DB, Based on [CengSin/oracle](https://github.com/CengSin/oracle)\nand [sijms/go-ora](https://github.com/sijms/go-ora) (pure go oracle client)，*not recommended for use in a production environment*.\n\n## Required dependency Install\n\n- Oracle `11g` + (*`v1.6.3` and earlier versions support only `12c` +*)\n- Golang\n  - `v1.6.1`: `go1.16` +\n  - `v1.6.2`: `go1.18` +\n- gorm `1.24.0` +\n\n## Quick Start\n\n### How to install \n\n```bash\ngo get -d github.com/godoes/gorm-oracle\n```\n\n### Usage\n\n```go\npackage main\n\nimport (\n\toracle \"github.com/godoes/gorm-oracle\"\n\t\"gorm.io/gorm\"\n)\n\nfunc main() {\n\toptions := map[string]string{\n\t\t\"CONNECTION TIMEOUT\": \"90\",\n\t\t\"LANGUAGE\":           \"SIMPLIFIED CHINESE\",\n\t\t\"TERRITORY\":          \"CHINA\",\n\t\t\"SSL\":                \"false\",\n\t}\n\t// oracle://user:password@127.0.0.1:1521/service\n\turl := oracle.BuildUrl(\"127.0.0.1\", \"1521\", \"service\", \"user\", \"password\", options)\n\tdialector := oracle.New(oracle.Config{\n\t\tDSN:                     url,\n\t\tIgnoreCase:              false, // query conditions are not case-sensitive\n\t\tNamingCaseSensitive:     true,  // whether naming is case-sensitive\n\t\tVarcharSizeIsCharLength: true,  // whether VARCHAR type size is character length, defaulting to byte length\n\n\t\t// RowNumberAliasForOracle11 is the alias for ROW_NUMBER() in Oracle 11g, defaulting to ROW_NUM\n\t\tRowNumberAliasForOracle11: \"ROW_NUM\",\n\t})\n\tdb, err := gorm.Open(dialector, \u0026gorm.Config{\n\t\tSkipDefaultTransaction:                   true, // 是否禁用默认在事务中执行单次创建、更新、删除操作\n\t\tDisableForeignKeyConstraintWhenMigrating: true, // 是否禁止在自动迁移或创建表时自动创建外键约束\n\t\t// 自定义命名策略\n\t\tNamingStrategy: schema.NamingStrategy{\n\t\t\tNoLowerCase:         true, // 是否不自动转换小写表名\n\t\t\tIdentifierMaxLength: 30,   // Oracle: 30, PostgreSQL:63, MySQL: 64, SQL Server、SQLite、DM: 128\n\t\t},\n\t\tPrepareStmt:     false, // 创建并缓存预编译语句，启用后可能会报 ORA-01002 错误\n\t\tCreateBatchSize: 50,    // 插入数据默认批处理大小\n\t})\n\tif err != nil {\n\t\t// panic error or log error info\n\t}\n\n\t// set session parameters\n\tif sqlDB, err := db.DB(); err == nil {\n\t\t_, _ = oracle.AddSessionParams(sqlDB, map[string]string{\n\t\t\t\"TIME_ZONE\":               \"+08:00\",                       // ALTER SESSION SET TIME_ZONE = '+08:00';\n\t\t\t\"NLS_DATE_FORMAT\":         \"YYYY-MM-DD\",                   // ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD';\n\t\t\t\"NLS_TIME_FORMAT\":         \"HH24:MI:SSXFF\",                // ALTER SESSION SET NLS_TIME_FORMAT = 'HH24:MI:SS.FF3';\n\t\t\t\"NLS_TIMESTAMP_FORMAT\":    \"YYYY-MM-DD HH24:MI:SSXFF\",     // ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF3';\n\t\t\t\"NLS_TIME_TZ_FORMAT\":      \"HH24:MI:SS.FF TZR\",            // ALTER SESSION SET NLS_TIME_TZ_FORMAT = 'HH24:MI:SS.FF3 TZR';\n\t\t\t\"NLS_TIMESTAMP_TZ_FORMAT\": \"YYYY-MM-DD HH24:MI:SSXFF TZR\", // ALTER SESSION SET NLS_TIMESTAMP_TZ_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF3 TZR';\n\t\t})\n\t}\n\n\t// do somethings\n}\n\n```\n\n## Questions\n\n\u003c!--suppress HtmlDeprecatedAttribute --\u003e\n\u003cdetails\u003e\n\u003csummary\u003eORA-01000: 超出打开游标的最大数\u003c/summary\u003e\n\n\u003e ORA-00604: 递归 SQL 级别 1 出现错误\n\u003e \n\u003e ORA-01000: 超出打开游标的最大数\n\n```shell\nshow parameter OPEN_CURSORS;\n```\n\n```sql\nalter system set OPEN_CURSORS = 1000; -- or bigger\ncommit;\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eORA-01002: 提取违反顺序\u003c/summary\u003e\n\n\u003e 如果重复执行同一查询，第一次查询成功，第二次报 `ORA-01002` 错误，可能是因为启用了 `PrepareStmt`，关闭此配置即可。\n\n推荐配置：\n\n```go\n\u0026gorm.Config{\n    SkipDefaultTransaction:                   true, // 是否禁用默认在事务中执行单次创建、更新、删除操作\n    DisableForeignKeyConstraintWhenMigrating: true, // 是否禁止在自动迁移或创建表时自动创建外键约束\n    // 自定义命名策略\n    NamingStrategy: schema.NamingStrategy{\n        NoLowerCase:         true, // 是否不自动转换小写表名\n        IdentifierMaxLength: 30,   // Oracle: 30, PostgreSQL:63, MySQL: 64, SQL Server、SQLite、DM: 128\n    },\n    PrepareStmt:     false, // 创建并缓存预编译语句，启用后可能会报 ORA-01002 错误\n    CreateBatchSize: 50,    // 插入数据默认批处理大小\n}\n```\n\n\u003c/details\u003e\n\n## Contributors\n\n\u003c!-- readme: collaborators,contributors -start --\u003e\n\u003ctable\u003e\n\t\u003ctbody\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/iTanken\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/23544702?v=4\" width=\"100;\" alt=\"iTanken\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eiTanken\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/stevefan1999-personal\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/29133953?v=4\" width=\"100;\" alt=\"stevefan1999-personal\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003estevefan1999-personal\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/CengSin\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/23357893?v=4\" width=\"100;\" alt=\"CengSin\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003eCengSin\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/jinzhu\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/6843?v=4\" width=\"100;\" alt=\"jinzhu\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003ejinzhu\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/dzwvip\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/17947637?v=4\" width=\"100;\" alt=\"dzwvip\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003edzwvip\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/miclle\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/186694?v=4\" width=\"100;\" alt=\"miclle\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003emiclle\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\t\u003ctr\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/dk333\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/24607870?v=4\" width=\"100;\" alt=\"dk333\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003edk333\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n            \u003ctd align=\"center\"\u003e\n                \u003ca href=\"https://github.com/cloorc\"\u003e\n                    \u003cimg src=\"https://avatars.githubusercontent.com/u/13597105?v=4\" width=\"100;\" alt=\"cloorc\"/\u003e\n                    \u003cbr /\u003e\n                    \u003csub\u003e\u003cb\u003ecloorc\u003c/b\u003e\u003c/sub\u003e\n                \u003c/a\u003e\n            \u003c/td\u003e\n\t\t\u003c/tr\u003e\n\t\u003ctbody\u003e\n\u003c/table\u003e\n\u003c!-- readme: collaborators,contributors -end --\u003e\n\n## LICENSE\n\n[MIT license](./LICENSE)\n\n- Copyright (c) 2020 [Jinzhu](https://github.com/jinzhu)\n- Copyright (c) 2020 [Steve Fan](https://github.com/stevefan1999-personal)\n- Copyright (c) 2020 [CengSin](https://github.com/CengSin)\n- Copyright (c) 2022 [dzwvip](https://github.com/dzwvip)\n- Copyright (c) 2022-present [iTanken](https://github.com/iTanken)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodoes%2Fgorm-oracle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodoes%2Fgorm-oracle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodoes%2Fgorm-oracle/lists"}