Skip to content

Commit

Permalink
3.5.16
Browse files Browse the repository at this point in the history
  • Loading branch information
landawn committed Jun 10, 2024
1 parent 46e0d7c commit fa2692e
Showing 15 changed files with 34 additions and 23 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 3.5.16

* Improvements and bug fix.

### 3.5.15

* Improvements and bug fix.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# abacus-jdbc

[![Maven Central](https://img.shields.io/maven-central/v/com.landawn/abacus-jdbc.svg)](https://maven-badges.herokuapp.com/maven-central/com.landawn/abacus-jdbc/)
[![Javadocs](https://img.shields.io/badge/javadoc-3.5.15-brightgreen.svg)](https://www.javadoc.io/doc/com.landawn/abacus-jdbc/3.5.15/index.html)
[![Javadocs](https://img.shields.io/badge/javadoc-3.5.16-brightgreen.svg)](https://www.javadoc.io/doc/com.landawn/abacus-jdbc/3.5.16/index.html)

Hope it will bring you the programming experiences: coding with SQL/DB is just like coding with Collections.

@@ -141,15 +141,15 @@ The biggest difference between this library and other data(database) access fram
<dependency>
<groupId>com.landawn</groupId>
<artifactId>abacus-jdbc</artifactId>
<version>3.5.15</version>
<version>3.5.16</version>
<dependency>
```

* Gradle:

```gradle
// JDK 17 or above:
compile 'com.landawn:abacus-jdbc:3.5.15'
compile 'com.landawn:abacus-jdbc:3.5.16'
```

## User Guide:
2 changes: 1 addition & 1 deletion maven/0.0.1-SNAPSHOT/abacus-jdbc-0.0.1-SNAPSHOT.pom
Original file line number Diff line number Diff line change
@@ -77,7 +77,7 @@
<dependency>
<groupId>com.landawn</groupId>
<artifactId>abacus-common</artifactId>
<version>3.11.5</version>
<version>3.11.6</version>
</dependency>

<dependency>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@

<groupId>com.landawn</groupId>
<artifactId>abacus-jdbc</artifactId>
<version>3.5.16</version>
<version>3.5.17</version>
<packaging>jar</packaging>

<name>abacus-jdbc</name>
@@ -32,7 +32,7 @@
<dependency>
<groupId>com.landawn</groupId>
<artifactId>abacus-common</artifactId>
<version>3.11.5</version>
<version>3.11.6</version>
<scope>provided</scope>
</dependency>

7 changes: 7 additions & 0 deletions samples/com/landawn/abacus/samples/DaoTest.java
Original file line number Diff line number Diff line change
@@ -139,6 +139,13 @@ public void test_distinct() throws SQLException {
assertEquals(users.size(), userDao.count(ids));
assertEquals(users.size(), userDao.list(CF.criteria().distinct()).size());

assertEquals(users.size(), userDao.list(CF.criteria().where(CF.notEqual("firstName", "aaaaaa")).orderBy("firstName", "lastName").distinct()).size());

assertEquals(users.size(),
userDao.prepareNamedQueryForBigResult(CF.criteria().where(CF.notEqual("firstName", "aaaaaa")).orderBy("firstName", "lastName").distinct())
.list()
.size());

assertEquals(users.size(), userDao.batchDelete(users));

assertEquals(0, userDao.batchDeleteByIds(ids));
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.TYPE })
public @interface Cache {

/**
*
*
Original file line number Diff line number Diff line change
@@ -47,7 +47,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.PARAMETER })
public @interface Define {

/**
*
*
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.PARAMETER })
public @interface DefineList {

/**
*
*
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
@Target(value = { ElementType.METHOD, ElementType.TYPE })
@Repeatable(HandlerList.class)
public @interface Handler {

/**
*
*
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.METHOD, ElementType.TYPE })
public @interface HandlerList {

/**
*
*
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@
@Target(value = { ElementType.METHOD })
@Deprecated
public @interface OnDelete {

/**
*
*
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface OutParameterList {

/**
*
*
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(value = { ElementType.METHOD, ElementType.TYPE })
public @interface SqlLogEnabled {

/**
*
*
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD) // Should be used on method only, not for ElementType.TYPE/CLASS
public @interface Transactional {

/**
*
*
16 changes: 8 additions & 8 deletions src/main/java/com/landawn/abacus/jdbc/dao/DaoUtil.java
Original file line number Diff line number Diff line change
@@ -280,55 +280,55 @@ static Tuple2<Throwables.BiFunction<Collection<String>, Condition, PreparedQuery
if (PSC.class.isAssignableFrom(sbc)) {
tp = Tuple.of((selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? PSC.selectFrom(targetEntityClass) : PSC.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareQueryFunc.apply(dao.dataSource(), sp);
}, (selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? NSC.selectFrom(targetEntityClass) : NSC.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareNamedQueryFunc.apply(dao.dataSource(), sp);
});
} else if (PAC.class.isAssignableFrom(sbc)) {
tp = Tuple.of((selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? PAC.selectFrom(targetEntityClass) : PAC.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareQueryFunc.apply(dao.dataSource(), sp);
}, (selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? NAC.selectFrom(targetEntityClass) : NAC.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareNamedQueryFunc.apply(dao.dataSource(), sp);
});
} else if (PLC.class.isAssignableFrom(sbc)) {
tp = Tuple.of((selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? PLC.selectFrom(targetEntityClass) : PLC.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareQueryFunc.apply(dao.dataSource(), sp);
}, (selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? NLC.selectFrom(targetEntityClass) : NLC.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareNamedQueryFunc.apply(dao.dataSource(), sp);
});
} else if (PSB.class.isAssignableFrom(sbc)) {
tp = Tuple.of((selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? PSB.selectFrom(targetEntityClass) : PSB.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareQueryFunc.apply(dao.dataSource(), sp);
}, (selectPropNames, cond) -> {
final SP sp = (selectPropNames == null ? NSB.selectFrom(targetEntityClass) : NSB.select(selectPropNames).from(targetEntityClass))
.where(cond)
.append(cond)
.pair();

return prepareNamedQueryFunc.apply(dao.dataSource(), sp);

0 comments on commit fa2692e

Please sign in to comment.