{"id":20310332,"url":"https://github.com/hs-web/hsweb-easy-orm","last_synced_at":"2025-04-04T12:10:20.161Z","repository":{"id":37431947,"uuid":"60450885","full_name":"hs-web/hsweb-easy-orm","owner":"hs-web","description":"简单的orm工具,为动态表单而生","archived":false,"fork":false,"pushed_at":"2024-05-28T03:52:21.000Z","size":2312,"stargazers_count":294,"open_issues_count":2,"forks_count":155,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-05-28T11:44:16.097Z","etag":null,"topics":["easyorm","javaorm","orm","sql-generation"],"latest_commit_sha":null,"homepage":"","language":"Java","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/hs-web.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-05T08:42:02.000Z","updated_at":"2024-05-30T05:51:03.432Z","dependencies_parsed_at":"2023-09-27T14:45:18.777Z","dependency_job_id":"1a0a40c2-ec0b-4e21-b857-f6fc739cb5c7","html_url":"https://github.com/hs-web/hsweb-easy-orm","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hs-web%2Fhsweb-easy-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hs-web%2Fhsweb-easy-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hs-web%2Fhsweb-easy-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hs-web%2Fhsweb-easy-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hs-web","download_url":"https://codeload.github.com/hs-web/hsweb-easy-orm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174456,"owners_count":20896078,"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":["easyorm","javaorm","orm","sql-generation"],"created_at":"2024-11-14T17:31:13.943Z","updated_at":"2025-04-04T12:10:20.139Z","avatar_url":"https://github.com/hs-web.png","language":"Java","funding_links":[],"categories":["数据库开发"],"sub_categories":[],"readme":"# 一个简单的orm工具\n\n[![Maven Central](https://img.shields.io/maven-central/v/org.hswebframework/hsweb-easy-orm.svg?style=plastic)](http://search.maven.org/#search%7Cga%7C1%7Chsweb-easy-orm)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/hs-web/hsweb-easy-orm/unit-test.yml?branch=master)\n[![codecov](https://codecov.io/gh/hs-web/hsweb-easy-orm/branch/master/graph/badge.svg)](https://codecov.io/gh/hs-web/hsweb-easy-orm)\n\n\n# 场景\n\n1. 轻SQL,重java.\n2. 动态表单: 动态维护表结构,增删改查.\n3. 参数驱动动态条件, 前端也能透传动态条件,无SQL注入.\n4. 通用条件可拓展, 不再局限`=,\u003e,like...`. `where(\"userId\",\"user-in-org\",orgId)//查询指定机构下用户的数据`\n5. 真响应式支持, 封装r2dbc. reactor真香.\n\n# 🌰\n\n```java\n\nDatabaseOperator operator = ...;\n//DDL\noperator.ddl()\n        .createOrAlter(\"test_table\")\n        .addColumn().name(\"id\").number(32).primaryKey().comment(\"ID\").commit()\n        .addColumn().name(\"name\").varchar(128).comment(\"名称\").commit()\n        .commit()\n        .sync(); // reactive\n     \n//Query   \nList\u003cMap\u003cString,Object\u003e\u003e dataList= operator.dml().query()\n         .select(\"id\")\n         .from(\"test_table\")\n         .where(dsl-\u003edsl.is(\"name\",\"张三\"))\n         .fetch(mapList())\n         .sync(); // reactive\n\n```\n\n# 使用\n\n建议配合[hsweb4](https://github.com/hs-web/hsweb-framework/tree/4.0.x)使用.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhs-web%2Fhsweb-easy-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhs-web%2Fhsweb-easy-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhs-web%2Fhsweb-easy-orm/lists"}