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 2017/09/29 07:38:00 UTC

[jira] [Commented] (EMPIREDB-263) Not possible to set skipRows unless limitRows is also set

    [ https://issues.apache.org/jira/browse/EMPIREDB-263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16185463#comment-16185463 ] 

Rainer Döbele commented on EMPIREDB-263:
----------------------------------------

Hi Shaun,
Obviously when the feature was implemented for Postgres this possibility was not considered.

As far as I can see it should be possible to change the implementation of DBCommandPostreSQL (which is nested inside DBDatabaseDriverPostgreSQL).
For testing you might want to derive a class from DBDatabaseDriverPostgreSQL and override createCommand in order to provide your own implementation.
If it solves your problem, we would be happy to receive your implementation so that we can distribute it with our next release.

Let us know, if you need any further assistence.
Regards,
Rainer


> Not possible to set skipRows unless limitRows is also set
> ---------------------------------------------------------
>
>                 Key: EMPIREDB-263
>                 URL: https://issues.apache.org/jira/browse/EMPIREDB-263
>             Project: Empire-DB
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: empire-db-2.4.6
>            Reporter: Shaun Forbes
>            Priority: Minor
>
> For databases that support skipRows() and limitRows() when generating a select statement if limitRows hasn't been specified then skipRows isn't checked.
> In Postgres at least it's legal to specify an offset without also specifying a limit, but because Empire-db won't apply the offset unless you also specify a limit it's not possible to generate a select statement with just an offset.
> I understand that the two are generally used together, and I only found this because of a bug in my code, but I don't see a reason why utilizing skipRows() should not be allowed without limitRows(). Unfortunately, it means that the semantics of clearLimit() may need to change since it currently clears both and there's no clearSkip() method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)