{"id":36615728,"url":"https://github.com/hellojavaer/ddal","last_synced_at":"2026-01-12T09:09:33.146Z","repository":{"id":57745039,"uuid":"74151777","full_name":"hellojavaer/ddal","owner":"hellojavaer","description":"DDAL(Distributed Data Access Layer) is a simple solution to access database shard.","archived":false,"fork":false,"pushed_at":"2018-06-15T17:50:38.000Z","size":1865,"stargazers_count":34,"open_issues_count":0,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-05T11:48:19.553Z","etag":null,"topics":["access-database-shard","converter","datasource","ddr","distributed","load-balancer","mysql","schema","sequence","shard","sql","transaction"],"latest_commit_sha":null,"homepage":"","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/hellojavaer.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}},"created_at":"2016-11-18T17:26:12.000Z","updated_at":"2024-08-23T13:33:12.000Z","dependencies_parsed_at":"2022-08-30T11:32:07.782Z","dependency_job_id":null,"html_url":"https://github.com/hellojavaer/ddal","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/hellojavaer/ddal","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojavaer%2Fddal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojavaer%2Fddal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojavaer%2Fddal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojavaer%2Fddal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hellojavaer","download_url":"https://codeload.github.com/hellojavaer/ddal/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hellojavaer%2Fddal/sbom","scorecard":{"id":460385,"data":{"date":"2025-08-11","repo":{"name":"github.com/hellojavaer/ddal","commit":"876dc32ece8bb983df64e94bdcc9045f0ee5cc3b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 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":"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":"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":"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":"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":"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":"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":"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":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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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 22 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":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"}}]},"last_synced_at":"2025-08-19T10:58:37.142Z","repository_id":57745039,"created_at":"2025-08-19T10:58:37.142Z","updated_at":"2025-08-19T10:58:37.142Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28337649,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["access-database-shard","converter","datasource","ddr","distributed","load-balancer","mysql","schema","sequence","shard","sql","transaction"],"created_at":"2026-01-12T09:09:32.480Z","updated_at":"2026-01-12T09:09:33.140Z","avatar_url":"https://github.com/hellojavaer.png","language":"Java","readme":"# DDAL\n\n[![Build Status](https://travis-ci.org/hellojavaer/ddal.svg?branch=master)](https://travis-ci.org/hellojavaer/ddal)\n[![GitHub release](https://img.shields.io/github/release/hellojavaer/ddal.svg)](https://github.com/hellojavaer/ddal/releases)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.hellojavaer.ddal/ddal-datasource/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.hellojavaer.ddal/ddal-datasource/)\n\nDDAL(Distributed Data Access Layer) is a simple solution to access database shard.\n\n\u003cimg src=\"https://github.com/hellojavaer/ddal/blob/master/doc/img/design_02.jpeg\" width = \"590\" height = \"390\" alt=\"design\" align=center /\u003e\n\n## License\n\nDDAL is dual licensed under **LGPL V2.1** and **Apache Software License, Version 2.0**.\n\n\n## Quick start\n\n- add the following dependency in your pom.xml\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.hellojavaer.ddal\u003c/groupId\u003e\n    \u003cartifactId\u003eddal-datasource\u003c/artifactId\u003e\n    \u003cversion\u003e1.1.1-RELEASE\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n- use DefaultDDALDataSource to proxy the orginal dataSource\n\n```\n\u003cbean name=\"dataSource\" class=\"org.hellojavaer.ddal.datasource.DefaultDDALDataSource\"\u003e\n    \u003cconstructor-arg index=\"0\" value=\"jdbc:ddal:thick:classpath:/datasource.xml\"/\u003e\n    \u003c!-- \u003cconstructor-arg index=\"0\" value=\"jdbc:ddal:thick:http://{host}:{port}/{appName}\"/\u003e --\u003e\n\u003c/bean\u003e\n```\n\n- see [datasource.xml](https://github.com/hellojavaer/ddal/blob/master/ddal-example/ddal-example-example0/src/main/resources/datasource.xml)\n\n- see [a full example](https://github.com/hellojavaer/ddal/tree/master/ddal-example)\n\n## Features\n\n- Only need to proxy the original datasources for business\n- Fully support ACID\n- Support insert, select, update and delete expression\n- Support join(inner join,left join,right join,full jion), sub-select, union all and exists expression\n- Support table alias\n- Support no shard-key schema/table routing\n- Support '=', in' and 'between' operation to route schema/table and support mixed sql parameter and jdbc parameter in routing values\n    - eg: 'select * from tb where id in(1,?,3)'\n    - eg: 'select * from tb where id between 1 and ?'\n- Support Date, Timestamp, Byte, Short, Integer, Long, String, Character, Hex value type for shard-value\n- Support annotation routing\n- Support custom route rule (eg: '{scName}_{format('%02d', sdValue % 4)}')\n- Support route rule binding on a schema (instead of a table)\n- Support scan all schemas and tables\n- Support limit check\n- Support read-write splitting\n- Support load balance of read\n- Support config at server-side\n- Support db cluster route\n- Provide multiple sequence implements\n\n## Download\n\nhttp://repo1.maven.org/maven2/org/hellojavaer/ddal/\n\n## Documentation\n\n- [Documentation Home](https://github.com/hellojavaer/ddal/wiki)\n- [Frequently Asked Questions](https://github.com/hellojavaer/ddal/wiki/faq)\n\n\n## [Release Notes](https://github.com/hellojavaer/ddal/releases)\n\n## Extensions in the latest version 1.1.0-RELEASE\n\n- support DB cluster route\n- enhance ShardRouteUtils\n\n## Extensions in version 1.0.1-RELEASE\n\n- Support route rule binding on a schema (instead of a table)\n\n```\n\u003cbean class=\"org.hellojavaer.ddal.ddr.shard.simple.SimpleShardRouteRuleBinding\"\u003e\n    \u003cproperty name=\"scName\" value=\"base\"/\u003e\n    \u003cproperty name=\"rule\"\u003e\n        \u003cbean class=\"org.hellojavaer.ddal.ddr.shard.rule.SpelShardRouteRule\"\u003e\n            \u003cproperty name=\"scRouteRule\" value=\"{scName}_{format('%02d', sdValue % 2)}\"/\u003e\n            \u003cproperty name=\"tbRouteRule\" value=\"{tbName}_{format('%04d', sdValue % 8)}\"/\u003e\n        \u003c/bean\u003e\n    \u003c/property\u003e\n    \u003cproperty name=\"sdKey\" value=\"id\"/\u003e\n    \u003cproperty name=\"sdValues\" value=\"[0..7]\"/\u003e\n\u003c/bean\u003e\n```\n\n## Extensions in version 1.0.0-RELEASE\n\n- upgrade jsqlparser's version to 1.2 to support more sql features\n- optimize JSQLParserAdapter\n\n## Extensions in version 1.0.0.M7\n\n- support custom protocol jdbc:ddal:\n\n## Extensions in version 1.0.0.M6\n\n- implement DefaultDDALDataSource in ddal-datasource module\n\n```\n\u003cbean name=\"dataSource\" class=\"org.hellojavaer.ddal.datasource.DefaultDDALDataSource\"\u003e\n    \u003cconstructor-arg index=\"0\" value=\"jdbc:ddal:thick:classpath:/datasource.xml\"/\u003e\n\u003c/bean\u003e\n```\n\n- implement DivideShardRouteRule for range route\n\n## Extensions in version 1.0.0.M5\n\n- optimize route rule expression parser\n\n```\n// older\nSpelShardRouteRule rule = new SpelShardRouteRule();\nrule.setScRouteRule(\"{#scName}_{#format('%02d', #sdValue % 4)}\");\nrule.setTbRouteRule(\"{#tbName}_{#format('%04d', #sdValue % 8)}\");\n\n// newer\nSpelShardRouteRule rule = new SpelShardRouteRule();\nrule.setScRouteRule(\"{scName}_{format('%02d', sdValue % 4)}\");\nrule.setTbRouteRule(\"{tbName}_{format('%04d', sdValue % 8)}\");\n```\n\n- optimize range expression parser\n\n```\n\"1,2,3\"  =\u003e 1,2,3\n\"[1..3]\" =\u003e 1,2,3\n\"['A'..'C','X']\" =\u003e A,B,C,X\n\"[0..1][0..1]\" =\u003e 00,01,10,11\n\"Hi![' Allen',' Bob']\" =\u003e Hi! Allen,Hi! Bob\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellojavaer%2Fddal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhellojavaer%2Fddal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhellojavaer%2Fddal/lists"}