Skip to content

Commit 679cffe

Browse files
committed
Update documents
1 parent 4e66a1c commit 679cffe

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

docs/annotation-processing.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ and show you how to pass them to build tools.
1313
Options
1414
=======
1515

16+
doma.criteria.enabled
17+
Whether to generate meta classes for the Criteria API.
18+
The default value is ``true``.
19+
20+
doma.criteria.prefix
21+
The name prefix of the meta classes for the Criteria API.
22+
The default value is an empty string.
23+
24+
doma.criteria.suffix
25+
The name suffix of the meta classes for the Criteria API.
26+
The default value is ``_``.
27+
1628
doma.dao.package
1729
The package that the generated implementation classes of interfaces annotated with ``@Dao`` belong to.
1830
The specified value overrides the value of doma.dao.subpackage.

docs/criteria-api.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ We use the following Entity classes to show you some examples:
6161
Each of the above classes has a corresponding meta class - ``Employee_`` and ``Department_``.
6262
These meta classes allow you to make your query typesafe.
6363

64+
You can customize the name of the meta classes by specifying annotation processor options.
65+
See :doc:`annotation-processing` and check the `doma.criteria.prefix`
66+
and the `doma.criteria.suffix` options.
67+
6468
Entityql DSL
6569
============
6670

@@ -294,6 +298,8 @@ The above query issues the following SQL statement:
294298
from EMPLOYEE t0_
295299
left outer join DEPARTMENT t1_ on (t0_.DEPARTMENT_ID = t1_.DEPARTMENT_ID)
296300
301+
.. _criteria_associate:
302+
297303
associate (Entityql)
298304
--------------------
299305

@@ -653,8 +659,9 @@ The use of the select method (NativeSql)
653659

654660
Be careful of the following points when you use the ``select`` method:
655661

656-
* Specify a type argument to the select method.
657-
* Use the select method in combination with the following map method.
662+
* Specify a type argument to the ``select`` method.
663+
* Use the ``select`` method in combination with the ``map`` method.
664+
The object returned by the ``select`` method doesn't have any ``execute`` methods.
658665

659666
.. code-block:: java
660667

docs/faq.rst

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Runtime environment
3131
Which version of JRE does Doma support?
3232
---------------------------------------
3333

34-
JRE 8, 9, 10, 11, 12, 13 and 14.
34+
JRE 8 and above.
3535

3636
Which libraries are required for Doma to work?
3737
----------------------------------------------
@@ -48,7 +48,7 @@ Development environment
4848
Which version of JDK does Doma support?
4949
---------------------------------------
5050

51-
JDK 8, 9, 10, 11, 12, 13 and 14.
51+
JDK 8 and above.
5252

5353
Which IDE do you recommend?
5454
---------------------------
@@ -105,30 +105,31 @@ Does Doma generate SQL statements?
105105

106106
Yes, Doma generates the following statements:
107107

108+
- SELECT
108109
- INSERT
109110
- DELETE
110111
- UPDATE
111112
- Stored procedure call
112113
- Stored function call
113114

114-
Doma doesn't generate SELECT statements
115-
but executes arbitrary SELECT statements and maps the results to the Java objects.
116-
117-
See also :doc:`query/index` for detailed information.
118-
119115
How are dynamic SQL statements executed?
120116
----------------------------------------
121117

122-
Dynamic SQL statements are built by directives that are represented by the SQL comments.
118+
There are two ways:
119+
120+
* The SQL Templates.
121+
* The Criteria API.
123122

124-
See also :doc:`sql` for detail information.
123+
See :doc:`sql` and :doc:`criteria-api` for detail information.
125124

126125
Does Doma map database relationships such as one-to-one and one-to-many to Java objects?
127126
----------------------------------------------------------------------------------------
128127

129-
No.
128+
Yes.
129+
130+
Doma provides the Criteria API to map database relationships to Java entities.
130131

131-
Doma only maps each row of the SQL result set to a Java entity instance.
132+
See :ref:`criteria_associate` for detail information.
132133

133134
Does Doma provide a JDBC connection pooling feature?
134135
----------------------------------------------------

0 commit comments

Comments
 (0)