{"id":23158761,"url":"https://github.com/greendelta/olca-h2","last_synced_at":"2025-04-04T18:40:57.470Z","repository":{"id":68566975,"uuid":"123945122","full_name":"GreenDelta/olca-h2","owner":"GreenDelta","description":"Implementation of the openLCA IDatabase interface with an H2 in-memory database","archived":false,"fork":false,"pushed_at":"2018-03-09T12:03:48.000Z","size":22,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-10T03:46:22.694Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GreenDelta.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}},"created_at":"2018-03-05T16:13:30.000Z","updated_at":"2018-03-05T16:15:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"d9bb521b-83ed-4659-a3ea-59e636ddb57d","html_url":"https://github.com/GreenDelta/olca-h2","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"61d9315104befe9cd6b3839808f7e00065b6995a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Folca-h2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Folca-h2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Folca-h2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GreenDelta%2Folca-h2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GreenDelta","download_url":"https://codeload.github.com/GreenDelta/olca-h2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234841,"owners_count":20905852,"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","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-12-17T22:27:25.948Z","updated_at":"2025-04-04T18:40:57.444Z","avatar_url":"https://github.com/GreenDelta.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# olca-h2\n`olca-h2` provides an implementation of the openLCA `IDatabase` interface using\nan in-memory instance of an [H2](http://www.h2database.com) database. The import\ninto `olca-h2` is ~twice as fast compared to an import into a file based Derby\ndatabase in openLCA (on a modern SSD drive). Additionally, you can dump such\nan `olca-h2` database to a file and reload it into memory later (see below). \n\n## Usage\nInstall the [openLCA core modules](https://github.com/GreenDelta/olca-modules)\nand this project via [Maven](https://maven.apache.org/) (you may have to check\nthe version of the dependencies):\n\n```bash\ngit clone \u003cpath to repo\u003e\ncd olca-h2  # check the version in the pom.xml\nmvn install\n``` \n\nAfter this you can use `olca-h2` e.g. as plain Maven dependency:\n\n```xml\n...\n\u003cproperties\u003e\n    \u003colca.version\u003e1.7.0\u003c/olca.version\u003e\n\u003c/properties\u003e\n...\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.openlca\u003c/groupId\u003e\n        \u003cartifactId\u003eolca-core\u003c/artifactId\u003e\n        \u003cversion\u003e${olca.version}\u003c/version\u003e\n        \u003cexclusions\u003e\n            \u003c!-- Exclude Derby because we are using H2 --\u003e\n            \u003cexclusion\u003e\n                \u003cgroupId\u003eorg.apache.derby\u003c/groupId\u003e\n                \u003cartifactId\u003ederby\u003c/artifactId\u003e\n                \u003c/exclusion\u003e\n            \u003c/exclusions\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.openlca\u003c/groupId\u003e\n        \u003cartifactId\u003eolca-h2\u003c/artifactId\u003e\n        \u003cversion\u003e${olca.version}\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n#### Create an empty database\n\n```java\nimport org.openlca.core.database.IDatabase;\nimport org.openlca.h2.DB;\n\nIDatabase db = DB.empty();\n// use it like a standard openLCA database\n```\n\n#### Dump a database and reload it\n\n```java\nimport org.openlca.h2.DB;\n\nDB db = DB.empty();\n// import data ...\ndb.dump(\"dump.gz\");\nDB db2 = DB.fromDump(\"dump.gz\");\n```\n\n## Updating\n`olca-h2` has its own `schema.sql` and `persistence.xml` files. So if there\nare database schema or model updates in openLCA these files need to be checked.\nThe persistence unit is configured to directly take a\n[HikariCP](https://github.com/brettwooldridge/HikariCP) connection pool (\n`transaction-type=\"JTA\"`)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreendelta%2Folca-h2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreendelta%2Folca-h2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreendelta%2Folca-h2/lists"}