Skip to content

Commit

Permalink
Merge branch 'doc' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
babyfish-ct committed May 28, 2023
2 parents e02ed83 + 1a81b7e commit 3253b9a
Show file tree
Hide file tree
Showing 19 changed files with 1,811 additions and 63 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.71'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.73'
// highlight-next-line
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
// 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.71")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.73")
// highlight-next-line
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.71")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.73")
// 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"
depdencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.73'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
}
```

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

Expand All @@ -42,7 +42,7 @@ depdencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.71</version>
<version>0.7.73</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.71")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.73")

// Step3: Apply ksp plugin
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.71")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.73")
}

// 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.71</version>
<version>0.7.73</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.71</version>
<version>0.7.73</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"
depdencies {
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.73'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -44,7 +44,7 @@ depdencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-sql</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -65,7 +65,7 @@ depdencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -87,10 +87,10 @@ plugins {
depdencies {

// Step2: Add jimmer-sql-kotlin
implementation("org.babyfish.jimmer:jimmer-sql-kotlin:0.7.71")
implementation("org.babyfish.jimmer:jimmer-sql-kotlin:0.7.73")

// Step3: Apply ksp plugin
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.71")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.73")

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.71</version>
<version>0.7.73</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.71</version>
<version>0.7.73</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.71'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.73'
// highlight-next-line
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
// 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.71")
implementation("org.babyfish.jimmer:jimmer-core-kotlin:0.7.73")
// highlight-next-line
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.71")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.73")
// 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"
depdencies {
implementation 'org.babyfish.jimmer:jimmer-core:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
implementation 'org.babyfish.jimmer:jimmer-core:0.7.73'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -29,7 +29,7 @@ depdencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-core</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</dependency>
</dependencies>

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

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

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

...ommit other dependency...
}
Expand All @@ -91,7 +91,7 @@ kotlin {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-core-kotlin</artifactId>
<version>0.7.71</version>
<version>0.7.73</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.71</version>
<version>0.7.73</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"
depdencies {
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
implementation 'org.babyfish.jimmer:jimmer-sql:0.7.73'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -44,7 +44,7 @@ depdencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-sql</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -65,7 +65,7 @@ depdencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -87,10 +87,10 @@ plugins {
depdencies {

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

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

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.71</version>
<version>0.7.73</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.71</version>
<version>0.7.73</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"
depdencies {
implementation 'org.babyfish.jimmer:jimmer-spring-boot-starter-:0.7.71'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.71'
implementation 'org.babyfish.jimmer:jimmer-spring-boot-starter-:0.7.73'
annotationProcessor 'org.babyfish.jimmer:jimmer-apt:0.7.73'
runtimeOnly 'com.h2database:h2:2.1.212'
}
Expand All @@ -41,7 +41,7 @@ depdencies {
<dependency>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-spring-boot-starter</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
Expand All @@ -62,7 +62,7 @@ depdencies {
<path>
<groupId>org.babyfish.jimmer</groupId>
<artifactId>jimmer-apt</artifactId>
<version>0.7.71</version>
<version>0.7.73</version>
</path>
</annotationProcessorPaths>
</configuration>
Expand All @@ -82,8 +82,8 @@ plugins {
}
depdencies {

implementation("org.babyfish.jimmer:jimmer-spring-boot-starter:0.7.71")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.71")
implementation("org.babyfish.jimmer:jimmer-spring-boot-starter:0.7.73")
ksp("org.babyfish.jimmer:jimmer-ksp:0.7.73")

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.71</version>
<version>0.7.73</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.71</version>
<version>0.7.73</version>
</dependency>
</dependencies>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
---
sidebar_position: 6
title: 计算属性
---
---

在这里,你会了解到Jimmer的计算属性,以及注解:

- org.babyfish.jimmer.sql.Formula

简单计算属性,可以是Java/Kotlin表达式,也可以是SQL表达式

- org.babyfish.jimmer.sql.Transient

复杂计算属性,具备如下特征

- 不仅可以是计算简单值,还可以是关联计算值。即,计算属性可以是关联属性

- 可以使用任意复杂的计算规则,例如,利用和当前关系型数据库无关的OLAP系统进行计算

:::caution
只有当一个计算指标和隶属于某个实体,才定义计算属性。

如果计算指标不隶属于任何实体,则应该设计称全局的Service API。
:::
Loading

0 comments on commit 3253b9a

Please sign in to comment.