Skip to content

Commit c23c738

Browse files
committed
Update document for OFFSET_ROWS and FETCH_FIRST_ROWS_ONLY #1582
1 parent 953bba6 commit c23c738

File tree

5 files changed

+210
-32
lines changed

5 files changed

+210
-32
lines changed

src/site/es/xdoc/statement-builders.xml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ public String updatePersonSql() {
297297
</td>
298298
<td>
299299
Appends a <code>LIMIT</code> clause.
300-
This method valid when use together with SELECT(), UPDATE() and DELETE(). (Available since 3.5.2)
300+
This method valid when use together with SELECT(), UPDATE() and DELETE().
301+
And this method is designed to use together with OFFSET() when use SELECT(). (Available since 3.5.2)
301302
</td>
302303
</tr>
303304
<tr>
@@ -313,7 +314,42 @@ public String updatePersonSql() {
313314
</td>
314315
<td>
315316
Appends a <code>OFFSET</code> clause.
316-
This method valid when use together with SELECT(). (Available since 3.5.2)
317+
This method valid when use together with SELECT().
318+
And this method is designed to use together with LIMIT(). (Available since 3.5.2)
319+
</td>
320+
</tr>
321+
<tr>
322+
<td>
323+
<ul>
324+
<li>
325+
<code>OFFSET_ROWS(String)</code>
326+
</li>
327+
<li>
328+
<code>OFFSET_ROWS(long)</code>
329+
</li>
330+
</ul>
331+
</td>
332+
<td>
333+
Appends a <code>OFFSET n ROWS</code> clause.
334+
This method valid when use together with SELECT().
335+
And this method is designed to use together with FETCH_FIRST_ROWS_ONLY(). (Available since 3.5.2)
336+
</td>
337+
</tr>
338+
<tr>
339+
<td>
340+
<ul>
341+
<li>
342+
<code>FETCH_FIRST_ROWS_ONLY(String)</code>
343+
</li>
344+
<li>
345+
<code>FETCH_FIRST_ROWS_ONLY(int)</code>
346+
</li>
347+
</ul>
348+
</td>
349+
<td>
350+
Appends a <code>FETCH FIRST n ROWS ONLY</code> clause.
351+
This method valid when use together with SELECT().
352+
And this method is designed to use together with OFFSET_ROWS(). (Available since 3.5.2)
317353
</td>
318354
</tr>
319355
<tr>
@@ -378,10 +414,10 @@ public String updatePersonSql() {
378414

379415
<p>
380416
<span class="label important">NOTE</span>
381-
It is important to note that SQL class writes <code>LIMIT</code> and <code>OFFSET</code> clauses into the generated statement as is.
382-
In other words, the library does not attempt to normalize those values for databases that don’t support <code>LIMIT</code> and <code>OFFSET</code> directly.
383-
Therefore, it is very important for users to understand whether or not the target database supports <code>LIMIT</code> and <code>OFFSET</code>.
384-
If the target database does not support <code>LIMIT</code> and <code>OFFSET</code>, then it is likely that using this support will create SQL that has runtime errors.
417+
It is important to note that SQL class writes <code>LIMIT</code>, <code>OFFSET</code>, <code>OFFSET n ROWS</code> and <code>FETCH FIRST n ROWS ONLY</code> clauses into the generated statement as is.
418+
In other words, the library does not attempt to normalize those values for databases that don’t support these clauses directly.
419+
Therefore, it is very important for users to understand whether or not the target database supports these clauses.
420+
If the target database does not support these clauses, then it is likely that using this support will create SQL that has runtime errors.
385421
</p>
386422

387423
<p>Since version 3.4.2, you can use variable-length arguments as follows:</p>

src/site/ja/xdoc/statement-builders.xml

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ public String updatePersonSql() {
314314
</td>
315315
<td>
316316
<code>LIMIT</code> 句を追加します。
317-
このメソッドは SELECT(), UPDATE(), DELETE() と一緒に使うと有効になります。 (3.5.2以降で利用可能)
317+
このメソッドは SELECT(), UPDATE(), DELETE() と一緒に使うと有効になり、
318+
SELECT()使用時は、OFFSET()と一緒に使うように設計されています。 (3.5.2以降で利用可能)
318319
</td>
319320
</tr>
320321
<tr>
@@ -330,7 +331,42 @@ public String updatePersonSql() {
330331
</td>
331332
<td>
332333
<code>OFFSET</code> 句を追加します。
333-
このメソッドは SELECT() と一緒に使うと有効になります。(3.5.2以降で利用可能)
334+
このメソッドは SELECT() と一緒に使うと有効になり、
335+
LIMIT()と一緒に使うように設計されています。(3.5.2以降で利用可能)
336+
</td>
337+
</tr>
338+
<tr>
339+
<td>
340+
<ul>
341+
<li>
342+
<code>OFFSET_ROWS(String)</code>
343+
</li>
344+
<li>
345+
<code>OFFSET_ROWS(long)</code>
346+
</li>
347+
</ul>
348+
</td>
349+
<td>
350+
<code>OFFSET n ROWS</code> 句を追加します。
351+
このメソッドは SELECT() と一緒に使うと有効になり、
352+
FETCH_FIRST_ROWS_ONLY()と一緒に使うように設計されています。 (3.5.2以降で利用可能)
353+
</td>
354+
</tr>
355+
<tr>
356+
<td>
357+
<ul>
358+
<li>
359+
<code>FETCH_FIRST_ROWS_ONLY(String)</code>
360+
</li>
361+
<li>
362+
<code>FETCH_FIRST_ROWS_ONLY(int)</code>
363+
</li>
364+
</ul>
365+
</td>
366+
<td>
367+
<code>FETCH FIRST n ROWS ONLY</code> 句を追加します。
368+
このメソッドは SELECT() と一緒に使うと有効になり、
369+
OFFSET_ROWS()と一緒に使うように設計されています。 (3.5.2以降で利用可能)
334370
</td>
335371
</tr>
336372
<tr>
@@ -397,12 +433,10 @@ public String updatePersonSql() {
397433

398434
<p>
399435
<span class="label important">NOTE</span>
400-
<code>LIMIT</code> と <code>OFFSET</code> 句は生成されたステートメントにそのまま書き込むという点に注意することが重要です。
401-
言い換えると、<code>LIMIT</code> と <code>OFFSET</code> 句をサポートしていないデータベースに対して、
402-
そのデータベースで解釈可能な表現へ変換することはしません。
403-
そのため、利用するデータベースが<code>LIMIT</code> と <code>OFFSET</code> 句をサポートしているか否かを把握しておくことが重要になります。
404-
もし、利用するデータベースが<code>LIMIT</code> と <code>OFFSET</code> 句をサポートしていない場合は、
405-
SQL実行時にエラーになります。
436+
<code>LIMIT</code> 、<code>OFFSET</code> 、<code>OFFSET n ROWS</code> 、<code>FETCH FIRST n ROWS ONLY</code> 句は生成されたステートメントにそのまま書き込むという点に注意することが重要です。
437+
言い換えると、これらの句をサポートしていないデータベースに対して、そのデータベースで解釈可能な表現へ変換することはしません。
438+
そのため、利用するデータベースがこれらの句をサポートしているか否かを事前に把握しておくことが重要になります。
439+
もし、利用するデータベースがこれらの句をサポートしていない場合は、SQL実行時にエラーになります。
406440
</p>
407441

408442
<p>バージョン3.4.2以降では、次のように可変長引数を使うことができます。</p>

src/site/ko/xdoc/statement-builders.xml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,8 @@ public String updatePersonSql() {
338338
</td>
339339
<td>
340340
Appends a <code>LIMIT</code> clause.
341-
This method valid when use together with SELECT(), UPDATE() and DELETE(). (Available since 3.5.2)
341+
This method valid when use together with SELECT(), UPDATE() and DELETE().
342+
And this method is designed to use together with OFFSET() when use SELECT(). (Available since 3.5.2)
342343
</td>
343344
</tr>
344345
<tr>
@@ -354,7 +355,42 @@ public String updatePersonSql() {
354355
</td>
355356
<td>
356357
Appends a <code>OFFSET</code> clause.
357-
This method valid when use together with SELECT(). (Available since 3.5.2)
358+
This method valid when use together with SELECT().
359+
And this method is designed to use together with LIMIT(). (Available since 3.5.2)
360+
</td>
361+
</tr>
362+
<tr>
363+
<td>
364+
<ul>
365+
<li>
366+
<code>OFFSET_ROWS(String)</code>
367+
</li>
368+
<li>
369+
<code>OFFSET_ROWS(long)</code>
370+
</li>
371+
</ul>
372+
</td>
373+
<td>
374+
Appends a <code>OFFSET n ROWS</code> clause.
375+
This method valid when use together with SELECT().
376+
And this method is designed to use together with FETCH_FIRST_ROWS_ONLY(). (Available since 3.5.2)
377+
</td>
378+
</tr>
379+
<tr>
380+
<td>
381+
<ul>
382+
<li>
383+
<code>FETCH_FIRST_ROWS_ONLY(String)</code>
384+
</li>
385+
<li>
386+
<code>FETCH_FIRST_ROWS_ONLY(int)</code>
387+
</li>
388+
</ul>
389+
</td>
390+
<td>
391+
Appends a <code>FETCH FIRST n ROWS ONLY</code> clause.
392+
This method valid when use together with SELECT().
393+
And this method is designed to use together with OFFSET_ROWS(). (Available since 3.5.2)
358394
</td>
359395
</tr>
360396
<tr>
@@ -425,10 +461,10 @@ public String updatePersonSql() {
425461

426462
<p>
427463
<span class="label important">NOTE</span>
428-
It is important to note that SQL class writes <code>LIMIT</code> and <code>OFFSET</code> clauses into the generated statement as is.
429-
In other words, the library does not attempt to normalize those values for databases that don’t support <code>LIMIT</code> and <code>OFFSET</code> directly.
430-
Therefore, it is very important for users to understand whether or not the target database supports <code>LIMIT</code> and <code>OFFSET</code>.
431-
If the target database does not support <code>LIMIT</code> and <code>OFFSET</code>, then it is likely that using this support will create SQL that has runtime errors.
464+
It is important to note that SQL class writes <code>LIMIT</code>, <code>OFFSET</code>, <code>OFFSET n ROWS</code> and <code>FETCH FIRST n ROWS ONLY</code> clauses into the generated statement as is.
465+
In other words, the library does not attempt to normalize those values for databases that don’t support these clauses directly.
466+
Therefore, it is very important for users to understand whether or not the target database supports these clauses.
467+
If the target database does not support these clauses, then it is likely that using this support will create SQL that has runtime errors.
432468
</p>
433469

434470
<p>3.4.2 버전부터, variable-length 매개변수를 아래와 같이 사용할 수 있습니다.</p>

src/site/xdoc/statement-builders.xml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ public String updatePersonSql() {
365365
</td>
366366
<td>
367367
Appends a <code>LIMIT</code> clause.
368-
This method valid when use together with SELECT(), UPDATE() and DELETE(). (Available since 3.5.2)
368+
This method valid when use together with SELECT(), UPDATE() and DELETE().
369+
And this method is designed to use together with OFFSET() when use SELECT(). (Available since 3.5.2)
369370
</td>
370371
</tr>
371372
<tr>
@@ -381,7 +382,42 @@ public String updatePersonSql() {
381382
</td>
382383
<td>
383384
Appends a <code>OFFSET</code> clause.
384-
This method valid when use together with SELECT(). (Available since 3.5.2)
385+
This method valid when use together with SELECT().
386+
And this method is designed to use together with LIMIT(). (Available since 3.5.2)
387+
</td>
388+
</tr>
389+
<tr>
390+
<td>
391+
<ul>
392+
<li>
393+
<code>OFFSET_ROWS(String)</code>
394+
</li>
395+
<li>
396+
<code>OFFSET_ROWS(long)</code>
397+
</li>
398+
</ul>
399+
</td>
400+
<td>
401+
Appends a <code>OFFSET n ROWS</code> clause.
402+
This method valid when use together with SELECT().
403+
And this method is designed to use together with FETCH_FIRST_ROWS_ONLY(). (Available since 3.5.2)
404+
</td>
405+
</tr>
406+
<tr>
407+
<td>
408+
<ul>
409+
<li>
410+
<code>FETCH_FIRST_ROWS_ONLY(String)</code>
411+
</li>
412+
<li>
413+
<code>FETCH_FIRST_ROWS_ONLY(int)</code>
414+
</li>
415+
</ul>
416+
</td>
417+
<td>
418+
Appends a <code>FETCH FIRST n ROWS ONLY</code> clause.
419+
This method valid when use together with SELECT().
420+
And this method is designed to use together with OFFSET_ROWS(). (Available since 3.5.2)
385421
</td>
386422
</tr>
387423
<tr>
@@ -454,10 +490,10 @@ public String updatePersonSql() {
454490

455491
<p>
456492
<span class="label important">NOTE</span>
457-
It is important to note that SQL class writes <code>LIMIT</code> and <code>OFFSET</code> clauses into the generated statement as is.
458-
In other words, the library does not attempt to normalize those values for databases that don’t support <code>LIMIT</code> and <code>OFFSET</code> directly.
459-
Therefore, it is very important for users to understand whether or not the target database supports <code>LIMIT</code> and <code>OFFSET</code>.
460-
If the target database does not support <code>LIMIT</code> and <code>OFFSET</code>, then it is likely that using this support will create SQL that has runtime errors.
493+
It is important to note that SQL class writes <code>LIMIT</code>, <code>OFFSET</code>, <code>OFFSET n ROWS</code> and <code>FETCH FIRST n ROWS ONLY</code> clauses into the generated statement as is.
494+
In other words, the library does not attempt to normalize those values for databases that don’t support these clauses directly.
495+
Therefore, it is very important for users to understand whether or not the target database supports these clauses.
496+
If the target database does not support these clauses, then it is likely that using this support will create SQL that has runtime errors.
461497
</p>
462498

463499
<p>Since version 3.4.2, you can use variable-length arguments as follows:</p>

src/site/zh/xdoc/statement-builders.xml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ public String updatePersonSql() {
344344
</td>
345345
<td>
346346
Appends a <code>LIMIT</code> clause.
347-
This method valid when use together with SELECT(), UPDATE() and DELETE(). (Available since 3.5.2)
347+
This method valid when use together with SELECT(), UPDATE() and DELETE().
348+
And this method is designed to use together with OFFSET() when use SELECT(). (Available since 3.5.2)
348349
</td>
349350
</tr>
350351
<tr>
@@ -360,7 +361,42 @@ public String updatePersonSql() {
360361
</td>
361362
<td>
362363
Appends a <code>OFFSET</code> clause.
363-
This method valid when use together with SELECT(). (Available since 3.5.2)
364+
This method valid when use together with SELECT().
365+
And this method is designed to use together with LIMIT(). (Available since 3.5.2)
366+
</td>
367+
</tr>
368+
<tr>
369+
<td>
370+
<ul>
371+
<li>
372+
<code>OFFSET_ROWS(String)</code>
373+
</li>
374+
<li>
375+
<code>OFFSET_ROWS(long)</code>
376+
</li>
377+
</ul>
378+
</td>
379+
<td>
380+
Appends a <code>OFFSET n ROWS</code> clause.
381+
This method valid when use together with SELECT().
382+
And this method is designed to use together with FETCH_FIRST_ROWS_ONLY(). (Available since 3.5.2)
383+
</td>
384+
</tr>
385+
<tr>
386+
<td>
387+
<ul>
388+
<li>
389+
<code>FETCH_FIRST_ROWS_ONLY(String)</code>
390+
</li>
391+
<li>
392+
<code>FETCH_FIRST_ROWS_ONLY(int)</code>
393+
</li>
394+
</ul>
395+
</td>
396+
<td>
397+
Appends a <code>FETCH FIRST n ROWS ONLY</code> clause.
398+
This method valid when use together with SELECT().
399+
And this method is designed to use together with OFFSET_ROWS(). (Available since 3.5.2)
364400
</td>
365401
</tr>
366402
<tr>
@@ -427,10 +463,10 @@ public String updatePersonSql() {
427463

428464
<p>
429465
<span class="label important">NOTE</span>
430-
It is important to note that SQL class writes <code>LIMIT</code> and <code>OFFSET</code> clauses into the generated statement as is.
431-
In other words, the library does not attempt to normalize those values for databases that don’t support <code>LIMIT</code> and <code>OFFSET</code> directly.
432-
Therefore, it is very important for users to understand whether or not the target database supports <code>LIMIT</code> and <code>OFFSET</code>.
433-
If the target database does not support <code>LIMIT</code> and <code>OFFSET</code>, then it is likely that using this support will create SQL that has runtime errors.
466+
It is important to note that SQL class writes <code>LIMIT</code>, <code>OFFSET</code>, <code>OFFSET n ROWS</code> and <code>FETCH FIRST n ROWS ONLY</code> clauses into the generated statement as is.
467+
In other words, the library does not attempt to normalize those values for databases that don’t support these clauses directly.
468+
Therefore, it is very important for users to understand whether or not the target database supports these clauses.
469+
If the target database does not support these clauses, then it is likely that using this support will create SQL that has runtime errors.
434470
</p>
435471

436472
<p>Since version 3.4.2, you can use variable-length arguments as follows:</p>

0 commit comments

Comments
 (0)