{"id":46420110,"url":"https://github.com/jmrobles/h2go","last_synced_at":"2026-03-05T15:36:38.764Z","repository":{"id":44872115,"uuid":"312423474","full_name":"jmrobles/h2go","owner":"jmrobles","description":"Apache H2 Go SQL Driver","archived":false,"fork":false,"pushed_at":"2022-01-21T10:25:42.000Z","size":4047,"stargazers_count":47,"open_issues_count":4,"forks_count":14,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-22T21:32:47.868Z","etag":null,"topics":["apache","driver","go","golang","h2","h2-database","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/jmrobles.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}},"created_at":"2020-11-12T23:46:28.000Z","updated_at":"2025-02-03T22:04:32.000Z","dependencies_parsed_at":"2022-09-04T14:02:29.972Z","dependency_job_id":null,"html_url":"https://github.com/jmrobles/h2go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jmrobles/h2go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrobles%2Fh2go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrobles%2Fh2go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrobles%2Fh2go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrobles%2Fh2go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jmrobles","download_url":"https://codeload.github.com/jmrobles/h2go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jmrobles%2Fh2go/sbom","scorecard":{"id":524789,"data":{"date":"2025-08-11","repo":{"name":"github.com/jmrobles/h2go","commit":"b81d76e973ef4eaa8df7ff2ee95154c99eaa36b7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/testing.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":"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/testing.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/jmrobles/h2go/testing.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/jmrobles/h2go/testing.yml/main?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":"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":"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":"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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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":"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":"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"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2020-0015 / GHSA-5rcv-m4m3-hfh7","Warn: Project is vulnerable to: GO-2021-0113 / GHSA-ppp9-7jff-5vj2","Warn: Project is vulnerable to: GO-2022-1059 / GHSA-69ch-w2m2-3vjp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T04:04:35.281Z","repository_id":44872115,"created_at":"2025-08-20T04:04:35.281Z","updated_at":"2025-08-20T04:04:35.281Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30133512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T15:35:27.018Z","status":"ssl_error","status_checked_at":"2026-03-05T15:35:23.768Z","response_time":93,"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":["apache","driver","go","golang","h2","h2-database","sql"],"created_at":"2026-03-05T15:36:37.237Z","updated_at":"2026-03-05T15:36:38.760Z","avatar_url":"https://github.com/jmrobles.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache H2 Database Go Driver\n\n__This driver is VERY experimental state__ \n\n__NOT use for production yet__\n\n## Introduction\n\n[Apache H2 Database](https://h2database.com) is a very-low footprint database with in-memory capabilities.\n\nIt's written in Java and it's fully ACID compliant.\n\nYou can use H2 as embedded database or via TCP/IP.\n\nIt has interfaces for Postgres protocol and native TCP server.\n\n## Motivation\n\nUntil now, using H2 in your Go projects could only be done through the Postgres driver.\n\nThis approach has several cons. The poor error messagens or not being able to use native data types are some of them.\n\nThis pure Go driver uses the native TCP interface.\n\n## Pre-requesites\n\nIn \"contrib\" folder you can find the scripts to download and launch the H2 database server.\nYou need to have any Java Runtime installed.\n\n```bash\ncd contrib\n./downloadH2.sh\n./runStandalone.sh\n```\n\n## Usage\n\nFirst make sure the H2 server is running in TCP server mode. You can launch using the `runStandalone.sh` or with a command similar to the following:\n\n```bash\njava -classpath h2.jar org.h2.tools.Server -tcp -tcpAllowOthers -ifNotExists\n```\n\nThis starts the server at the defaulr port (9092)\n\nThe following example connect to H2 and creates an in-memory database. \n\n```go\npackage main\n\nimport (\n\t\"database/sql\"\n\t\"log\"\n\t_ \"github.com/jmrobles/h2go\"\n)\n\nfunc main() {\n\tconn, err := sql.Open(\"h2\", \"h2://sa@localhost/testdb?mem=true\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Can't connet to H2 Database: %s\", err)\n\t}\n    err = conn.Ping()\n    if err != nil {\n        log.Fatalf(\"Can't ping to H2 Database: %s\", err)\n    }\n    log.Printf(\"H2 Database connected\")\n    conn.Close()\n}\n```\n\nIn the folder `examples` you can find more examples.\n## Connection string\n\nIn the connection string you must specify:\n\n- Database driver: `h2` literal\n- Username (optional)\n- Password (optinal)\n- Host: format \u003chost\u003e(:\u003cport\u003e)?\n- Database name\n- Other connection options\n\n### Options\n\nYou can use the following options:\n\n- mem=(true|false): to use in-memory or in-disk database\n- logging=(none|info|debug|error|warn|panic|trace): the common logging level\n\n\n## Parameters\n\nFor the use of parameters in SQL statement you need to use the `?` placeholder symbol.\n\nFor example:\n```go \n    conn.Exec(\"INSERT INTO employees VALUES (?,?,?)\", name, age, salary)\n```\n\n## Data types\n\nThe following H2 datatypes are implemented:\n\n| H2 Data type | Go mapping |\n|--------------|------------|\n| String       | string     |\n| StringIgnoreCase | string |\n| StringFixed | string |\n| Bool | bool |\n| Short | int16 |\n| Int | int32 |\n| Long | int64 |\n| Float | float32 |\n| Double | float64 |\n| Byte | byte |\n| Bytes | []byte |\n| Time | time.Time |\n| Time with timezone | time.Time |\n| Date | time.Time\n| Timestamp | time.Time |\n| Timestamp with timezone | time.Time\n\n## H2 Supported version\n\nThis driver supports H2 database version 1.4.200 or above.\n\n## ToDo\n\n- Rest of native data types (UUID, JSON, Decimal, ...)\n- `NamedValue` interface\n- Multiple result sets\n- Improve `context` usage (timeouts, ...)\n- Submit your issue\n\n## Contributors\n\n[jmrobles](https://jmrobles.medium.com)\n\nPull Requests are welcome\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrobles%2Fh2go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmrobles%2Fh2go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmrobles%2Fh2go/lists"}