{"id":43777738,"url":"https://github.com/onozaty/postgresql-copy-helper","last_synced_at":"2026-02-05T17:33:23.751Z","repository":{"id":57721927,"uuid":"237565418","full_name":"onozaty/postgresql-copy-helper","owner":"onozaty","description":null,"archived":false,"fork":false,"pushed_at":"2020-03-17T15:49:11.000Z","size":105,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-16T06:32:19.769Z","etag":null,"topics":["java","postgresql"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onozaty.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"onozaty"}},"created_at":"2020-02-01T05:08:40.000Z","updated_at":"2024-10-25T01:47:56.000Z","dependencies_parsed_at":"2022-09-26T21:50:24.600Z","dependency_job_id":null,"html_url":"https://github.com/onozaty/postgresql-copy-helper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/onozaty/postgresql-copy-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onozaty%2Fpostgresql-copy-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onozaty%2Fpostgresql-copy-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onozaty%2Fpostgresql-copy-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onozaty%2Fpostgresql-copy-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onozaty","download_url":"https://codeload.github.com/onozaty/postgresql-copy-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onozaty%2Fpostgresql-copy-helper/sbom","scorecard":{"id":707647,"data":{"date":"2025-08-11","repo":{"name":"github.com/onozaty/postgresql-copy-helper","commit":"7309e8b00b07e67cda7ac819f71cfbfe744a0a06"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/23 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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"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":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":"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 'master'"],"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":"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"}}]},"last_synced_at":"2025-08-22T07:09:48.679Z","repository_id":57721927,"created_at":"2025-08-22T07:09:48.679Z","updated_at":"2025-08-22T07:09:48.679Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29127070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T17:12:17.649Z","status":"ssl_error","status_checked_at":"2026-02-05T17:11:23.670Z","response_time":65,"last_error":"SSL_read: 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":["java","postgresql"],"created_at":"2026-02-05T17:33:22.758Z","updated_at":"2026-02-05T17:33:23.743Z","avatar_url":"https://github.com/onozaty.png","language":"Java","funding_links":["https://github.com/sponsors/onozaty"],"categories":[],"sub_categories":[],"readme":"# PostgreSQL COPY Helper\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.onozaty/postgresql-copy-helper/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.onozaty/postgresql-copy-helper)\n\nPostgreSQL COPY Helper は、PostgreSQLのCOPYコマンドを利用するためのヘルパクラスを提供するJava用ライブラリです。  \nオブジェクトの一覧を簡単かつ高速にインポートできます。\n\nPostgreSQLのCOPYコマンドは、INSERTと比べてとても高速に動作します。\n\n* [PostgreSQL: Documentation: COPY](https://www.postgresql.org/docs/current/sql-copy.html)\n\n## セットアップ\n\nPostgreSQL COPY Helper は jCenter および Maven Central で公開されています。  \n依存関係に追加するだけで利用可能です。\n\n### maven\n\n```xml\n\u003cdependency\u003e\n\t\u003cgroupId\u003ecom.github.onozaty\u003c/groupId\u003e\n\t\u003cartifactId\u003epostgresql-copy-helper\u003c/artifactId\u003e\n\t\u003cversion\u003e1.1.0\u003c/version\u003e\n\t\u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n\n```groovy\nimplementation 'com.github.onozaty:postgresql-copy-helper:1.1.0'\n```\n\n## 利用方法\n\n登録したいデータを表すクラスを定義します。\n\n`@Table`で対象のテーブル名、`@Column`でカラム名を指定します。\n\n```java\npackage postgresql.copy.helper.example;\n\nimport com.github.onozaty.postgresql.copy.bean.Column;\nimport com.github.onozaty.postgresql.copy.bean.Table;\n\n@Table(\"items\")\npublic class Item {\n\n    @Column(\"id\")\n    private final int id;\n\n    @Column(\"name\")\n    private final String name;\n\n    public Item(int id, String name) {\n        this.id = id;\n        this.name = name;\n    }\n\n    public int getId() {\n        return id;\n    }\n\n    public String getName() {\n        return name;\n    }\n}\n```\n\n`CopyHelper.copyFrom`で対象のデータリストを指定するだけで、COPYコマンドが実行されます。\n\n```java\nBaseConnection connection = (BaseConnection) DriverManager.getConnection(DATABASE_URL, DATABASE_USER, DATABASE_PASSWORD);\n\nList\u003cItem\u003e items = generateItems();\nCopyHelper.copyFrom(connection, items, Item.class);\n```\n\n## パフォーマンスについて\n\n下記のプロジェクトにて、COPYコマンドのパフォーマンスを測定しています。\n\n* https://github.com/onozaty/java-sandbox/tree/master/postgresql-copy-helper-example\n\n100,000件で、それぞれ下記のような時間となっています。\n\n| パターン | 時間(msec) |\n|---------|----------:|\n| 1件ずつINSERT | 12,000 |\n| Batch INSERT | 1,000 |\n| COPYコマンド(本ライブラリを利用) | 100 |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonozaty%2Fpostgresql-copy-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonozaty%2Fpostgresql-copy-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonozaty%2Fpostgresql-copy-helper/lists"}