Skip to content

Commit a1d875a

Browse files
Release 2.0.0 (#161)
2 parents 8e506cf + 6ef84f3 commit a1d875a

File tree

236 files changed

+4204
-4138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+4204
-4138
lines changed

.github/renovate.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": [
4-
"github>rainbowdashlabs/rainbowdashlabs"
5-
]
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>rainbowdashlabs/rainbowdashlabs"
5+
]
66
}

.github/workflows/javadocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Set up JDK 15
14+
- name: Set up JDK 17
1515
uses: actions/setup-java@v4
1616
with:
1717
distribution: adopt
18-
java-version: 15
18+
java-version: 17
1919
- name: Build Javadocs
2020
run: |
2121
echo "Building javadocs with gradle"

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Set up JDK 15
18+
- name: Set up JDK 17
1919
uses: actions/setup-java@v4
2020
with:
2121
distribution: adopt
22-
java-version: 15
22+
java-version: 17
2323
- name: Test with Gradle
2424
run: ./gradlew --build-cache test
2525
- name: Publish to Maven Central

.github/workflows/verify.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Verify state
22

3-
on: [push, pull_request]
3+
on: [ push, pull_request ]
44

55
jobs:
66
build:
@@ -9,10 +9,10 @@ jobs:
99

1010
steps:
1111
- uses: actions/checkout@v4
12-
- name: Set up JDK 15
12+
- name: Set up JDK 17
1313
uses: actions/setup-java@v4
1414
with:
1515
distribution: adopt
16-
java-version: 15
16+
java-version: 17
1717
- name: Test with Gradle
1818
run: ./gradlew --build-cache test

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Hello and welcome new contributor.
22

33
# Issues
4+
45
Please make sure to describe your issue as precisely as possible.
56

67
# Pull Requests
8+
79
When you create a new pull request you have to take care of a few things.
810

911
- Create a feature branch based on the development branch

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,25 @@ SADU offers support for four different databases at the moment. To use them simp
3333
- `sadu-sqlite`
3434

3535
## Querybuilder
36+
3637
SADU offers a query builder to manage resources, error handling, result set reading and dispatching of queries.
3738

3839
to use it import: `sadu-queries`
3940

40-
Learn how to use the query builder [here](https://github.com/RainbowDashLabs/sadu/wiki/SADU-Queries)
41+
Learn how to use the query builder [here](https://sadu.docs.chojo.dev/queries/)
4142

4243
### But why should I use it?
4344

4445
Before I give you a long talk about how much nicer the syntax and code is let me simple show you a comparison.
4546

4647
Without the query builder your code would ideally look like this:
48+
4749
```java
4850
class MyQueries {
49-
51+
5052
DataSource dataSource;
51-
52-
MyQueries(DataSource dataSource){
53+
54+
MyQueries(DataSource dataSource) {
5355
this.dataSource = dataSource;
5456
}
5557

@@ -71,17 +73,13 @@ class MyQueries {
7173
```
7274

7375
But using the query builder your code becomes this:
74-
```java
75-
class MyQueries extends QueryFactory {
76-
MyQueries(DataSource dataSource){
77-
super(dataSource);
78-
}
7976

80-
public CompletableFuture<Optional<Result>> getResultNew(int id) {
81-
return builder(Result.class)
82-
.query("SELECT result FROM results WHERE id = ?")
83-
.parameters(stmt -> stmt.setInt(id))
84-
.readRow(rs -> new Result(rs.getString("result")))
77+
```java
78+
class MyQueries {
79+
public Optional<Result> getResultNew(int id) {
80+
return Query.query("SELECT result FROM results WHERE id = ?")
81+
.single(Call.of().bind(id))
82+
.map(row -> new Result(rs.getString("result")))
8583
.first();
8684
}
8785
}
@@ -90,25 +88,27 @@ class MyQueries extends QueryFactory {
9088
Beautiful isnt it? The query builder will enforce try with resources, set parameters in the order defined by you,
9189
read the result set and additionally handle the exceptions for you.
9290

93-
[How does it work?](https://github.com/RainbowDashLabs/sadu/wiki/SADU-Queries#how-does-it-work)
91+
[How does it work?](https://sadu.docs.chojo.dev/queries/)
9492

9593
## Datasource Builder
94+
9695
SADU offsers a data source builder to create data sources for the databases listed above.
9796

9897
to use it import: `sadu-datasource`
9998

10099
Note that in order to use this, you need at least one of the listed databases from above.
101100

102-
Learn how to use the datasource builder [here](https://github.com/RainbowDashLabs/sadu/wiki/SADU-Datasource)
101+
Learn how to use the datasource builder [here](https://sadu.docs.chojo.dev/data_source/)
103102

104103
## Updater
105104

106105
SADU offers a simple sql updater which deploys upgrade and migration scripts to your database.
107106

108107
to use it import: `sadu-updater`
109108

110-
Learn how to use it [here](https://github.com/RainbowDashLabs/sadu/wiki/SADU-Updater)
109+
Learn how to use it [here](https://sadu.docs.chojo.dev/updater/)
111110

112111

113112
[nexus_releases]: https://search.maven.org/search?q=de.chojo.sadu
113+
114114
[nexus_snapshots]: https://s01.oss.sonatype.org/#nexus-search;quick~de.chojo.sadu

build.gradle.kts

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ plugins {
1515

1616
publishData {
1717
useEldoNexusRepos(false)
18-
publishingVersion = "1.4.1"
18+
publishingVersion = "2.0.0"
1919
}
2020

2121
group = "de.chojo.sadu"
@@ -49,8 +49,8 @@ subprojects {
4949

5050
indra {
5151
javaVersions {
52-
target(15)
53-
testWith(15)
52+
target(17)
53+
testWith(17)
5454
}
5555

5656
github("rainbowdashlabs", "sadu") {
@@ -79,8 +79,8 @@ subprojects {
7979

8080
indra {
8181
javaVersions {
82-
target(15)
83-
testWith(15)
82+
target(17)
83+
testWith(17)
8484
}
8585

8686
github("rainbowdashlabs", "sadu") {
@@ -122,8 +122,8 @@ allprojects {
122122

123123

124124
dependencies {
125-
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.10.1")
126-
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.10.1")
125+
testImplementation("org.junit.jupiter", "junit-jupiter-api", "5.10.2")
126+
testRuntimeOnly("org.junit.jupiter", "junit-jupiter-engine", "5.10.2")
127127
testImplementation("org.mockito", "mockito-core", "5.+")
128128
}
129129

@@ -157,7 +157,6 @@ allprojects {
157157
fun applyJavaDocOptions(options: MinimalJavadocOptions) {
158158
val javaDocOptions = options as StandardJavadocDocletOptions
159159
javaDocOptions.links(
160-
"https://javadoc.io/doc/com.google.code.findbugs/jsr305/latest/",
161160
"https://javadoc.io/doc/org.jetbrains/annotations/latest/",
162161
"https://docs.oracle.com/en/java/javase/${java.toolchain.languageVersion.get().asInt()}/docs/api/"
163162
)
@@ -167,7 +166,7 @@ tasks {
167166
register<Javadoc>("alljavadoc") {
168167
applyJavaDocOptions(options)
169168

170-
destinationDir = file("${layout.buildDirectory}/docs/javadoc")
169+
setDestinationDir(file("${layout.buildDirectory}/docs/javadoc"))
171170
val projects = project.rootProject.allprojects.filter { p -> !p.name.contains("example") }
172171
setSource(projects.map { p -> p.sourceSets.main.get().allJava })
173172
classpath = files(projects.map { p -> p.sourceSets.main.get().compileClasspath })

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

sadu-core/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ description = "SADU core module, containing common logic between modules."
33
dependencies {
44
api(libs.slf4j.api)
55
api("org.jetbrains", "annotations", "24.1.0")
6-
api("com.google.code.findbugs", "jsr305", "3.0.2")
76
}

sadu-core/src/main/java/de/chojo/sadu/base/DataSourceProvider.java renamed to sadu-core/src/main/java/de/chojo/sadu/core/base/DataSourceProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (C) RainbowDashLabs and Contributor
55
*/
66

7-
package de.chojo.sadu.base;
7+
package de.chojo.sadu.core.base;
88

99
import javax.sql.DataSource;
1010

0 commit comments

Comments
 (0)