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

Commit c8439f5

Browse files
committed
Update kotlin-support
1 parent dca6d4d commit c8439f5

File tree

2 files changed

+21
-39
lines changed

2 files changed

+21
-39
lines changed

docs/kotlin-support.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ Dao interfaces
7070
--------------
7171
7272
* Specify a SQL template to ``@org.seasar.doma.Sql``
73-
* Use ``org.seasar.doma.jdbc.Result`` as the return type of ``@Delete``, ``@Insert`` and ``@Update``
74-
* Use ``org.seasar.doma.jdbc.BatchResult`` as the return type of
75-
``@BatchDelete``, ``@BatchInsert`` and ``@BatchUpdate``
7673
7774
.. code-block:: java
7875
@@ -85,17 +82,14 @@ Dao interfaces
8582
fun selectById(id: Int): Person
8683
8784
@Insert
88-
fun insert(person: Person): Result<Person>
85+
fun insert(person: Person): Int
8986
}
9087
91-
* Use `Destructuring Declarations <https://kotlinlang.org/docs/reference/multi-declarations.html>`_
92-
for ``org.seasar.doma.jdbc.Result`` and ``org.seasar.doma.jdbc.BatchResult``
93-
9488
.. code-block:: java
9589
9690
val dao: PersonDao = ...
9791
val person = Person(name = Name("John"), address = Address(city = "Tokyo", street = "Yaesu"))
98-
val (newPerson, count) = dao.insert(person)
92+
val count = dao.insert(person)
9993
10094
.. _kotlin-specific-criteria-api:
10195
@@ -164,7 +158,7 @@ You can write build.gradle.kts as follows:
164158
Code Generation
165159
---------------
166160
167-
Use `Doma CodeGen Plugin <https://github.com/domaframework/doma-codegen-plugin>`_.
161+
Use :doc:`codegen`.
168162
This plugin support Kotlin code generation.
169163
170164
Using kapt in Gradle

docs/locale/ja/LC_MESSAGES/kotlin-support.po

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ 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"
5+
"POT-Creation-Date: 2024-03-29 22:59+0900\n"
66
"Last-Translator: \n"
77
"Language-Team: Japanese\n"
88
"MIME-Version: 1.0\n"
@@ -89,75 +89,63 @@ msgstr "Dao インターフェース"
8989
msgid "Specify a SQL template to ``@org.seasar.doma.Sql``"
9090
msgstr "SQLテンプレートを ``@org.seasar.doma.Sql`` に指定する"
9191

92-
#: ../../kotlin-support.rst:73
93-
msgid "Use ``org.seasar.doma.jdbc.Result`` as the return type of ``@Delete``, ``@Insert`` and ``@Update``"
94-
msgstr "``@Delete``、``@Insert``、および ``@Update`` の戻り値の型として ``org.seasar.doma.jdbc.Result`` を使用する"
95-
96-
#: ../../kotlin-support.rst:74
97-
msgid "Use ``org.seasar.doma.jdbc.BatchResult`` as the return type of ``@BatchDelete``, ``@BatchInsert`` and ``@BatchUpdate``"
98-
msgstr "``@BatchDelete``、 ``@BatchInsert`` 、 ``@BatchUpdate`` の戻り値の型として ``org.seasar.doma.jdbc.BatchResult`` を使用する"
99-
100-
#: ../../kotlin-support.rst:91
101-
msgid "Use `Destructuring Declarations <https://kotlinlang.org/docs/reference/multi-declarations.html>`_ for ``org.seasar.doma.jdbc.Result`` and ``org.seasar.doma.jdbc.BatchResult``"
102-
msgstr "``org.seasar.doma.jdbc.Result`` と ``org.seasar.doma.jdbc.BatchResult`` に対しては `Destructuring Declarations <https://kotlinlang.org/docs/reference/multi-declarations.html>`_ を使用する"
103-
104-
#: ../../kotlin-support.rst:103
92+
#: ../../kotlin-support.rst:97
10593
msgid "Kotlin specific Criteria API"
10694
msgstr "Kotlin 固有の Criteria API"
10795

108-
#: ../../kotlin-support.rst:107
96+
#: ../../kotlin-support.rst:101
10997
msgid "Prefer the Kotlin specific Criteria API to DAO interfaces."
11098
msgstr "DAO インターフェイスよりも Kotlin 固有の Criteria API を使ってください"
11199

112-
#: ../../kotlin-support.rst:109
100+
#: ../../kotlin-support.rst:103
113101
msgid "Doma provides Kotlin specific Criteria API, ``KEntityql`` and ``KNativeSql`` DSLs. They are very similar with the ``Entityql`` and ``NativeSql`` DSLs, which are described in :doc:`criteria-api`. The biggest feature of the ``KEntityql`` and ``KNativeSql`` DSLs is simplicity."
114102
msgstr "Doma は、Kotlin 固有の Criteria API、``KEntityql`` および ``KNativeSql`` DSL を提供します。これらは、:doc:`criteria-api` で説明されている ``Entityql`` および ``NativeSql`` DSL と非常に似ています。 ``KEntityql`` と ``KNativeSql`` DSL の最大の特徴はそのシンプルさです。"
115103

116-
#: ../../kotlin-support.rst:113
104+
#: ../../kotlin-support.rst:107
117105
msgid "For example, when you use ``KEntityql``, you have to accept a lambda parameter in a WHERE expression as follows:"
118106
msgstr "たとえば、 ``Entityql`` を使用する場合は、次のように WHERE 式でラムダパラメータを受け入れる必要があります。"
119107

120-
#: ../../kotlin-support.rst:132
108+
#: ../../kotlin-support.rst:126
121109
msgid "The lambda parameter ``c`` is a bit annoying. On the other hand, when you use ``KEntityql``, the parameter is gone."
122110
msgstr "ラムダパラメータ「c」は少し面倒です。一方、 ``KEntityql`` を使用すると、パラメータはなくなります。"
123111

124-
#: ../../kotlin-support.rst:152
112+
#: ../../kotlin-support.rst:146
125113
msgid "You can see a lot of sample code `here <https://github.com/domaframework/doma-it/tree/master/kotlin/src/test/kotlin/org/seasar/doma/it/criteria>`_."
126114
msgstr "ここ <https://github.com/domaframework/doma-it/tree/master/kotlin/src/test/kotlin/org/seasar/doma/it/criteria>`_ で多くのサンプル コードを参照できます。"
127115

128-
#: ../../kotlin-support.rst:154
116+
#: ../../kotlin-support.rst:148
129117
msgid "The ``KEntityql`` and ``KNativeSql`` DSLs are included in doma-kotlin.jar. Note that you should depend on doma-kotlin instead of doma-core in your build script. You can write build.gradle.kts as follows:"
130118
msgstr "``KEntityql`` および ``KNativeSql`` DSL は doma-kotlin.jar に含まれています。ビルド スクリプトでは doma-core ではなく doma-kotlin に依存する必要があることに注意してください。 build.gradle.kts は次のように記述できます。"
131119

132-
#: ../../kotlin-support.rst:165
120+
#: ../../kotlin-support.rst:159
133121
msgid "Code Generation"
134122
msgstr "コード生成"
135123

136-
#: ../../kotlin-support.rst:167
137-
msgid "Use `Doma CodeGen Plugin <https://github.com/domaframework/doma-codegen-plugin>`_. This plugin support Kotlin code generation."
138-
msgstr "`Doma CodeGen プラグイン <https://github.com/domaframework/doma-codegen-plugin>`_ を使用してください。このプラグインは Kotlin コード生成をサポートします。"
124+
#: ../../kotlin-support.rst:161
125+
msgid "Use :doc:`codegen`. This plugin support Kotlin code generation."
126+
msgstr ":doc:`codegen` を使用してください。このプラグインはKotlinのコード生成をサポートしています。"
139127

140-
#: ../../kotlin-support.rst:171
128+
#: ../../kotlin-support.rst:165
141129
msgid "Using kapt in Gradle"
142130
msgstr "Gradle での kapt の使用"
143131

144-
#: ../../kotlin-support.rst:173
132+
#: ../../kotlin-support.rst:167
145133
msgid "Annotation processors are supported in Kotlin with the `kapt <https://kotlinlang.org/docs/reference/kapt.html>`_ compiler plugin."
146134
msgstr "アノテーション プロセッサは、Kotlin で `kapt <https://kotlinlang.org/docs/reference/kapt.html>`_ コンパイラ プラグインを使用してサポートされています。"
147135

148-
#: ../../kotlin-support.rst:176
136+
#: ../../kotlin-support.rst:170
149137
msgid "Add the dependencies using the `kapt` and `implementation` configuration in your dependencies block. For example, you can write build.gradle.kts as follows:"
150138
msgstr "依存関係ブロックの `kapt` および `implementation` を使用して依存関係を追加します。たとえば、次のように build.gradle.kts を記述できます。"
151139

152-
#: ../../kotlin-support.rst:186
140+
#: ../../kotlin-support.rst:180
153141
msgid "To simplify your build script, we recommend you use the `Doma Compile Plugin <https://github.com/domaframework/doma-compile-plugin>`_:"
154142
msgstr "ビルド スクリプトを簡略化するには、`Doma コンパイル プラグイン <https://github.com/domaframework/doma-compile-plugin>`_ を使用することをお勧めします。"
155143

156-
#: ../../kotlin-support.rst:190
144+
#: ../../kotlin-support.rst:184
157145
msgid "Sample project"
158146
msgstr "サンプルプロジェクト"
159147

160-
#: ../../kotlin-support.rst:192
148+
#: ../../kotlin-support.rst:186
161149
msgid "`kotlin-sample <https://github.com/domaframework/kotlin-sample>`_"
162150
msgstr ""
163151

0 commit comments

Comments
 (0)