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

Commit e684fad

Browse files
committed
Use QueryDsl instead of Entityql and NativeSql
1 parent bfc34b5 commit e684fad

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

docs/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ There are two ways:
129129
* The SQL Templates.
130130
* The Criteria API.
131131

132-
See :doc:`sql` and :doc:`criteria-api` for detail information.
132+
See :doc:`sql` and :doc:`query-dsl` for detail information.
133133

134134
Does Doma support fetching relationships like one-to-one or one-to-many?
135135
----------------------------------------------------------------------------------------
@@ -138,7 +138,7 @@ Yes.
138138

139139
Doma provides the Criteria API to map database relationships to Java entities.
140140

141-
See :ref:`criteria_associate` for detail information.
141+
See :ref:`query_dsl_associate` for detail information.
142142

143143
Does Doma provide a JDBC connection pooling feature?
144144
----------------------------------------------------

docs/getting-started.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ To execute a SELECT query and retrieve Java object results, follow this example:
9494
9595
public Employee selectById(Integer id) {
9696
var e = new Employee_();
97-
return entityql.from(e).where(c -> c.eq(e.id, id)).fetchOne();
97+
return queryDsl.from(e).where(c -> c.eq(e.id, id)).fetchOne();
9898
}
9999
100100
You'll use a metamodel class, like ``Employee_`` for ``Employee``, which is auto-generated through annotation processing.
101101

102-
The ``entityql`` instance from the ``Entityql`` class serves as the Criteria API's starting point.
102+
The ``queryDsl`` instance from the ``QueryDsl`` class serves as the Criteria API's starting point.
103103

104104
The above code generates the following SQL statement:
105105

@@ -116,7 +116,7 @@ To issue a DELETE statement, write as follows:
116116
117117
public void delete(Employee employee) {
118118
var e = new Employee_();
119-
entityql.delete(e, employee).execute();
119+
queryDsl.delete(e).single(employee).execute();
120120
}
121121
122122
INSERT
@@ -128,7 +128,7 @@ To issue an INSERT statement, write as follows:
128128
129129
public void insert(Employee employee) {
130130
var e = new Employee_();
131-
entityql.insert(e, employee).execute();
131+
queryDsl.insert(e).single(employee).execute();
132132
}
133133
134134
UPDATE
@@ -140,7 +140,7 @@ To issue an UPDATE statement, write as follows:
140140
141141
public void update(Employee employee) {
142142
var e = new Employee_();
143-
entityql.update(e, employee).execute();
143+
queryDsl.update(e).single(employee).execute();
144144
}
145145
146146
DAO style

docs/query-dsl.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,8 @@ This generates:
566566
from EMPLOYEE t0_
567567
left outer join DEPARTMENT t1_ on (t0_.DEPARTMENT_ID = t1_.DEPARTMENT_ID)
568568
569+
.. _query_dsl_associate:
570+
569571
Association
570572
-----------
571573

0 commit comments

Comments
 (0)