{"id":17722841,"url":"https://github.com/tnas/qsplitter","last_synced_at":"2025-03-31T13:27:06.866Z","repository":{"id":257652701,"uuid":"858903861","full_name":"tnas/qsplitter","owner":"tnas","description":"Tool to assist in strategies against errors ORA-01795 and ORA-00913.","archived":false,"fork":false,"pushed_at":"2024-10-23T12:51:35.000Z","size":11096,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-23T15:23:59.200Z","etag":null,"topics":["criteria-api","hibernate-jpa","java11","oracle","performance","sql"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tnas.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}},"created_at":"2024-09-17T18:24:28.000Z","updated_at":"2024-10-23T12:52:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"10f5d2e3-c9c6-44f9-a41e-a62e6fd46bc6","html_url":"https://github.com/tnas/qsplitter","commit_stats":null,"previous_names":["tnas/qsplitter"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnas%2Fqsplitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnas%2Fqsplitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnas%2Fqsplitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tnas%2Fqsplitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tnas","download_url":"https://codeload.github.com/tnas/qsplitter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246473273,"owners_count":20783236,"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":["criteria-api","hibernate-jpa","java11","oracle","performance","sql"],"created_at":"2024-10-25T15:40:43.731Z","updated_at":"2025-03-31T13:27:06.843Z","avatar_url":"https://github.com/tnas.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QSplitter\n\nA simple tool to help developers implement strategies to work around [ORA-01795](https://docs.oracle.com/en/error-help/db/ora-01795/index.html?r=23ai) and [ORA-00913](https://docs.oracle.com/en/error-help/db/ora-00913/?r=23ai) errors.\n\n## Usage\n\nAdd this dependency to the `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.tnas\u003c/groupId\u003e\n    \u003cartifactId\u003eqsplitter\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n## Class Diagram\n\nTo describe how to use the implemented strategies, assume the following classes\npresented in the diagram below.\n\n```mermaid\nclassDiagram\n\tUser: -Long id\n\tUser: -String name\n\tUser: -String email\n\tUser: -String streetName\n\tUser: -String city\n\tUser: -String country\nclass UserId\n    UserId: -Long id\nUser \"1\" --\u003e \"1\" UserId\n```\nAll strategies were implemented for JPA Criteria API. The next sections describe how to use\nthe lib in the Java code.\n\n## N Queries Strategy\n\n```java\n// Objects that must be provided by the application\nEntityManager em;\nList\u003cLong\u003e ids;\nCriteriaQuery\u003cUser\u003e query;\n\nvar qSplitterDao = new NQueriesDao\u003cUser, Long\u003e(em);\nvar entities = this.qSplitterDao.select(ids, query, User_.id);\n\nassertEquals(503, entities.size());\n```\n\n## Disjunctions of Expression Lists\n\n```java\nstatic final int TOTAL_RECORDS = 99765;\n\n// Objects that must be provided by the application\nEntityManager em; \nList\u003cLong\u003e ids; \nCriteriaQuery\u003cUser\u003e query;\n\nvar qSplitterDao = new DisjunctionsDao\u003cUser, Long\u003e(em);\nvar entities = this.qSplitterDao.select(ids, query, User_.id);\n\nassertEquals(503,entities.size());\n```\n\n## Temporary Table\n\n```java\n// Objects that must be provided by the application\nEntityManager em;\nList\u003cLong\u003e ids;\nCriteriaQuery\u003cUser\u003e query;\n\nvar qSplitterDao = new TempTableDao\u003cUser, Long\u003e(em);\nvar tempRelation = new TableRelationship\u003cUser, Long, UserId\u003e(UserId.class, Long.class, User_.replicatedId);\nvar entities = this.qSplitterDao.select(ids, query, tempRelation);\n\nassertEquals(503,entities.size());\n```\n\n## References\n\nAccess the DZone article to learn more details about the tool: [Workarounds for Oracle Restrictions on the Size of Expression Lists](https://dzone.com/articles/workarounds-for-oracle-restrictions)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnas%2Fqsplitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftnas%2Fqsplitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnas%2Fqsplitter/lists"}