You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Rainer Döbele (JIRA)" <em...@incubator.apache.org> on 2009/11/29 13:20:20 UTC
[jira] Created: (EMPIREDB-62) Allow to set limit for maximum number
of rows returned
Allow to set limit for maximum number of rows returned
------------------------------------------------------
Key: EMPIREDB-62
URL: https://issues.apache.org/jira/browse/EMPIREDB-62
Project: Empire-DB
Issue Type: Improvement
Components: Core
Affects Versions: empire-db-2.0.6-incubating
Reporter: Rainer Döbele
Assignee: Rainer Döbele
Fix For: empire-db-2.0.6-incubating
Currently it is not possible to limit the number of rows returned by a query.
The question is whether to add it to ths sql phrase or use setMaxRows() before executing the statement.
SQL is somewhat different for each database vendor:
SQL Server:
SELECT TOP 10 id, name, ...
FROM contacts
MySQL:
SELECT id, name, ...
FROM contacts
LIMIT 10
ORACLE:
SELECT id, name, ...
FROM contacts
WHERE ROWNUM <= 10
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EMPIREDB-62) Allow to set limit for maximum
number of rows returned
Posted by "Francis De Brabandere (JIRA)" <em...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/EMPIREDB-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12926692#action_12926692 ]
Francis De Brabandere commented on EMPIREDB-62:
-----------------------------------------------
can this be closed?
> Allow to set limit for maximum number of rows returned
> ------------------------------------------------------
>
> Key: EMPIREDB-62
> URL: https://issues.apache.org/jira/browse/EMPIREDB-62
> Project: Empire-DB
> Issue Type: Improvement
> Components: Core
> Affects Versions: empire-db-2.0.6-incubating
> Reporter: Rainer Döbele
> Assignee: Rainer Döbele
> Fix For: empire-db-2.0.7-incubating
>
>
> Currently it is not possible to limit the number of rows returned by a query.
> The question is whether to add it to ths sql phrase or use setMaxRows() before executing the statement.
> SQL is somewhat different for each database vendor:
> SQL Server:
> SELECT TOP 10 id, name, ...
> FROM contacts
> MySQL:
> SELECT id, name, ...
> FROM contacts
> LIMIT 10
> ORACLE:
> SELECT id, name, ...
> FROM contacts
> WHERE ROWNUM <= 10
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (EMPIREDB-62) Allow to set limit for maximum
number of rows returned
Posted by "Francis De Brabandere (JIRA)" <em...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/EMPIREDB-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12783424#action_12783424 ]
Francis De Brabandere commented on EMPIREDB-62:
-----------------------------------------------
You might also want to implement paging as most of the time you will want to use both
MySQL LIMIT [offset], [max]
http://dev.mysql.com/doc/refman/5.4/en/select.html
> Allow to set limit for maximum number of rows returned
> ------------------------------------------------------
>
> Key: EMPIREDB-62
> URL: https://issues.apache.org/jira/browse/EMPIREDB-62
> Project: Empire-DB
> Issue Type: Improvement
> Components: Core
> Affects Versions: empire-db-2.0.6-incubating
> Reporter: Rainer Döbele
> Assignee: Rainer Döbele
> Fix For: empire-db-2.0.6-incubating
>
>
> Currently it is not possible to limit the number of rows returned by a query.
> The question is whether to add it to ths sql phrase or use setMaxRows() before executing the statement.
> SQL is somewhat different for each database vendor:
> SQL Server:
> SELECT TOP 10 id, name, ...
> FROM contacts
> MySQL:
> SELECT id, name, ...
> FROM contacts
> LIMIT 10
> ORACLE:
> SELECT id, name, ...
> FROM contacts
> WHERE ROWNUM <= 10
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (EMPIREDB-62) Allow to set limit for maximum number
of rows returned
Posted by "Rainer Döbele (JIRA)" <em...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/EMPIREDB-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rainer Döbele closed EMPIREDB-62.
---------------------------------
Resolution: Fixed
function limitRows() on DBCommand has been implmented for the following databases:
- MySQL
- Microsoft SQL Server
- Oracle
Additionally the function skipRows() is available for MySQL.
Availability may be checked like this:
if (db.getDriver().isSupported(DBDriverFeature.QUERY_LIMIT_ROWS))
or
if (db.getDriver().isSupported(DBDriverFeature.QUERY_SKIP_ROWS))
> Allow to set limit for maximum number of rows returned
> ------------------------------------------------------
>
> Key: EMPIREDB-62
> URL: https://issues.apache.org/jira/browse/EMPIREDB-62
> Project: Empire-DB
> Issue Type: Improvement
> Components: Core
> Affects Versions: empire-db-2.0.6-incubating
> Reporter: Rainer Döbele
> Assignee: Rainer Döbele
> Fix For: empire-db-2.0.7-incubating
>
>
> Currently it is not possible to limit the number of rows returned by a query.
> The question is whether to add it to ths sql phrase or use setMaxRows() before executing the statement.
> SQL is somewhat different for each database vendor:
> SQL Server:
> SELECT TOP 10 id, name, ...
> FROM contacts
> MySQL:
> SELECT id, name, ...
> FROM contacts
> LIMIT 10
> ORACLE:
> SELECT id, name, ...
> FROM contacts
> WHERE ROWNUM <= 10
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (EMPIREDB-62) Allow to set limit for maximum number
of rows returned
Posted by "Francis De Brabandere (JIRA)" <em...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/EMPIREDB-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Francis De Brabandere updated EMPIREDB-62:
------------------------------------------
Fix Version/s: empire-db-2.0.7-incubating
(was: empire-db-2.0.6-incubating)
moving to 2.0.7
> Allow to set limit for maximum number of rows returned
> ------------------------------------------------------
>
> Key: EMPIREDB-62
> URL: https://issues.apache.org/jira/browse/EMPIREDB-62
> Project: Empire-DB
> Issue Type: Improvement
> Components: Core
> Affects Versions: empire-db-2.0.6-incubating
> Reporter: Rainer Döbele
> Assignee: Rainer Döbele
> Fix For: empire-db-2.0.7-incubating
>
>
> Currently it is not possible to limit the number of rows returned by a query.
> The question is whether to add it to ths sql phrase or use setMaxRows() before executing the statement.
> SQL is somewhat different for each database vendor:
> SQL Server:
> SELECT TOP 10 id, name, ...
> FROM contacts
> MySQL:
> SELECT id, name, ...
> FROM contacts
> LIMIT 10
> ORACLE:
> SELECT id, name, ...
> FROM contacts
> WHERE ROWNUM <= 10
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.