Skip to content

Commit

Permalink
save command
Browse files Browse the repository at this point in the history
babyfish-ct committed Dec 21, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent deea2e6 commit a185062
Showing 17 changed files with 465 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ merge into BOOK(
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

2 changes: 1 addition & 1 deletion docs/mutation/save-command/association/_merge-roots.mdx
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ merge into BOOK_STORE(
<TabItem value="mysql" label="Mysql">

:::caution
默认情况下,MySQL不会启用批量操作,而采用多条SQL。具体细节请参考[MySQL的问题](../mysql)
默认情况下,MySQL的批量操作不会被采用,而采用多条SQL。具体细节请参考[MySQL的问题](../mysql)
:::

1. ```sql
10 changes: 5 additions & 5 deletions docs/mutation/save-command/association/associated-save-mode.mdx
Original file line number Diff line number Diff line change
@@ -488,7 +488,7 @@ Two SQL statements will be generated:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

@@ -849,7 +849,7 @@ Two SQL statements will be generated:
<TabItem value="mysql" label="Mysql">
:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::
@@ -1041,7 +1041,7 @@ Two SQL statements will be generated:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

@@ -1367,7 +1367,7 @@ Finally, two SQL statements will be generated:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

@@ -1604,7 +1604,7 @@ Three SQL statements will be generated:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

6 changes: 3 additions & 3 deletions docs/mutation/save-command/association/classification.mdx
Original file line number Diff line number Diff line change
@@ -306,7 +306,7 @@ The generated SQL statements would be:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

@@ -648,7 +648,7 @@ This operation generates two SQL statements:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

@@ -983,7 +983,7 @@ Taking H2 as an example, it generates three SQL statements:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

2 changes: 1 addition & 1 deletion docs/mutation/save-command/association/owner.mdx
Original file line number Diff line number Diff line change
@@ -368,7 +368,7 @@ Executing this code will generate the following SQL and result in an exception:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

6 changes: 3 additions & 3 deletions docs/mutation/save-command/investigation.mdx
Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ This code will generate the following two SQL statements:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](../mysql)
:::

@@ -298,7 +298,7 @@ This code will generate the following two SQL statements:
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](./mysql)
:::

@@ -578,7 +578,7 @@ This code will generate two SQL statements
<TabItem value="mysql" label="Mysql">

:::caution
By default, MySQL does not enable batch operations and uses multiple SQL statements instead.
By default, MySQL batch operations are not used.
For specific details, please refer to [MySQL Issues](./mysql)
:::

2 changes: 1 addition & 1 deletion docs/mutation/save-command/mysql.mdx
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ As emphasized in previous articles, Jimmer does not enable batch queries for MyS
It provides no performance benefits and is essentially no different from using multiple individual SQL statements.
:::

2. Once MySQL's batch operations are actually enabled, necessary return information is lost, such as:
2. Once MySQL's batch operations are really enabled, necessary return information is lost, such as:

- Cannot return JDBC's `generatedKeys`, which means the id of entities without an id property cannot be automatically filled.
This is a very important and common requirement for id allocation strategies based on SQL identity.
Loading

0 comments on commit a185062

Please sign in to comment.