com.github.maskwerewolf:flower-mysql

flower jdbc framework

License

License

Categories

Categories

MySQL Data Databases
GroupId

GroupId

com.github.maskwerewolf
ArtifactId

ArtifactId

flower-mysql
Last Version

Last Version

2.0
Release Date

Release Date

Type

Type

jar
Description

Description

flower jdbc framework

Download flower-mysql

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.maskwerewolf/flower-mysql/ -->
<dependency>
    <groupId>com.github.maskwerewolf</groupId>
    <artifactId>flower-mysql</artifactId>
    <version>2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.maskwerewolf/flower-mysql/
implementation 'com.github.maskwerewolf:flower-mysql:2.0'
// https://jarcasting.com/artifacts/com.github.maskwerewolf/flower-mysql/
implementation ("com.github.maskwerewolf:flower-mysql:2.0")
'com.github.maskwerewolf:flower-mysql:jar:2.0'
<dependency org="com.github.maskwerewolf" name="flower-mysql" rev="2.0">
  <artifact name="flower-mysql" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.maskwerewolf', module='flower-mysql', version='2.0')
)
libraryDependencies += "com.github.maskwerewolf" % "flower-mysql" % "2.0"
[com.github.maskwerewolf/flower-mysql "2.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.springframework : spring-jdbc Optional jar 5.1.6.RELEASE
ch.qos.logback : logback-classic Optional jar 1.2.3
org.slf4j : jcl-over-slf4j Optional jar 1.7.25
org.slf4j : slf4j-api Optional jar 1.7.25

Project Modules

There are no modules declared in this project.

flower-jdbc2.0

maven

<dependency>
    <groupId>com.github.maskwerewolf</groupId>
    <artifactId>flower-mysql</artifactId>
    <version>2.0</version>
</dependency>

insert

 Number insert(Object object) 
 
 int insertBatch(List<?> objectList)

update

     int update(Query query, Update update, Class<?> entityClass) 
     
     int update(Query query, Update update, String tableName) 

select

 <T> List<T> find(Query query, Class<T> entityClass) 
 <T> List<T> find(Select select, Query query, Class<T> entityClass)
 List<Map<String, Object>> findForMaps(Query query, Class<?> entityClass) 
 List<Map<String, Object>> findForMaps(Select select, Query query, Class<?> entityClass)
 <T> T findOne(Query query, Class<T> entityClass)
 Map<String, Object> findForMap(Query query, Class<?> entityClass) 
 Map<String, Object> findForMap(Query query, String tableName) 
 <T> T findOne(Select select, Query query, Class<T> entityClass) 

count

     long count(Query query, String tableName) 
     long count(Query query, Class<?> entityClass) 

delete

 int delete(Query query, Class<?> entityClass)
  
 int delete(Query query, String tableName) 
example
User user = Jdbc.findOne(Query.query("id=? ",arg1), User.class);

 Query query = new Query();
 if(null != name){
  query.and("name=?",name);
 }
 or like this
query.andIfAbsent("name=?",name);


 query.page(page).limit(limit);
 query.order("..........")
  

 List<User> user = Jdbc.find(query,User.class);
 
 
Jdbc.update(Query.query("id=?",""),Update.setIfAbsent("nickname","value").inc("age",1),User.class)

>sql: update user set nickname=? ,age = age+1 where id = ?

Versions

Version
2.0
1.0