• Stars
    star
    303
  • Rank 137,655 (Top 3 %)
  • Language
    Java
  • Created over 8 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

简单的orm工具,为动态表单而生

一个简单的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使用.