Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
babyfish-ct committed Jul 17, 2023
1 parent 3d70e8c commit ce3c826
Show file tree
Hide file tree
Showing 14 changed files with 380 additions and 115 deletions.
8 changes: 4 additions & 4 deletions doc/docs/jimmer-core/draft.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ Due to the existence of Annotation Processor/KSP plugin in the gradle configurat
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.121'
// highlight-next-line
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
// This annotation processor generates source code
// for INTERFACEs marked by
// `@org.babyfish.jimmer.Immutable` or
Expand All @@ -84,9 +84,9 @@ plugins {
}
dependencies {

implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.118")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.121")
// highlight-next-line
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")
// The ksp plugin generates source code
// for INTERFACEs marked by
// `@org.babyfish.jimmer.Immutable` or
Expand Down
16 changes: 8 additions & 8 deletions doc/docs/jimmer-core/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import TabItem from '@theme/TabItem';
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.121'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
}
```

Expand All @@ -27,7 +27,7 @@ dependencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-core</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>

Expand All @@ -42,7 +42,7 @@ dependencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -64,10 +64,10 @@ plugins {
dependencies {

// Step2: Add jimmer-core-kotlin
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.118")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.121")

// Step3: Apply ksp plugin
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")
}

// Step4: Add generated sources into compile path.
Expand All @@ -87,7 +87,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-core-kotlin</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>

<build>
Expand Down Expand Up @@ -129,7 +129,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-ksp</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>
</plugin>
Expand Down
16 changes: 8 additions & 8 deletions doc/docs/jimmer-sql/basic/usage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ If you want more details on using jimmer in a non-spring environment, you can co
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.121'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -44,7 +44,7 @@ dependencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-sql</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -65,7 +65,7 @@ dependencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -87,10 +87,10 @@ plugins {
dependencies {

// Step2: Add jimmer-sql-kotlin
implementation("org.babyfish.jimmer:jimmer-sql-kotlin:0.7.118")
implementation("org.babyfish.jimmer:jimmer-sql-kotlin:0.7.121")

// Step3: Apply ksp plugin
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")

runtimeOnly("com.h2database:h2:2.1.212")

Expand All @@ -114,7 +114,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-sql-kotlin</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -162,7 +162,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-ksp</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ interface TreeNode {
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.121'
// highlight-next-line
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
// This annotation processor generates source code
// for INTERFACEs marked by
// `@org.babyfish.jimmer.Immutable` or
Expand All @@ -84,9 +84,9 @@ plugins {
}
dependencies {

implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.118")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.121")
// highlight-next-line
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")
// The ksp plugin generates source code
// for INTERFACEs marked by
// `@org.babyfish.jimmer.Immutable` or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import TabItem from '@theme/TabItem';
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.121'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -29,7 +29,7 @@ dependencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-core</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>

Expand All @@ -44,7 +44,7 @@ dependencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -66,10 +66,10 @@ plugins {
dependencies {

// 第二步: 添加jimmer-core-kotlin
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.118")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.121")

// 第三步: 应用ksp插件
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")

...ommit other dependency...
}
Expand All @@ -91,7 +91,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-core-kotlin</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>

<build>
Expand Down Expand Up @@ -133,7 +133,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-ksp</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jimmer-sql内容相对较多,后续文章会逐步讲解。本文对其部分
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.121'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -44,7 +44,7 @@ dependencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-sql</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -65,7 +65,7 @@ dependencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -87,10 +87,10 @@ plugins {
dependencies {

// 第二步: 添加jimmer-sql-kotlin
implementation("org.babyfish.jimmer:jimmer-sql-kotlin:0.7.118")
implementation("org.babyfish.jimmer:jimmer-sql-kotlin:0.7.121")

// 第三步: 应用ksp插件
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")

runtimeOnly("com.h2database:h2:2.1.212")

Expand All @@ -116,7 +116,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-sql-kotlin</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -165,7 +165,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-ksp</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ title: 使用spring boot starter
```groovy title="build.gradle"
dependencies {
implementation 'org.babyfish.jimmer:jimmer-spring-boot-starter-:0.7.118'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.118'
implementation 'org.babyfish.jimmer:jimmer-spring-boot-starter-:0.7.121'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.121'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -41,7 +41,7 @@ dependencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-spring-boot-starter</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -62,7 +62,7 @@ dependencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -82,8 +82,8 @@ plugins {
}
dependencies {

implementation("org.babyfish.jimmer:jimmer-spring-boot-starter:0.7.118")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.118")
implementation("org.babyfish.jimmer:jimmer-spring-boot-starter:0.7.121")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.121")

runtimeOnly("com.h2database:h2:2.1.212")

Expand All @@ -109,7 +109,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-spring-boot-starter</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand Down Expand Up @@ -158,7 +158,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-ksp</artifactId>
<version>0.7.118</version>
<version>0.7.121</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ class BookStoreAvgPriceResolver(
</TabItem>
</Tabs>

- ❶ 过滤`BOOK`表的外建`STORE_ID`,限定查询范围,仅对当前需要计算的书店计算其下书籍的平均价格,而非数据库中所有书店
- ❶ 过滤`BOOK`表的外键`STORE_ID`,限定查询范围,仅对当前需要计算的书店计算其下书籍的平均价格,而非数据库中所有书店

- ❷ 按照`BOOK`表的外建`STORE_ID`分组
- ❷ 按照`BOOK`表的外键`STORE_ID`分组

- ❸ 把每组内部的书籍的价格求平均

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ sqlClient.update(

- NONE *(默认)*: 不支持脱勾操作,通过抛出异常阻止操作

- SET_NULL: 把被脱勾的子对象的外建设置为null。前提是子对象的多对一关联属性是nullable的;否则尝试此配置将会导致异常
- SET_NULL: 把被脱勾的子对象的外键设置为null。前提是子对象的多对一关联属性是nullable的;否则尝试此配置将会导致异常

- DELETE: 将被脱勾的子对象删除

Expand Down Expand Up @@ -298,12 +298,10 @@ sqlClient.update(
<TabItem value="kotlin" label="Kotlin">

```kotlin
sqlClient
.entities
.saveCommand(book)
sqlClient.save(book) {
// highlight-next-line
.setDissociateAction(Book::store, DissociateAction.SET_NULL)
.execute()
}
```

</TabItem>
Expand Down Expand Up @@ -441,7 +439,7 @@ sqlClient.update(
)
```

2. 将隶属`BookStore-2`且id不是9或10的所有书籍 *(本例为`Book-11```Book-11``)* 的外建清空
2. 将隶属`BookStore-2`且id不是9或10的所有书籍 *(本例为`Book-11```Book-11``)* 的外键清空

```sql
update BOOK
Expand Down
Loading

0 comments on commit ce3c826

Please sign in to comment.