Skip to content

hs-web/hsweb-easy-orm

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

一个简单的orm工具

Maven Central Build Status codecov

场景

  1. 轻SQL,重java.
  2. 动态表单: 动态维护表结构,增删改查.
  3. 参数驱动动态条件, 前端也能透传动态条件,无SQL注入.
  4. 通用条件可拓展, 不再局限=,>,like.... where("userId","user-in-org",orgId)//查询指定机构下用户的数据
  5. 真响应式支持, 封装r2dbc. reactor真香.

🌰

DatabaseOperator operator = ...;
//DDL
operator.ddl()
        .createOrAlter("test_table")
        .addColumn().name("id").number(32).primaryKey().comment("ID").commit()
        .addColumn().name("name").varchar(128).comment("名称").commit()
        .commit()
        .sync(); // reactive
     
//Query   
List<Map<String,Object>> dataList= operator.dml().query()
         .select("id")
         .from("test_table")
         .where(dsl->dsl.is("name","张三"))
         .fetch(mapList())
         .sync(); // reactive

使用

建议配合hsweb4使用.