Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 333a609

Browse files
committed
Add descriptions about Upsert
1 parent 81b4107 commit 333a609

File tree

2 files changed

+37
-21
lines changed

2 files changed

+37
-21
lines changed

docs/locale/ja/LC_MESSAGES/query/batch-insert.po

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: doma-docs\n"
44
"Report-Msgid-Bugs-To: \n"
5-
"POT-Creation-Date: 2024-03-17 13:53+0000\n"
6-
"PO-Revision-Date: 2024-03-19 14:05\n"
5+
"POT-Creation-Date: 2024-03-20 21:27+0900\n"
6+
"PO-Revision-Date: 2024-03-20 12:38\n"
77
"Last-Translator: \n"
88
"Language-Team: Japanese\n"
99
"MIME-Version: 1.0\n"
@@ -135,46 +135,54 @@ msgid "Identifier auto setting and version number auto setting are not executed
135135
msgstr "SQLファイルによるバッチ追加では、ID の自動設定、バージョン番号の自動設定は実行されません。また、 ``@BatchInsert`` 内の ``exclude`` プロパティおよび ``include`` プロパティは参照されません。"
136136

137137
#: ../../query/batch-insert.rst:130
138+
msgid "Batch upsert"
139+
msgstr ""
140+
141+
#: ../../query/batch-insert.rst:132
142+
msgid "you can specify whether to update or ignore using a ``duplicateKeyType`` property In case of duplication. By default, it is ``DuplicateKeyType.EXCEPTION`` , and an error will occur in case of duplicated. There are 3 types to choose from: ``DuplicateKeyType.UPDATE`` , ``DuplicateKeyType.IGNORE`` , ``DuplicateKeyType.EXCEPTION`` ."
143+
msgstr "``duplicateKeyType`` プロパティを使用することで、レコードが重複した場合に更新するか無視するかを指定できます。デフォルトでは ``DuplicateKeyType.EXCEPTION`` が使用され、重複時にエラーが発生することを表します。 ``duplicateKeyType`` プロパティには ``DuplicateKeyType.UPDATE`` , ``DuplicateKeyType.IGNORE`` , ``DuplicateKeyType.EXCEPTION`` の3つの中からいずれかを選択して指定できます。"
144+
145+
#: ../../query/batch-insert.rst:145
138146
msgid "Unique constraint violation"
139147
msgstr "一意制約違反"
140148

141-
#: ../../query/batch-insert.rst:132
149+
#: ../../query/batch-insert.rst:147
142150
msgid "``UniqueConstraintException`` is thrown regardless of with or without using sql file if unique constraint violation is occurred."
143151
msgstr "SQLファイルの使用の有無に関わらず、一意性制約違反が発生した場合は ``UniqueConstraintException`` がスローされます。"
144152

145-
#: ../../query/batch-insert.rst:135
153+
#: ../../query/batch-insert.rst:150
146154
msgid "Query timeout"
147155
msgstr "クエリタイムアウト"
148156

149-
#: ../../query/batch-insert.rst:137
157+
#: ../../query/batch-insert.rst:152
150158
msgid "You can specify seconds of query timeout to ``queryTimeout`` property within ``@BatchInsert`` annotation."
151159
msgstr "``@BatchInsert`` アノテーション内の ``queryTimeout`` プロパティにクエリタイムアウトの秒数を指定できます。"
152160

153-
#: ../../query/batch-insert.rst:144
161+
#: ../../query/batch-insert.rst:159
154162
msgid "This specifying is applied regardless of with or without using sql file. Query timeout that is specified in config class is used if ``queryTimeout`` property is not set value."
155163
msgstr "この指定はSQLファイルの使用の有無に関わらず適用されます。 ``queryTimeout`` プロパティに値が設定されていない場合は、:doc:`../config` クラスで指定されたクエリタイムアウトが使用されます。"
156164

157-
#: ../../query/batch-insert.rst:148
165+
#: ../../query/batch-insert.rst:163
158166
msgid "Batch size"
159167
msgstr "バッチサイズ"
160168

161-
#: ../../query/batch-insert.rst:150
169+
#: ../../query/batch-insert.rst:165
162170
msgid "You can specify batch size to ``batchSize`` property within ``@BatchInsert`` annotation."
163171
msgstr "バッチサイズは ``@BatchInsert`` アノテーション内の ``batchSize`` プロパティに指定できます。"
164172

165-
#: ../../query/batch-insert.rst:157
173+
#: ../../query/batch-insert.rst:172
166174
msgid "This specify is applied Regardless of using or not using SQL file. It you do not specify the value to ``batchSize`` property, batch size that is specified at :doc:`../config` class is applied."
167175
msgstr "この指定はSQLファイルの使用有無に関わらず適用されます。 ``batchSize`` プロパティに値を指定しない場合は、:doc:`../config` クラスで指定されたバッチサイズが適用されます。"
168176

169-
#: ../../query/batch-insert.rst:161
177+
#: ../../query/batch-insert.rst:176
170178
msgid "SQL log output format"
171179
msgstr "SQLログの出力形式"
172180

173-
#: ../../query/batch-insert.rst:163
181+
#: ../../query/batch-insert.rst:178
174182
msgid "You can specify SQL log output format to ``sqlLog`` property within ``@BatchInsert`` annotation."
175183
msgstr "``@BatchInsert`` アノテーション内の ``sqlLog`` プロパティに SQL ログの出力形式を指定できます。"
176184

177-
#: ../../query/batch-insert.rst:170
185+
#: ../../query/batch-insert.rst:185
178186
msgid "``SqlLogType.RAW`` represent outputting log that is sql with a binding parameter."
179187
msgstr "``SqlLogType.RAW`` はバインドパラメータ付きの SQL をログ出力することを表します。"
180188

docs/locale/ja/LC_MESSAGES/query/insert.po

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ msgid ""
22
msgstr ""
33
"Project-Id-Version: doma-docs\n"
44
"Report-Msgid-Bugs-To: \n"
5-
"POT-Creation-Date: 2024-03-17 13:53+0000\n"
6-
"PO-Revision-Date: 2024-03-19 14:05\n"
5+
"POT-Creation-Date: 2024-03-20 21:27+0900\n"
6+
"PO-Revision-Date: 2024-03-20 12:38\n"
77
"Last-Translator: \n"
88
"Language-Team: Japanese\n"
99
"MIME-Version: 1.0\n"
@@ -155,37 +155,45 @@ msgstr "SQLファイルによる追加では、IDの自動設定やバージョ
155155
"また、 ``@Insert`` の ``exclude`` 要素、 ``include`` 要素、 ``excludeNull`` 要素は参照されません。"
156156

157157
#: ../../query/insert.rst:141
158+
msgid "Upsert"
159+
msgstr ""
160+
161+
#: ../../query/insert.rst:143
162+
msgid "you can specify whether to update or ignore using a ``duplicateKeyType`` property In case of duplication. By default, it is ``DuplicateKeyType.EXCEPTION`` , and an error will occur in case of duplicated. There are 3 types to choose from: ``DuplicateKeyType.UPDATE`` , ``DuplicateKeyType.IGNORE`` , ``DuplicateKeyType.EXCEPTION`` ."
163+
msgstr "``duplicateKeyType`` プロパティを使用することで、レコードが重複した場合に更新するか無視するかを指定できます。デフォルトでは ``DuplicateKeyType.EXCEPTION`` が使用され、重複時にエラーが発生することを表します。 ``duplicateKeyType`` プロパティには ``DuplicateKeyType.UPDATE`` , ``DuplicateKeyType.IGNORE`` , ``DuplicateKeyType.EXCEPTION`` の3つの中からいずれかを選択して指定できます。"
164+
165+
#: ../../query/insert.rst:156
158166
msgid "Unique constraint violation"
159167
msgstr "一意制約違反"
160168

161-
#: ../../query/insert.rst:143
169+
#: ../../query/insert.rst:158
162170
msgid "``UniqueConstraintException`` is thrown regardless with or without using sql file if unique constraint violation is occurred."
163171
msgstr "一意制約違反が発生した場合は、SQLファイルの使用の有無に関係なく\n"
164172
"``UniqueConstraintException`` がスローされます。"
165173

166-
#: ../../query/insert.rst:146
174+
#: ../../query/insert.rst:161
167175
msgid "Query timeout"
168176
msgstr "クエリタイムアウト"
169177

170-
#: ../../query/insert.rst:148
178+
#: ../../query/insert.rst:163
171179
msgid "You can specify second of query timeout to ``queryTimeout`` element of ``@Insert``."
172180
msgstr "``@Insert`` の ``queryTimeout`` 要素にクエリタイムアウトの秒数を指定できます。"
173181

174-
#: ../../query/insert.rst:155
182+
#: ../../query/insert.rst:170
175183
msgid "This specifying is applied regardless with or without using sql file. Query timeout that is specified in :doc:`../config` is used if ``queryTimeout`` element is not set value."
176184
msgstr "この指定は、SQLファイルの使用の有無に関係なく適用されます。\n"
177185
"``queryTimeout`` 要素に値を指定しない場合、\n"
178186
":doc:`../config` に指定されたクエリタイムアウトが使用されます。"
179187

180-
#: ../../query/insert.rst:159
188+
#: ../../query/insert.rst:174
181189
msgid "SQL log output format"
182190
msgstr "SQLログの出力形式"
183191

184-
#: ../../query/insert.rst:161
192+
#: ../../query/insert.rst:176
185193
msgid "You can specify SQL log output format to ``sqlLog`` element of ``@Insert``."
186194
msgstr "``@Insert`` の ``sqlLog`` 要素に SQL のログ出力形式を指定できます。"
187195

188-
#: ../../query/insert.rst:168
196+
#: ../../query/insert.rst:183
189197
msgid "``SqlLogType.RAW`` is represented that the log is outputted sql with a bind parameter."
190198
msgstr "``SqlLogType.RAW`` はバインドパラメータ付きの SQL をログ出力することを表します。"
191199

0 commit comments

Comments
 (0)