Skip to content

Commit

Permalink
Merge pull request #65 from Fs-DXMY/patch-2
Browse files Browse the repository at this point in the history
修复错别字及语法错误
  • Loading branch information
babyfish-ct authored Nov 12, 2024
2 parents a79e2f8 + 7a3a604 commit ec7e9a2
Show file tree
Hide file tree
Showing 130 changed files with 383 additions and 383 deletions.
2 changes: 1 addition & 1 deletion docs/_shared/dissociate-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ dangling pseudo foreign keys of child objects are allowed
<td>SET_NULL</td>
<td>
Set the foreign key of the disassociated child object to null.
The prerequisite is that the many-to-one associated propety of the child object is nullable; otherwise, attempting this configuration will lead to an exception.
The prerequisite is that the many-to-one associated property of the child object is nullable; otherwise, attempting this configuration will lead to an exception.
</td>
</tr>
<tr>
Expand Down
10 changes: 5 additions & 5 deletions docs/_shared/fetch/recursion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ val rootNode = sqlClient
export yourpackage.TreeNode
-> package yourpackage.dto;

RecurisveTreeNodeView {
RecursiveTreeNodeView {
id
// Recursion upwards
// highlight-next-line
Expand All @@ -72,7 +72,7 @@ RecurisveTreeNodeView {
}
```

After compilation, Java/Kotlin type `RecurisveTreeNodeView` will be automatically generated.
After compilation, Java/Kotlin type `RecursiveTreeNodeView` will be automatically generated.

</td>
</tr>
Expand All @@ -85,9 +85,9 @@ After compilation, Java/Kotlin type `RecurisveTreeNodeView` will be automaticall
<TabItem value="java" label="Java">

```java
RecurisveTreeNodeView rootNode = sqlClient
RecursiveTreeNodeView rootNode = sqlClient
.findById(
RecurisveTreeNodeView.class,
RecursiveTreeNodeView.class,
10L
);
```
Expand All @@ -98,7 +98,7 @@ RecurisveTreeNodeView rootNode = sqlClient
```kotlin
val rootNode = sqlClient
.findById(
RecurisveTreeNodeView::class,
RecursiveTreeNodeView::class,
10L
);
```
Expand Down
4 changes: 2 additions & 2 deletions docs/_shared/immutable-problem.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Let's implement three data change operations in order from simple to complex to
1. Change the name property of the root node

<Tabs groupId="language">
<TabItem value="java" lable="Java">
<TabItem value="java" label="Java">

```java
TreeNode newTreeNode = new TreeNode(
Expand All @@ -62,7 +62,7 @@ Let's implement three data change operations in order from simple to complex to
```

</TabItem>
<TabItem value="kotlin" lable="Kotlin">
<TabItem value="kotlin" label="Kotlin">

```kotlin
val newTreeNode = oldTreeNode.copy(
Expand Down
12 changes: 6 additions & 6 deletions docs/_shared/immutable-step.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ TreeNode treeNode = Immutables.createTreeNode(root -> {
.addIntoChildNodes(drink -> {
drink
.setName("Drink")
.addIntoChildNodes(cococola -> {
cococola.setName("Cococola");
.addIntoChildNodes(cocacola -> {
cocacola.setName("Cocacola");
})
.addIntoChildNodes(fanta -> {
fanta.setName("Fanta");
Expand All @@ -90,7 +90,7 @@ val treeNode = TreeNode {
childNodes().addBy {
name = "Drinks"
childNodes().addBy {
name = "Cococola"
name = "Cocacola"
}
childNodes().addBy {
name = "Fanta"
Expand All @@ -116,8 +116,8 @@ TreeNode newTreeNode = Immutables.createTreeNode(
root
.childNodes(false).get(0) // Food
.childNodes(false).get(0) // Drink
.childNodes(false).get(0) // Cococola
.setName("Cococola plus");
.childNodes(false).get(0) // Cocacola
.setName("Cocacola plus");
}
);

Expand Down Expand Up @@ -146,7 +146,7 @@ System.out.println("newTreeNode:" + newTreeNode);
val newTreeNode = treeNode.copy {
childNodes()[0] // Food
.childNodes()[0] // Drinks
.childNodes()[0] // Cococola
.childNodes()[0] // Cocacola
.name += " plus"
}

Expand Down
2 changes: 1 addition & 1 deletion docs/cache/cache-type/calculation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ println(stores)

Thus, the two `BookStore` objects can obtain the average price of their respective books through their calculated property `BookStore.avgPrice`.

Undoubtedly, before the data in Redis expires, executing the Java/Kotlin code above again will directly return the caculated data from Redis without generating the second SQL statement.
Undoubtedly, before the data in Redis expires, executing the Java/Kotlin code above again will directly return the calculated data from Redis without generating the second SQL statement.

Finally, Jimmer concatenates the results of the 3 steps as the final data returned to the user:

Expand Down
4 changes: 2 additions & 2 deletions docs/cache/cache-type/object.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ If you don't want to support object cache for some entity types, just return nul
```java
@Override
public Cache<?, ?> createObjectCache(ImmutableType type) {
if (type.getJavaClass() == SomeEnitity.class) {
if (type.getJavaClass() == SomeEntity.class) {
// highlight-next-line
return null;
}
Expand All @@ -112,7 +112,7 @@ public Cache<?, ?> createObjectCache(ImmutableType type) {

```kotlin
override fun createObjectCache(type: ImmutableType): Cache<*, *>? =
if (type.javaClass === SomeEnitity::class.java) {
if (type.javaClass === SomeEntity::class.java) {
// highlight-next-line
null
} else {
Expand Down
2 changes: 1 addition & 1 deletion docs/cache/enable-cache.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public CacheFactory cacheFactory(
private Cache<?, ?> createPropCache(
ImmutableProp prop,
Duration caffeineDuration
Duration redisduration
Duration redisDuration
) {
return new ChainCacheBuilder<K, V>()
.add(
Expand Down
2 changes: 1 addition & 1 deletion docs/cache/multiview-cache/user-filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ The `RedisHashBinder` class in the above code is a very important implementation
<tr>
<td rowspan="2">
Cache with self-loading
<div><i>(usually first-level cache technologies like Guava, Caffine)</i></div>
<div><i>(usually first-level cache technologies like Guava, Caffeine)</i></div>
</td>
<td>
Single-view
Expand Down
2 changes: 1 addition & 1 deletion docs/client/api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ data class ActiveAuthorInfo(
) {
companion object {

private val AUTHOR_FECHER =
private val AUTHOR_FETCHER =
newFetcher(Author::class) {
firstName()
lastName()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class UUIDScalarProvider extends AbstractScalarProvider<UUID, String> {
```kotlin title="UUIDScalarProvider.kt"
class UUIDScalarProvider : ScalarProvider<UUID, String> {

override fun toScalar(sqlValue: Strng): UUID =
override fun toScalar(sqlValue: String): UUID =
UUID.fromString(sqlValue)

override fun toSql(scalarValue: UUID): String =
Expand Down
14 changes: 7 additions & 7 deletions docs/graphql/mutation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Using the DTO language can achieve our goal very efficiently, so this article ad

1. **In the project where the entity is defined**, create the directory `src/main/dto`

2. Under `src/main/dto`, create subdirectories `com/yourcompany/yourpoject/model` according to the package path where the entities are located
2. Under `src/main/dto`, create subdirectories `com/yourcompany/yourproject/model` according to the package path where the entities are located

3. Under the directory created in the previous step, create the file `Book.dto`. The file must have the same name as the entity class and the extension must be `dto`

Expand All @@ -81,7 +81,7 @@ After compilation, the following Input DTO will be generated automatically:
<TabItem value="java" label="Java">

```java title="BookInput.java"
@GenertedBy(file = "<your_project>/src/main/dto/Book.dto")
@GeneratedBy(file = "<your_project>/src/main/dto/Book.dto")
public class BookInput implements Input<Book> { ❶

@Nullable
Expand Down Expand Up @@ -111,7 +111,7 @@ public class BookInput implements Input<Book> { ❶
<TabItem value="kotlin" label="Kotlin">

```kotlin title="BookInput.kt"
@GenertedBy(file = "<your_project>/src/main/dto/Book.dto")
@GeneratedBy(file = "<your_project>/src/main/dto/Book.dto")
data class BookInput(
val id: Long? = null,
val name: String = "",
Expand Down Expand Up @@ -153,10 +153,10 @@ import org.springframework.stereotype.Controller;
@Controller
public class BookStoreService {

private final BookStoreRepsitory bookStoreRepsitory;
private final BookStoreRepository bookStoreRepository;

public BookStoreService(BookStoreRepsitory bookStoreRepsitory) {
this.bookStoreRepsitory = bookStoreRepsitory;
public BookStoreService(BookStoreRepository bookStoreRepository) {
this.bookStoreRepository = bookStoreRepository;
}

@MutationMapping
Expand Down Expand Up @@ -185,7 +185,7 @@ import org.springframework.stereotype.Controller

@Controller
class BookStoreService(
private val bookStoreRepository: BookStoreRepsitory
private val bookStoreRepository: BookStoreRepository
) {

@MutationMapping ❶
Expand Down
2 changes: 1 addition & 1 deletion docs/mapping/advanced/calculated/transient.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ interface BookStore {
</TabItem>
</Tabs>

Here, no parameters are specified for the `@Tranisent` annotation, so the current data is just custom user data unrelated to any ORM behavior.
Here, no parameters are specified for the `@Transient` annotation, so the current data is just custom user data unrelated to any ORM behavior.

:::caution
Only when parameters are specified for the `@Transient` annotation will the current property be a complex calculation property.
Expand Down
2 changes: 1 addition & 1 deletion docs/mapping/advanced/join-sql.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Unless legacy database compatibility is required, do not perform non-structural

- Cannot be used as [Remote Association](./remote)

- Cannot participate in [Dynmaic Join Optimization](../../query/dynamic-join/optimization)
- Cannot participate in [Dynamic Join Optimization](../../query/dynamic-join/optimization)

- Cannot use [Association Cache](../../cache/cache-type/association)

Expand Down
4 changes: 2 additions & 2 deletions docs/mapping/advanced/json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ interface Book {

### Use Low-level API

Developers can configure the ObjectMapper for JSON serialization/deserialization of properties decorated with `@Seralized`.
Developers can configure the ObjectMapper for JSON serialization/deserialization of properties decorated with `@Serialized`.

<Tabs groupId="language">
<TabItem value="java" label="Java">
Expand Down Expand Up @@ -192,7 +192,7 @@ Configuration precedence: ❸ > ❷ > ❶

### Use Spring Boot Starter

If using the Spring Boot Starter, the SqlClient is created automatically, but users can change the configuration before SqlClient is created via `Customizer/KCoustomizer`:
If using the Spring Boot Starter, the SqlClient is created automatically, but users can change the configuration before SqlClient is created via `Customizer/KCustomizer`:

<Tabs groupId="language">
<TabItem value="java" label="Java">
Expand Down
4 changes: 2 additions & 2 deletions docs/mapping/advanced/key.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ The unique constraint defined by `@Key` is only for non-hidden data, not all dat
:::caution
Unfortunately, not all databases support conditional indexes, and the syntax for creating conditional index varies between databases.

Here, PostgreSQL is used as an example:
Here, PostgresSQL is used as an example:
:::

```sql
Expand All @@ -136,7 +136,7 @@ The unique constraint defined by `@Key` is only for non-hidden data, not all dat

## Dynamic Overrides

Confiugration specified by the annotation `@Key` is called static configuration.
Configuration specified by the annotation `@Key` is called static configuration.

Sometimes, different businesses may have different requirements for `@Key`. Therefore, `@Key` configurations can be dynamically overridden at runtime.

Expand Down
8 changes: 4 additions & 4 deletions docs/mapping/advanced/logical-deleted/join-table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ val authors: List<Author>
columnName = "STATE",
type = int.class,
value = "1",
intializedValue = "0"
initializedValue = "0"
)
)
List<Author> authors();
Expand All @@ -151,7 +151,7 @@ List<Author> authors();
columnName = "STATE",
type = int.class,
value = "1",
intializedValue = "0"
initializedValue = "0"
)
)
val authors: List<Author>
Expand All @@ -178,7 +178,7 @@ val authors: List<Author>
columnName = "STATE",
type = State.class,
value = "DELETED",
intializedValue = "INITIALIZED"
initializedValue = "INITIALIZED"
)
)
List<Author> authors();
Expand All @@ -196,7 +196,7 @@ List<Author> authors();
columnName = "STATE",
type = State.class,
value = "DELETED",
intializedValue = "INITIALIZED"
initializedValue = "INITIALIZED"
)
)
val authors: List<Author>
Expand Down
4 changes: 2 additions & 2 deletions docs/mapping/advanced/on-dissociate.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ interface Book {
:::info
Although disassociation of child objects is caused by a one-to-many association *(or inverse one-to-one)* *(that is, the parent object abandons some child objects. The one-to-many association here is `BookStore.books`)*, the disassociation mode is configured for the inverse many-to-one association *(here `Book.store`)*. This design is to maintain similarity with configuring cascade properties of foreign keys in database DDLs.

For Jimmr, a one-to-many association must be bidirectional, so the many-to-one association that is the mirror image of a known one-to-many association is always known. So there is no problem with this design.
For Jimmer, a one-to-many association must be bidirectional, so the many-to-one association that is the mirror image of a known one-to-many association is always known. So there is no problem with this design.
:::

## Dissociation Modes
Expand All @@ -122,7 +122,7 @@ This article only introduces the configuration of OnDissociate. For how to use i

## Dynamic Overrides

Confiugration specified by the annotation `@OnDissociate` is called static configuration.
Configuration specified by the annotation `@OnDissociate` is called static configuration.

Sometimes, different businesses may have different requirements for dissociation operations. Therefore, dissociation configurations can be dynamically overridden at runtime.

Expand Down
20 changes: 10 additions & 10 deletions docs/mapping/advanced/remote.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ As a super type, `MappedSuperclass` has two usages:
<Tabs groupId="language">
<TabItem value="java" label="Java">

```java title="BookServiceCommonEnity.java"
```java title="BookServiceCommonEntity.java"
// highlight-next-line
@MappedSuperclass(microServiceName = "book-service")
public interface BookServiceCommonEnity {
public interface BookServiceCommonEntity {

LocalDateTime createdTime();

Expand All @@ -125,10 +125,10 @@ As a super type, `MappedSuperclass` has two usages:
</TabItem>
<TabItem value="kotlin" label="Kotlin">

```kotlin title="BookServiceCommonEnity.kt"
```kotlin title="BookServiceCommonEntity.kt"
// highlight-next-line
@MappedSuperclass(microServiceName = "book-service")
interface BookServiceCommonEnity {
interface BookServiceCommonEntity {

val createdTime: LocalDateTime

Expand All @@ -145,17 +145,17 @@ As a super type, `MappedSuperclass` has two usages:
</TabItem>
</Tabs>

Here `BookServiceCommonEnity` contains association properties `createdBy` and `modifiedBy`, but only `Entity` or other `MappedSuperclass` belonging to the microservice "book-service" can inherit it.
Here `BookServiceCommonEntity` contains association properties `createdBy` and `modifiedBy`, but only `Entity` or other `MappedSuperclass` belonging to the microservice "book-service" can inherit it.

- Can span any microservices, but must not contain association properties

<Tabs groupId="language">
<TabItem value="java" label="Java">

```java title="CommonEnity.java"
```java title="CommonEntity.java"
// highlight-next-line
@MappedSuperclass(acrossMicroServices = true)
public interface CommonEnity {
public interface CommonEntity {

LocalDateTime createdTime();

Expand All @@ -166,10 +166,10 @@ As a super type, `MappedSuperclass` has two usages:
</TabItem>
<TabItem value="kotlin" label="Kotlin">

```kotlin title="CommonEnity.kt"
```kotlin title="CommonEntity.kt"
// highlight-next-line
@MappedSuperclass(acrossMicroServices = true)
interface CommonEnity {
interface CommonEntity {

val createdTime: LocalDateTime

Expand All @@ -180,4 +180,4 @@ As a super type, `MappedSuperclass` has two usages:
</TabItem>
</Tabs>

Here `CommonEnity` can span any microservices. Any `Entity` or other `MappedSuperclass` under any microservice can inherit it, but it itself does not contain any association properties.
Here `CommonEntity` can span any microservices. Any `Entity` or other `MappedSuperclass` under any microservice can inherit it, but it itself does not contain any association properties.
Loading

0 comments on commit ec7e9a2

Please sign in to comment.