Coder Social home page Coder Social logo

commons-dbtool's Introduction

数据库工具类

介绍

依赖 https://github.com/apache/commons-dbutils

安装

 <dependency>
    <groupId>io.github.moon-cn</groupId>
    <artifactId>commons-dbtool</artifactId>
    <version>1.x.x</version>
</dependency>

最新版查看地址: https://mvnrepository.com/artifact/io.github.moon-cn/commons-dbtool

使用

  DbTool db = new DbTool(datasource);
  List<User> userList = db.findAll(User.clss, sql, params);
  Page<User> page = db.finAll(User.clss, pageable, sql, params):
  User user = db.findOne(User.class, sql, params);

扩展的功能

  • 默认下划线会转换为驼峰
  • 支持枚举,且支持数据库数字和字符,如果数据库是数字,判断枚举下标,如果是字符串,判断name
  • 支持常见日期格式
  • 支持List
  • 支持自定义

commons-dbtool's People

Contributors

mxvc avatar

Watchers

 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.