empire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Döbele (JIRA) <empire-db-...@incubator.apache.org>
Subject [jira] [Commented] (EMPIREDB-263) Not possible to set skipRows unless limitRows is also set
Date Fri, 29 Sep 2017 07:38:00 GMT

    [ 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)

Mime
View raw message