Git Product home page Git Product logo

stream-query's Introduction

stream-query

hardcore extreme opinionated.

👉 stream-query 👈

star github star

📚简介

允许完全摆脱Mappermybatis-plus体验!

封装streamlambda操作进行数据返回处理

📝文档

中文文档  仓库地址  视频教程

📦安装

🍊Maven

在项目的pom.xml的dependencies中加入以下内容:

<!-- 已包含mybatis-plus、stream-core、不用重复引入 -->
<!-- https://mvnrepository.com/artifact/org.dromara.stream-query/stream-plugin-mybatis-plus -->
<dependency>
   <groupId>org.dromara.stream-query</groupId>
   <artifactId>stream-plugin-mybatis-plus</artifactId>
   <version>x.x.x</version>
</dependency>
        <!-- 可单独引入 -->
        <!-- https://mvnrepository.com/artifact/org.dromara/stream-core -->
<dependency>
<groupId>org.dromara.stream-query</groupId>
<artifactId>stream-core</artifactId>
<version>x.x.x</version>
</dependency>

🍊Gradle

在项目的build.gradle的dependencies中加入以下内容:

implementation group: 'org.dromara.stream-query', name: 'stream-plugin-mybatis-plus', version: 'x.x.x'
implementation group: 'org.dromara.stream-query', name: 'stream-core', version: 'x.x.x'

🔧 配置

注入动态Mapper处理器

@Bean
public DynamicMapperHandler dynamicMapperHandler(SqlSessionFactory sqlSessionFactory) throws Exception {
    // 使用ClassHelper的scanClasses方法扫描对应路径下的po生成Class文件集合放入第二个参数就可以了
    final List<Class<?>>entityClassList=ClassHelper.scanClasses("com.ruben.pojo.po");
    return new DynamicMapperHandler(sqlSessionFactory,entityClassList);
}

📚使用

Database.saveBatch(userList);
// 批量保存
Database.saveBatch(userList);
// 使用userIds进行in查询,得到map key为id,value为entity对象
Map<Long, UserInfo> idUserMap=OneToOne.of(UserInfo::getId).in(userIds).query();

更多使用姿势-Database

更多使用姿势-One/Many/OneToMany

更多请看文档

🐞提供bug反馈或建议

提交问题反馈请说明正在使用的JDK版本、stream-query版本和相关依赖库版本。如果可以请尽量详细或加图片以便于我们去复现

Gitee issue
Github issue

🏗️添砖加瓦️

如果您感觉我们的代码有需要优化的地方或者有更好的方案欢迎随时提pr

📚包说明

包名 内容
stream-query 优雅的流式操作
stream-plugin orm框架->使用优雅的Lambda进行对数据库进行一系列操作

🐾贡献代码的步骤

  1. Gitee或者Githubfork项目到自己的repo
  2. fork过去的项目也就是你的项目clone到你的本地
  3. 修改代码
  4. commitpush到自己的库
  5. 登录GiteeGithub在你仓库首页可以看到一个 pull request 按钮,点击它,填写一些说明信息,然后提交即可。 等待维护者合并

📐PR遵照的原则

stream-query欢迎任何人为stream-query添砖加瓦,贡献代码,规范如下:

  • 注释完备,尤其每个新增的方法应按照Java文档规范标明方法说明、参数说明、返回值说明等信息,必要时请添加单元测试,如果愿意,也可以加上你的大名。
  • 新加的方法尽可能不要使用额外的第三方库方法
  • 我们如果关闭了你的issue或pr,请不要诧异,这是我们保持问题处理整洁的一种方式,你依旧可以继续讨论,当有讨论结果时我们会重新打开。

powered by GitHub Copilot powered by JetBrainsOpen source license

stream-query's People

Contributors

vampireachao avatar cizaii avatar kamtohung avatar linkyun2020 avatar createsequence avatar yangzhihongi avatar znicelya avatar aihuahua-522 avatar cddysq avatar 18585307051 avatar handy-git avatar pszgad avatar war3sxkcs avatar javalionli avatar cheakin avatar aojiaoxiaomanyao avatar zzemptypoint avatar hostsugar avatar dorexi avatar oday-xiexin avatar lonelyss avatar ykjym avatar talcantara avatar wyh55 avatar chl1442802633 avatar xiaodebao avatar aderylox avatar richard9100 avatar 1014071843 avatar yueail avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.